summaryrefslogtreecommitdiff
path: root/apps/settings_list.c
diff options
context:
space:
mode:
authorAlexander Levin <al.le@rockbox.org>2009-08-19 09:53:57 +0000
committerAlexander Levin <al.le@rockbox.org>2009-08-19 09:53:57 +0000
commit40f30e641f4ad454b9cd5bf825c1543b5d5c5ffa (patch)
tree037f96d2531575dd8bec216b7b6d8c467f2e6bad /apps/settings_list.c
parent1eeab430a1244d6dbb5d00d0e07da10361bb3903 (diff)
More comments in the settings macros
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22423 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_list.c')
-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 @@
- lang_id: LANG_* id to display in menus and setting screens for the setting
- default: the default value for the variable, set if settings are reset
- name: the name of the setting in config files
- - cfg_vals: comma seperated list of legal values in cfg files.
- NULL if a number is written to the file instead.
+ - cfg_vals: comma separated list of legal values to write to cfg files.
+ The values correspond to the values 0,1,2,etc. of the setting.
+ NULL if just the number itself should be written to the file.
+ No spaces between the values and the commas!
- cb: the callback used by the setting screen.
*/
@@ -91,15 +93,17 @@
or dont save as "off" or "on" in the cfg.
cfgvals are comma separated values (without spaces after the comma!) to write
for 'false' and 'true' (in this order)
+ yes_id is the lang_id for the 'yes' (or 'on') option in the menu
+ no_id is the lang_id for the 'no' (or 'off') option in the menu
*/
-#define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes,no,cb) \
+#define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes_id,no_id,cb)\
{flags|F_BOOL_SETTING, &global_settings.var, \
lang_id, BOOL(default),name,cfgvals, \
- {.bool_setting=(struct bool_setting[]){{cb,yes,no}}} }
+ {.bool_setting=(struct bool_setting[]){{cb,yes_id,no_id}}} }
/* bool setting which does use LANG_YES and _NO and save as "off,on" */
#define OFFON_SETTING(flags,var,lang_id,default,name,cb) \
- BOOL_SETTING(flags,var,lang_id,default,name,off_on, \
+ BOOL_SETTING(flags,var,lang_id,default,name,off_on, \
LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb)
/* int variable which is NOT saved to .cfg files,