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 --- FL/Fl_Native_File_Chooser.H | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'FL/Fl_Native_File_Chooser.H') diff --git a/FL/Fl_Native_File_Chooser.H b/FL/Fl_Native_File_Chooser.H index 92e21a98e..726a34636 100644 --- a/FL/Fl_Native_File_Chooser.H +++ b/FL/Fl_Native_File_Chooser.H @@ -105,11 +105,12 @@ class Fl_Native_File_Chooser_Driver; - Under X11/Wayland the dialog is chosen as follows: -# If command \p zenity is available at run-time and if \p Fl::option(OPTION_FNFC_USES_ZENITY) is - not turned off, the \p zenity -based dialog opens. This is expected to be more appropriate - than other dialog forms for sandboxed apps. - -# Else if the app runs under the KDE desktop and if command \p kdialog is available at run-time - and if the library was not built with cmake -D FLTK_USE_KDIALOG=OFF, the - \p kdialog -based dialog opens. + turned on, the \p zenity -based dialog opens. This is expected to be more appropriate + than other dialog forms for sandboxed apps, but member function filter_value() is not effective. + -# Else if the app runs under the KDE desktop + and if \p Fl::option(OPTION_FNFC_USES_KDIALOG) is turned on, + and if command \p kdialog is available at run-time, the \p kdialog -based dialog opens. + Member function filter_value() is not effective with this dialog. -# Else if the GTK library is available at run-time on the computer and if \p Fl::option(OPTION_FNFC_USES_GTK) is not turned off, the GTK-styled dialog opens. Call fl_register_images() to add a "Preview" button to this dialog. Use the static public attributes of class Fl_File_Chooser to localize the browser. @@ -119,8 +120,6 @@ class Fl_Native_File_Chooser_Driver; at the start of main(), to enable the nicer looking file browser widgets. Use the static public attributes of class Fl_File_Chooser to localize the browser. - \todo Improve documentation about selection of native file choosers on X11/Wayland.\n - - Some operating systems support certain OS specific options; see Fl_Native_File_Chooser::options() for a list. -- cgit v1.2.3