diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-12-13 18:37:48 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-12-16 16:21:23 +0100 |
| commit | 41f37613ec6a14fb8b3357e2dc0323116bf8439b (patch) | |
| tree | b6677826b5eadc6571f2ffd582d9a2d858172102 /src/Fl_Native_File_Chooser_GTK.cxx | |
| parent | 576271fb04e1c2f9ba1f95c0399fef2f73af3b06 (diff) | |
Derive Fl_Zenity_Native_File_Chooser_Driver from Fl_Kdialog_Native_…
Also add Fl::option(OPTION_FNFC_USES_ZENITY)
Diffstat (limited to 'src/Fl_Native_File_Chooser_GTK.cxx')
| -rw-r--r-- | src/Fl_Native_File_Chooser_GTK.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx index e41c4230f..98dbb5567 100644 --- a/src/Fl_Native_File_Chooser_GTK.cxx +++ b/src/Fl_Native_File_Chooser_GTK.cxx @@ -17,9 +17,7 @@ #include <config.h> #include <FL/Fl_Native_File_Chooser.H> -#if USE_ZENITY -# include "Fl_Native_File_Chooser_Zenity.H" -#endif +#include "Fl_Native_File_Chooser_Zenity.H" #if USE_KDIALOG # include "Fl_Native_File_Chooser_Kdialog.H" #endif @@ -934,8 +932,7 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { platform_fnfc = NULL; fl_open_display(); if (Fl::option(Fl::OPTION_FNFC_USES_GTK)) { -#if USE_ZENITY - if (val != BROWSE_MULTI_DIRECTORY) { + if (Fl::option(Fl::OPTION_FNFC_USES_ZENITY)&& val != BROWSE_MULTI_DIRECTORY) { if (!Fl_Zenity_Native_File_Chooser_Driver::have_looked_for_zenity) { // First Time here, try to find zenity FILE *pipe = popen("zenity --version 2> /dev/null", "r"); @@ -950,7 +947,6 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) { // if we found zenity, we will use the Fl_Zenity_Native_File_Chooser_Driver if (Fl_Zenity_Native_File_Chooser_Driver::did_find_zenity) platform_fnfc = new Fl_Zenity_Native_File_Chooser_Driver(val); } -#endif // USE_ZENITY #if USE_KDIALOG const char *desktop = getenv("XDG_CURRENT_DESKTOP"); if (!platform_fnfc && desktop && strcmp(desktop, "KDE") == 0 && val != BROWSE_MULTI_DIRECTORY) { |
