summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_GTK.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-12-18 09:29:37 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-12-18 09:29:37 +0100
commitb246b6650ab04cbdf3e258b5a75bf928fc46302c (patch)
treeef73c74ed8ec92d361376ed597fb82d6c9203ea0 /src/Fl_Native_File_Chooser_GTK.cxx
parent993b7da3b513ecb33730ab76828e64dcb6b80115 (diff)
Fix "link errors connected with recent Zenity dialog feature" (#602)
Diffstat (limited to 'src/Fl_Native_File_Chooser_GTK.cxx')
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
index 98dbb5567..cbfe50440 100644
--- a/src/Fl_Native_File_Chooser_GTK.cxx
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -17,8 +17,8 @@
#include <config.h>
#include <FL/Fl_Native_File_Chooser.H>
-#include "Fl_Native_File_Chooser_Zenity.H"
#if USE_KDIALOG
+# include "Fl_Native_File_Chooser_Zenity.H"
# include "Fl_Native_File_Chooser_Kdialog.H"
#endif
@@ -932,6 +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_KDIALOG
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
@@ -947,7 +948,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);
}
-#if USE_KDIALOG
const char *desktop = getenv("XDG_CURRENT_DESKTOP");
if (!platform_fnfc && desktop && strcmp(desktop, "KDE") == 0 && val != BROWSE_MULTI_DIRECTORY) {
if (!Fl_Kdialog_Native_File_Chooser_Driver::have_looked_for_kdialog) {