From 41f37613ec6a14fb8b3357e2dc0323116bf8439b Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 13 Dec 2022 18:37:48 +0100 Subject: =?UTF-8?q?Derive=20Fl=5FZenity=5FNative=5FFile=5FChooser=5FDriver?= =?UTF-8?q?=20from=20Fl=5FKdialog=5FNative=5F=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also add Fl::option(OPTION_FNFC_USES_ZENITY) --- src/Fl_Native_File_Chooser_GTK.cxx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/Fl_Native_File_Chooser_GTK.cxx') 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 #include -#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) { -- cgit v1.2.3