You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.1KB

  1. diff --git a/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp b/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
  2. index b799ee2e4..803740c63 100644
  3. --- a/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
  4. +++ b/modules/juce_gui_basics/native/juce_linux_FileChooser.cpp
  5. @@ -26,6 +26,7 @@
  6. namespace juce
  7. {
  8. +#if JUCE_MODAL_LOOPS_PERMITTED
  9. static bool exeIsAvailable (String executable)
  10. {
  11. ChildProcess child;
  12. @@ -245,10 +246,11 @@ private:
  13. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Native)
  14. };
  15. +#endif
  16. bool FileChooser::isPlatformDialogAvailable()
  17. {
  18. - #if JUCE_DISABLE_NATIVE_FILECHOOSERS
  19. + #if JUCE_DISABLE_NATIVE_FILECHOOSERS || ! JUCE_MODAL_LOOPS_PERMITTED
  20. return false;
  21. #else
  22. static bool canUseNativeBox = exeIsAvailable ("zenity") || exeIsAvailable ("kdialog");
  23. @@ -258,7 +260,11 @@ bool FileChooser::isPlatformDialogAvailable()
  24. FileChooser::Pimpl* FileChooser::showPlatformDialog (FileChooser& owner, int flags, FilePreviewComponent*)
  25. {
  26. +#if JUCE_MODAL_LOOPS_PERMITTED
  27. return new Native (owner, flags);
  28. +#else
  29. + return nullptr;
  30. +#endif
  31. }
  32. } // namespace juce