summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-04-05 09:19:26 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-04-05 09:19:26 +0200
commit6a30f63fe4919268a897feb2fde7764a57fa4bb2 (patch)
tree08c1545c41cd42f697e9a0ec730bc83e7ff44695
parentcc6a7d008b402e5e019237e2576e3d98e815bf91 (diff)
Fix for "Fl_Native_File_Chooser_GTK does not respect PREVIEW option" in fltk.general.
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
index 842115d37..9f0cc91c5 100644
--- a/src/Fl_Native_File_Chooser_GTK.cxx
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -356,7 +356,8 @@ gtk_chooser_prefs(Fl_Preferences::USER, "fltk.org", "fltk/GTK-file-chooser")
gtkw_title = NULL; // dialog title
_btype = val;
previous_filter = NULL;
- gtk_chooser_prefs.get("Preview", want_preview, 0);
+ if (options() & Fl_Native_File_Chooser::PREVIEW) want_preview = true;
+ else gtk_chooser_prefs.get("Preview", want_preview, 0);
}
Fl_GTK_Native_File_Chooser_Driver::~Fl_GTK_Native_File_Chooser_Driver()
@@ -381,7 +382,8 @@ Fl_GTK_Native_File_Chooser_Driver::~Fl_GTK_Native_File_Chooser_Driver()
}
gtkw_count = 0; // assume we have no files selected now
gtkw_title = strfree(gtkw_title);
- gtk_chooser_prefs.set("Preview", want_preview);
+ if (!(options() & Fl_Native_File_Chooser::PREVIEW))
+ gtk_chooser_prefs.set("Preview", want_preview);
}
void Fl_GTK_Native_File_Chooser_Driver::type(int val) {