summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2007-07-23 05:40:45 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2007-07-23 05:40:45 +0000
commitfe2b376060cfedb2d53b6025fcdef9cdd8604733 (patch)
treec13a789bac4c522757f0ccf245b524a1d76f8566 /apps/gui
parent8584a6bb5d8520b603b89d3fec8ffd13e399143c (diff)
downloadrockbox-fe2b376060cfedb2d53b6025fcdef9cdd8604733.zip
rockbox-fe2b376060cfedb2d53b6025fcdef9cdd8604733.tar.gz
rockbox-fe2b376060cfedb2d53b6025fcdef9cdd8604733.tar.bz2
rockbox-fe2b376060cfedb2d53b6025fcdef9cdd8604733.tar.xz
Fix the text for settings which have a different title than what is shown in the menu (i.e scroll options)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13962 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/option_select.c17
-rw-r--r--apps/gui/option_select.h3
2 files changed, 11 insertions, 9 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c
index 11352fd..6bb69c2 100644
--- a/apps/gui/option_select.c
+++ b/apps/gui/option_select.c
@@ -276,7 +276,8 @@ static void bool_funcwrapper(int value)
boolfunction(false);
}
-bool option_screen(struct settings_list *setting, bool use_temp_var)
+bool option_screen(struct settings_list *setting,
+ bool use_temp_var, unsigned char* option_title)
{
int action;
bool done = false;
@@ -286,7 +287,7 @@ bool option_screen(struct settings_list *setting, bool use_temp_var)
bool allow_wrap = ((int*)setting->setting != &global_settings.volume);
int var_type = setting->flags&F_T_MASK;
void (*function)(int) = NULL;
-
+ char *title;
if (var_type == F_T_INT || var_type == F_T_UINT)
{
variable = use_temp_var ? &temp_var: (int*)setting->setting;
@@ -303,11 +304,11 @@ bool option_screen(struct settings_list *setting, bool use_temp_var)
gui_synclist_init(&lists, value_setting_get_name_cb,
(void*)setting, false, 1);
if (setting->lang_id == -1)
- gui_synclist_set_title(&lists,
- (char*)setting->cfg_vals, Icon_Questionmark);
+ title = (char*)setting->cfg_vals;
else
- gui_synclist_set_title(&lists,
- str(setting->lang_id), Icon_Questionmark);
+ title = P2STR(option_title);
+
+ gui_synclist_set_title(&lists, title, Icon_Questionmark);
gui_synclist_set_icon_callback(&lists, NULL);
/* set the number of items and current selection */
@@ -466,7 +467,7 @@ bool set_option(const char* string, void* variable, enum optiontype type,
data.desc = (void*)strings; /* shutup gcc... */
data.option_callback = function;
item.choice_setting = &data;
- option_screen(&item, false);
+ option_screen(&item, false, NULL);
if (type == BOOL)
{
*(bool*)variable = (temp == 1? true: false);
@@ -496,7 +497,7 @@ bool set_int_ex(const unsigned char* string,
item.lang_id = -1;
item.cfg_vals = (char*)string;
item.setting = variable;
- return option_screen(&item, false);
+ return option_screen(&item, false, NULL);
}
/* to be replaced */
diff --git a/apps/gui/option_select.h b/apps/gui/option_select.h
index 8fc19db..e46570f 100644
--- a/apps/gui/option_select.h
+++ b/apps/gui/option_select.h
@@ -21,7 +21,8 @@
#define _GUI_OPTION_SELECT_H_
#include "settings.h"
-bool option_screen(struct settings_list *setting, bool use_temp_var);
+bool option_screen(struct settings_list *setting,
+ bool use_temp_var, unsigned char* option_title);
struct option_select
{