summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2005-11-05 02:19:21 +0000
committerKevin Ferrare <kevin@rockbox.org>2005-11-05 02:19:21 +0000
commit81411a8226437c0e4cdd95e755a7245314d4edeb (patch)
tree37cd7cef5cb89d2aa47fd16db608903d01a9e14b /apps
parentd5eefe8bc78786ffb4361d3f15e0e7ea8161c155 (diff)
downloadrockbox-81411a8226437c0e4cdd95e755a7245314d4edeb.tar.gz
rockbox-81411a8226437c0e4cdd95e755a7245314d4edeb.zip
Corrected a bug introduced with the multi screen settings handling code : The current value wasn't voiced when entering the setting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7754 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/settings.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/apps/settings.c b/apps/settings.c
index dc0795e32f..6e863e7fa7 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -1377,6 +1377,22 @@ bool set_bool_options(const char* string, bool* variable,
return result;
}
+void talk_unit(int unit, int value)
+{
+ if (global_settings.talk_menu)
+ {
+ if (unit < UNIT_LAST)
+ { /* use the available unit definition */
+ talk_value(value, unit, false);
+ }
+ else
+ { /* say the number, followed by an arbitrary voice ID */
+ talk_number(value, false);
+ talk_id(unit, true);
+ }
+ }
+}
+
bool set_int(const char* string,
const char* unit,
int voice_unit,
@@ -1392,6 +1408,7 @@ bool set_int(const char* string,
struct gui_select select;
gui_select_init_numeric(&select, string, *variable, min, max, step, unit, formatter);
gui_syncselect_draw(&select);
+ talk_unit(voice_unit, *variable);
while (!gui_select_is_validated(&select))
{
button = button_get_w_tmo(HZ/2);
@@ -1399,18 +1416,7 @@ bool set_int(const char* string,
{
*variable=gui_select_get_selected(&select);
gui_syncselect_draw(&select);
- if (global_settings.talk_menu)
- {
- if (voice_unit < UNIT_LAST)
- { /* use the available unit definition */
- talk_value(*variable, voice_unit, false);
- }
- else
- { /* say the number, followed by an arbitrary voice ID */
- talk_number(*variable, false);
- talk_id(voice_unit, true);
- }
- }
+ talk_unit(voice_unit, *variable);
if ( function )
function(gui_select_get_selected(&select));
}
@@ -1456,6 +1462,8 @@ bool set_option(const char* string, void* variable, enum optiontype type,
struct gui_select select;
gui_select_init_items(&select, string, oldvalue, options, numoptions);
gui_syncselect_draw(&select);
+ if (global_settings.talk_menu)
+ talk_id(options[gui_select_get_selected(&select)].voice_id, false);
while ( !gui_select_is_validated(&select) )
{
gui_syncstatusbar_draw(&statusbars, true);