From abfc8ee52f5e7b7e9022dd0bb6fd370a0e9c32af Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 22 Apr 2024 16:34:08 +0200 Subject: Fix: Fl_Native_File_Chooser::filter_value() [Kdialog] always returns 0 (#899) - remove build option FLTK_USE_KDIALOG replaced by an Fl::option() option - new run-time option OPTION_FNFC_USES_KDIALOG - make options OPTION_FNFC_USES_KDIALOG and OPTION_FNFC_USES_ZENITY false by default - add mention of new program fltk-options in the doc of Fl::option() - change logic of choice of the native file chooser under X11/Wayland: the zenity and kdialog choosers are opt-in; otherwise the GTK file chooser is used, unless opted out with OPTION_FNFC_USES_GTK - document that zenity may be interesting for sandboxed apps - document that both zenity and kdialog make member functions Fl_Native_File_Chooser::filter_value() inoperable --- fltk-options/fltk-options.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'fltk-options') diff --git a/fltk-options/fltk-options.cxx b/fltk-options/fltk-options.cxx index b1dec34d0..50dbc615c 100644 --- a/fltk-options/fltk-options.cxx +++ b/fltk-options/fltk-options.cxx @@ -136,11 +136,17 @@ Fo_Option_Descr g_option_list[] = { "platfom. If disabled, the Fl_Native_File_Chooser class always uses FLTK's " "own file dialog (i.e., Fl_File_Chooser) even if GTK is available." }, { FO_OPTION_BOOL, "Native File Chooser uses Zenity:", - Fl::OPTION_FNFC_USES_ZENITY, "OPTION_FNFC_USES_ZENITY", "UseZenity", true, - "Use Zenity file chooser instead of FLTK if available.", - "Meaningful for the Wayland/X11 platform only. When switched on (default)," - "the library uses a Zenity-based file dialog. When switched off, the GTK" - "file dialog is used instead." }, + Fl::OPTION_FNFC_USES_ZENITY, "OPTION_FNFC_USES_ZENITY", "UseZenity", false, + "Fl_Native_File_Chooser uses the 'zenity' command if possible.", + "Meaningful for the Wayland/X11 platform only. When switched on, " + "the library uses a Zenity-based file dialog if command 'zenity' is available. " + "When switched off (default), command 'zenity' is not used."}, + { FO_OPTION_BOOL, "Native File Chooser uses Kdialog:", + Fl::OPTION_FNFC_USES_KDIALOG, "OPTION_FNFC_USES_KDIALOG", "UseKdialog", false, + "Fl_Native_File_Chooser uses the 'kdialog' command if possible.", + "Meaningful for the Wayland/X11 platform and the KDE-Plasma desktop only. " + "When switched on, the library uses a kdialog-based file dialog if command 'kdialog' is " + "available. When switched off (default), command 'kdialog' is not used." }, { FO_HEADLINE, "Print dialog Options" }, { FO_OPTION_BOOL, "Print dialog uses GTK:", Fl::OPTION_PRINTER_USES_GTK, "OPTION_PRINTER_USES_GTK", "PrintUsesGTK", true, -- cgit v1.2.3