diff options
| author | Stéphane Doyon <s.doyon@videotron.ca> | 2008-05-04 15:02:46 +0000 |
|---|---|---|
| committer | Stéphane Doyon <s.doyon@videotron.ca> | 2008-05-04 15:02:46 +0000 |
| commit | 7e86e5d8669347921296887a20203c9da9801c40 (patch) | |
| tree | 1feabc167182e9f26670ee705321b89dc3ebcec6 | |
| parent | 27f59f64c66282933966034a26ca2566995b45ab (diff) | |
| download | rockbox-7e86e5d8669347921296887a20203c9da9801c40.zip rockbox-7e86e5d8669347921296887a20203c9da9801c40.tar.gz rockbox-7e86e5d8669347921296887a20203c9da9801c40.tar.bz2 rockbox-7e86e5d8669347921296887a20203c9da9801c40.tar.xz | |
Polish voicing of quickscreen: make it like in FS#6171: announce
"quickscreen" on entering, announce when leaving, say option name
when changing values in case the user isn't entirely familiar with
the layout...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17358 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/gui/quickscreen.c | 38 | ||||
| -rw-r--r-- | apps/lang/english.lang | 28 |
2 files changed, 49 insertions, 17 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index a2770a3..304d380 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c @@ -230,6 +230,17 @@ static int option_value(const struct settings_list *setting) else return *(int*)setting->setting; } + +void talk_qs_option(struct settings_list *opt, bool enqueue) +{ + if (global_settings.talk_menu) { + if(!enqueue) + talk_shutup(); + talk_id(opt->lang_id, true); + option_talk_value(opt, option_value(opt), true); + } +} + /* * Does the actions associated to the given button if any * - qs : the quickscreen @@ -258,9 +269,7 @@ static bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button) return false; } option_select_next_val((struct settings_list *)qs->items[item], false, true); - if (global_settings.talk_menu) - option_talk_value((struct settings_list *)qs->items[item], - option_value((struct settings_list *)qs->items[item]), false); + talk_qs_option((struct settings_list *)qs->items[item], false); return true; } @@ -283,20 +292,13 @@ bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter) quickscreen_fix_viewports(qs, &screens[i], &vp[i]); gui_quickscreen_draw(qs, &screens[i], &vp[i]); } - if (global_settings.talk_menu) - { - talk_id(qs->items[QUICKSCREEN_LEFT]->lang_id, false); - option_talk_value(qs->items[QUICKSCREEN_LEFT], - option_value(qs->items[QUICKSCREEN_LEFT]), true); - - talk_id(qs->items[QUICKSCREEN_RIGHT]->lang_id, true); - option_talk_value(qs->items[QUICKSCREEN_RIGHT], - option_value(qs->items[QUICKSCREEN_RIGHT]), true); - - talk_id(qs->items[QUICKSCREEN_BOTTOM]->lang_id, true); - option_talk_value(qs->items[QUICKSCREEN_BOTTOM], - option_value(qs->items[QUICKSCREEN_BOTTOM]), true); - } + /* Announce current selection on entering this screen. This is all + queued up, but can be interrupted as soon as a setting is + changed. */ + cond_talk_ids(VOICE_QUICKSCREEN); + talk_qs_option((struct settings_list *)qs->items[QUICKSCREEN_LEFT], true); + talk_qs_option((struct settings_list *)qs->items[QUICKSCREEN_BOTTOM], true); + talk_qs_option((struct settings_list *)qs->items[QUICKSCREEN_RIGHT], true); while (true) { button = get_action(CONTEXT_QUICKSCREEN,HZ/5); if(default_event_handler(button) == SYS_USB_CONNECTED) @@ -321,6 +323,8 @@ bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter) gui_syncstatusbar_draw(&statusbars, false); } + /* Notify that we're exiting this screen */ + cond_talk_ids_fq(VOICE_OK); return changed; } diff --git a/apps/lang/english.lang b/apps/lang/english.lang index dd1cfc3..e7cf17e 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -11660,3 +11660,31 @@ *: "Disable Study Mode" </voice> </phrase> +<phrase> + id: VOICE_QUICKSCREEN + desc: spoken only, Announces entering the "quick screen" + user: + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "Quick screen" + </voice> +</phrase> +<phrase> + id: VOICE_OK + desc: spoken only, On exiting a context, specifically the quick screen + user: + <source> + *: "" + </source> + <dest> + *: "" + </dest> + <voice> + *: "OK" + </voice> +</phrase> |