diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-01-19 16:08:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-19 16:08:29 +0100 |
| commit | 09eff7243a6e8e37d9615df7b951ffa3c03c0ae2 (patch) | |
| tree | 513b39c92f1f6a9d0f0ca7f9a1488f298f7a068e /fluid/alignment_panel.fl | |
| parent | 793f4b90fac349b096922a6b90ae2731777ac6cf (diff) | |
Fixing and upgrading Fl_Preferences (#374)
* Added filename function to Fl_Preferences
Static function to get filename before opening.
Member to get filename after opening.
Bug fixes for memory mapped preferences.
* ERROR is a macro on Windows, don't use it
* Added Fl_Preferences::dirty().
User can now check if the database will be written
when flushed or destroyed.
Flush returns a crude error code.
* Fl_Preferences::get binary data returns # of bytes read.
* Verified group deletion code
* Fl_Preferences ignores locale.
This will make .prefs files interchangeable
between different computers.
* Updating the Preferences Mode to ignore locale.
* Fixes in docs.
Diffstat (limited to 'fluid/alignment_panel.fl')
| -rw-r--r-- | fluid/alignment_panel.fl | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl index 716ebcca3..af64ecb73 100644 --- a/fluid/alignment_panel.fl +++ b/fluid/alignment_panel.fl @@ -1,5 +1,10 @@ # data file for the Fltk User Interface Designer (fluid) version 1.0400 +i18n_type 1 +i18n_include {<libintl.h>} +i18n_conditional FLTK_GETTEXT_FOUND +i18n_function gettext +i18n_static_function gettext_noop header_name {.h} code_name {.cxx} comment {// @@ -35,7 +40,7 @@ decl {\#include <FL/Fl_Text_Buffer.H>} {public local decl {\#include <FL/Fl_Text_Display.H>} {public local } -decl {\#include <FL/filename.H>} {selected public local +decl {\#include <FL/filename.H>} {public local } decl {\#include <FL/Fl_Preferences.H>} {private global @@ -323,7 +328,7 @@ Function {make_shell_window()} {open tooltip {save the design to the .fl file before running the command} xywh {82 39 136 19} down_box DOWN_BOX labelsize 12 } Fl_Check_Button shell_writecode_button { - label {save source code} + label {save source code} selected tooltip {generate the source code and header file before running the command} xywh {82 59 120 19} down_box DOWN_BOX labelsize 12 } Fl_Check_Button shell_writemsgs_button { @@ -524,11 +529,11 @@ wShowZoomFactor->value(opt[Fl::OPTION_SHOW_SCALING][mode]);} {} } Function {readPrefs()} { - comment {read all preferences and refresh the GUI} private return_type void + comment {read all preferences and refresh the GUI} open private return_type void } { code {// read all preferences and refresh the GUI { - Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk"); + Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk"); Fl_Preferences opt_prefs(prefs, "options"); opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2); opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2); @@ -539,7 +544,7 @@ Function {readPrefs()} { opt_prefs.get("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING ][1], 2); } { - Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk"); + Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk"); Fl_Preferences opt_prefs(prefs, "options"); opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2); opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2); @@ -553,11 +558,11 @@ refreshUI();} {} } Function {writePrefs()} { - comment {write all preferences using the array} private return_type void + comment {write all preferences using the array} open private return_type void } { code {// write all preferences using the array { - Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk"); + Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk"); Fl_Preferences opt_prefs(prefs, "options"); if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus"); else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]); @@ -575,7 +580,7 @@ Function {writePrefs()} { else opt_prefs.set("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING][1]); } { - Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk"); + Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk"); Fl_Preferences opt_prefs(prefs, "options"); if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus"); else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]); @@ -594,7 +599,7 @@ Function {writePrefs()} { }} {} } -Function {show_global_settings_window()} {return_type void +Function {show_global_settings_window()} {open return_type void } { code {if (!global_settings_window) make_global_settings_window(); |
