diff options
| author | Matthias Melcher <git@matthiasm.com> | 2019-12-31 18:30:04 +0100 |
|---|---|---|
| committer | Matthias Melcher <git@matthiasm.com> | 2019-12-31 18:30:04 +0100 |
| commit | c0237a1f045d14a54fe9a999543cb83385ac7dd6 (patch) | |
| tree | 0ea97f9bd687167bdb86578acc23d9066481b514 /src/Fl.cxx | |
| parent | 0a23d7fe6e3a7b8000dcc6e7c4826e894f184079 (diff) | |
Limiting file access for Fl_Preferences.
Added Fl_Preferences::file_access() and various flags that make it possible to limit or completely deny file access to the preferences system, either for the core library or for the application or both.
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 0a4e22ee9..13bd308f1 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1850,7 +1850,7 @@ bool Fl::option(Fl_Option opt) if (!options_read_) { int tmp; { // first, read the system wide preferences - Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk"); + Fl_Preferences prefs(Fl_Preferences::CORE_SYSTEM, "fltk.org", "fltk"); Fl_Preferences opt_prefs(prefs, "options"); opt_prefs.get("ArrowFocus", tmp, 0); // default: off options_[OPTION_ARROW_FOCUS] = tmp; @@ -1874,7 +1874,7 @@ bool Fl::option(Fl_Option opt) } { // next, check the user preferences // override system options only, if the option is set ( >= 0 ) - Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk"); + Fl_Preferences prefs(Fl_Preferences::CORE_USER, "fltk.org", "fltk"); Fl_Preferences opt_prefs(prefs, "options"); opt_prefs.get("ArrowFocus", tmp, -1); if (tmp >= 0) options_[OPTION_ARROW_FOCUS] = tmp; @@ -1896,7 +1896,7 @@ bool Fl::option(Fl_Option opt) opt_prefs.get("ShowZoomFactor", tmp, -1); if (tmp >= 0) options_[OPTION_SHOW_SCALING] = tmp; } - { // now, if the developer has registered this app, we could as for per-application preferences + { // now, if the developer has registered this app, we could ask for per-application preferences } options_read_ = 1; } |
