Flip the order of some of the setting screens. (If any more are

backwards let me know in the thread or IRC)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12400 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2007-02-19 03:15:48 +00:00
parent 36175ac945
commit ac07222b83
3 changed files with 22 additions and 10 deletions

View file

@ -494,13 +494,24 @@ bool do_setting_from_menu(const struct menu_item_ex *temp)
}
if (setting->flags&F_INT_SETTING)
{
int min, max, step;
if (setting->flags&F_FLIPLIST)
{
min = setting->int_setting->max;
max = setting->int_setting->min;
step = -setting->int_setting->step;
}
else
{
max = setting->int_setting->max;
min = setting->int_setting->min;
step = setting->int_setting->step;
}
set_int_ex(str(setting->lang_id),
NULL,
setting->int_setting->unit,var,
setting->int_setting->option_callback,
setting->int_setting->step,
setting->int_setting->min,
setting->int_setting->max,
step, min, max,
setting->int_setting->formatter,
setting->int_setting->get_talk_id);
}

View file

@ -413,12 +413,12 @@ const struct settings_list settings[] = {
MAX_CONTRAST_SETTING, 1, NULL, NULL}}}},
#endif
#if CONFIG_BACKLIGHT
INT_SETTING_W_CFGVALS(0, backlight_timeout, LANG_BACKLIGHT, 6,
INT_SETTING_W_CFGVALS(F_FLIPLIST, backlight_timeout, LANG_BACKLIGHT, 6,
"backlight timeout", backlight_times_conf, UNIT_SEC,
0, 18, 1, backlight_formatter, backlight_getlang,
backlight_set_timeout),
#if CONFIG_CHARGING
INT_SETTING_W_CFGVALS(0, backlight_timeout_plugged,
INT_SETTING_W_CFGVALS(F_FLIPLIST, backlight_timeout_plugged,
LANG_BACKLIGHT_ON_WHEN_CHARGING, 11,
"backlight timeout plugged", backlight_times_conf, UNIT_SEC,
0, 18, 1, backlight_formatter, backlight_getlang,
@ -449,7 +449,7 @@ const struct settings_list settings[] = {
#endif /* HAVE_LCD_BITMAP */
OFFON_SETTING(0,show_icons, LANG_SHOW_ICONS ,true,"show icons", NULL),
/* system */
INT_SETTING_W_CFGVALS(0, poweroff, LANG_POWEROFF_IDLE, 10, "idle poweroff",
INT_SETTING_W_CFGVALS(F_FLIPLIST, poweroff, LANG_POWEROFF_IDLE, 10, "idle poweroff",
"off,1,2,3,4,5,6,7,8,9,10,15,30,45,60", UNIT_MIN,
0, 14, 1, poweroff_idle_timer_formatter,
poweroff_idle_timer_getlang, set_poweroff_timeout),
@ -502,12 +502,12 @@ const struct settings_list settings[] = {
LANG_INVERT_LCD_INVERSE, LANG_INVERT_LCD_NORMAL, lcd_remote_set_invert_display),
OFFON_SETTING(0,remote_flip_display, LANG_FLIP_DISPLAY,
false,"remote flip display", NULL),
INT_SETTING_W_CFGVALS(0, remote_backlight_timeout, LANG_BACKLIGHT, 6,
INT_SETTING_W_CFGVALS(F_FLIPLIST, remote_backlight_timeout, LANG_BACKLIGHT, 6,
"remote backlight timeout", backlight_times_conf, UNIT_SEC,
0, 18, 1, backlight_formatter, backlight_getlang,
remote_backlight_set_timeout),
#if CONFIG_CHARGING
INT_SETTING_W_CFGVALS(0, remote_backlight_timeout_plugged, LANG_BACKLIGHT, 11,
INT_SETTING_W_CFGVALS(F_FLIPLIST, remote_backlight_timeout_plugged, LANG_BACKLIGHT, 11,
"remote backlight timeout plugged", backlight_times_conf, UNIT_SEC,
0, 18, 1, backlight_formatter, backlight_getlang,
remote_backlight_set_timeout_plugged),
@ -600,7 +600,7 @@ const struct settings_list settings[] = {
OFFON_SETTING(0,play_selected,LANG_PLAY_SELECTED,true,"play selected",NULL),
OFFON_SETTING(0,party_mode,LANG_PARTY_MODE,false,"party mode",NULL),
OFFON_SETTING(0,fade_on_stop,LANG_FADE_ON_STOP,true,"volume fade",NULL),
INT_SETTING_W_CFGVALS(0, ff_rewind_min_step, LANG_FFRW_STEP, FF_REWIND_1000,
INT_SETTING_W_CFGVALS(F_FLIPLIST, ff_rewind_min_step, LANG_FFRW_STEP, FF_REWIND_1000,
"scan min step", "1,2,3,4,5,6,8,10,15,20,25,30,45,60", UNIT_SEC,
13, 0, -1, ff_rewind_min_step_formatter,
ff_rewind_min_step_getlang, NULL),

View file

@ -102,9 +102,10 @@ struct choice_setting {
- a NVRAM setting is removed
*/
#define F_TEMPVAR 0x400 /* used if the setting should be set using a temp var */
#define F_FLIPLIST 0x800 /* used if the order in the setting screen is backwards */
struct settings_list {
uint32_t flags; /* ____ ____ TFFF ____ NNN_ _TVC IFRB STTT */
uint32_t flags; /* ____ ____ TFFF ____ NNN_ FTVC IFRB STTT */
void *setting;
int lang_id; /* -1 for none */
union storage_type default_val;