summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/settings_list.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 3d3b888c2d..b43e9ce4ed 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -76,8 +76,10 @@
76 - lang_id: LANG_* id to display in menus and setting screens for the setting 76 - lang_id: LANG_* id to display in menus and setting screens for the setting
77 - default: the default value for the variable, set if settings are reset 77 - default: the default value for the variable, set if settings are reset
78 - name: the name of the setting in config files 78 - name: the name of the setting in config files
79 - cfg_vals: comma seperated list of legal values in cfg files. 79 - cfg_vals: comma separated list of legal values to write to cfg files.
80 NULL if a number is written to the file instead. 80 The values correspond to the values 0,1,2,etc. of the setting.
81 NULL if just the number itself should be written to the file.
82 No spaces between the values and the commas!
81 - cb: the callback used by the setting screen. 83 - cb: the callback used by the setting screen.
82*/ 84*/
83 85
@@ -91,15 +93,17 @@
91 or dont save as "off" or "on" in the cfg. 93 or dont save as "off" or "on" in the cfg.
92 cfgvals are comma separated values (without spaces after the comma!) to write 94 cfgvals are comma separated values (without spaces after the comma!) to write
93 for 'false' and 'true' (in this order) 95 for 'false' and 'true' (in this order)
96 yes_id is the lang_id for the 'yes' (or 'on') option in the menu
97 no_id is the lang_id for the 'no' (or 'off') option in the menu
94 */ 98 */
95#define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes,no,cb) \ 99#define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes_id,no_id,cb)\
96 {flags|F_BOOL_SETTING, &global_settings.var, \ 100 {flags|F_BOOL_SETTING, &global_settings.var, \
97 lang_id, BOOL(default),name,cfgvals, \ 101 lang_id, BOOL(default),name,cfgvals, \
98 {.bool_setting=(struct bool_setting[]){{cb,yes,no}}} } 102 {.bool_setting=(struct bool_setting[]){{cb,yes_id,no_id}}} }
99 103
100/* bool setting which does use LANG_YES and _NO and save as "off,on" */ 104/* bool setting which does use LANG_YES and _NO and save as "off,on" */
101#define OFFON_SETTING(flags,var,lang_id,default,name,cb) \ 105#define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
102 BOOL_SETTING(flags,var,lang_id,default,name,off_on, \ 106 BOOL_SETTING(flags,var,lang_id,default,name,off_on, \
103 LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb) 107 LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb)
104 108
105/* int variable which is NOT saved to .cfg files, 109/* int variable which is NOT saved to .cfg files,