summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-22 16:34:08 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-04-22 16:34:08 +0200
commitabfc8ee52f5e7b7e9022dd0bb6fd370a0e9c32af (patch)
tree95d6a53874a68c0cc13bda5128561d40314b78a9 /src/Fl.cxx
parentee37965fad79a815feea3f8a4a6cfec03d4a9029 (diff)
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
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index 16672cfcc..43517ee20 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -1961,9 +1961,6 @@ void Fl::clear_widget_pointer(Fl_Widget const *w)
There should be a command line option interface.
- There should be an application that manages options system wide, per user, and
- per application.
-
Example:
\code
if ( Fl::option(Fl::OPTION_ARROW_FOCUS) )
@@ -1972,8 +1969,7 @@ void Fl::clear_widget_pointer(Fl_Widget const *w)
{ ..off.. }
\endcode
- \note As of FLTK 1.3.0, options can be managed within fluid, using the menu
- <i>Edit/Global FLTK Settings</i>.
+ \note Options can be managed with the \c fltk-options program, new in FLTK 1.4.0.
\param opt which option
\return true or false
@@ -2008,8 +2004,10 @@ bool Fl::option(Fl_Option opt)
opt_prefs.get("ShowZoomFactor", tmp, 1); // default: on
options_[OPTION_SHOW_SCALING] = tmp;
- opt_prefs.get("UseZenity", tmp, 1); // default: on
+ opt_prefs.get("UseZenity", tmp, 0); // default: off
options_[OPTION_FNFC_USES_ZENITY] = tmp;
+ opt_prefs.get("UseKdialog", tmp, 0); // default: off
+ options_[OPTION_FNFC_USES_KDIALOG] = tmp;
opt_prefs.get("SimpleZoomShortcut", tmp, 0); // default: off
options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp;
}
@@ -2038,6 +2036,8 @@ bool Fl::option(Fl_Option opt)
if (tmp >= 0) options_[OPTION_SHOW_SCALING] = tmp;
opt_prefs.get("UseZenity", tmp, -1);
if (tmp >= 0) options_[OPTION_FNFC_USES_ZENITY] = tmp;
+ opt_prefs.get("UseKdialog", tmp, -1);
+ if (tmp >= 0) options_[OPTION_FNFC_USES_KDIALOG] = tmp;
opt_prefs.get("SimpleZoomShortcut", tmp, -1);
if (tmp >= 0) options_[OPTION_SIMPLE_ZOOM_SHORTCUT] = tmp;
}