Index: trunk/apps/gui/option_select.c =================================================================== --- trunk.orig/apps/gui/option_select.c +++ trunk/apps/gui/option_select.c @@ -519,11 +519,13 @@ bool set_int_ex(const unsigned char* str /* to be replaced */ void option_select_init_items(struct option_select * opt, const char * title, + long title_voice_id, int selected, const struct opt_items * items, int nb_items) { opt->title=title; + opt->title_voice_id=title_voice_id; opt->min_value=0; opt->max_value=nb_items; opt->option=selected; Index: trunk/apps/gui/option_select.h =================================================================== --- trunk.orig/apps/gui/option_select.h +++ trunk/apps/gui/option_select.h @@ -27,6 +27,7 @@ bool option_screen(struct settings_list struct option_select { const char * title; + long title_voice_id; int min_value; int max_value; int option; @@ -42,6 +43,7 @@ struct option_select */ extern void option_select_init_items(struct option_select * opt, const char * title, + long title_voice_id, int selected, const struct opt_items * items, int nb_items); Index: trunk/apps/gui/quickscreen.c =================================================================== --- trunk.orig/apps/gui/quickscreen.c +++ trunk/apps/gui/quickscreen.c @@ -30,6 +30,8 @@ #include "misc.h" #include "statusbar.h" #include "action.h" +#include "lang.h" +#include "talk.h" void gui_quickscreen_init(struct gui_quickscreen * qs, struct option_select *left_option, @@ -132,6 +134,17 @@ static void gui_syncquickscreen_draw(str gui_quickscreen_draw(qs, &screens[i]); } +/* Speak an option's title and current selection */ +void talk_option(struct option_select *opt, bool enqueue) +{ + if (talk_menus_enabled()) + { + talk_id(opt->title_voice_id, enqueue); + if(opt->items) + talk_id(opt->items[opt->option].voice_id, true); + } +} + /* * Does the actions associated to the given button if any * - qs : the quickscreen @@ -145,18 +158,22 @@ static bool gui_quickscreen_do_button(st { case ACTION_QS_LEFT: option_select_next(qs->left_option); + talk_option(qs->left_option, false); return(true); case ACTION_QS_DOWN: option_select_next(qs->bottom_option); + talk_option(qs->bottom_option, false); return(true); case ACTION_QS_RIGHT: option_select_next(qs->right_option); + talk_option(qs->right_option, false); return(true); case ACTION_QS_DOWNINV: option_select_prev(qs->bottom_option); + talk_option(qs->bottom_option, false); return(true); } return(false); @@ -172,6 +189,13 @@ bool gui_syncquickscreen_run(struct gui_ bool can_quit=false; gui_syncquickscreen_draw(qs); gui_syncstatusbar_draw(&statusbars, 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_option(qs->left_option, true); + talk_option(qs->bottom_option, true); + talk_option(qs->right_option, true); while (true) { button = get_action(CONTEXT_QUICKSCREEN,TIMEOUT_BLOCK); if(default_event_handler(button) == SYS_USB_CONNECTED) @@ -194,6 +218,8 @@ bool gui_syncquickscreen_run(struct gui_ gui_syncstatusbar_draw(&statusbars, false); } + /* Notify that we're exiting this screen */ + cond_talk_ids_fq(VOICE_OK); return false; } Index: trunk/apps/screens.c =================================================================== --- trunk.orig/apps/screens.c +++ trunk/apps/screens.c @@ -676,17 +676,17 @@ bool quick_screen_quick(int button_enter lcd_setmargins(0, 0); option_select_init_items(&left_option, - (char *)str(LANG_SYSFONT_SHUFFLE), + (char *)STR(LANG_SYSFONT_SHUFFLE), bool_to_int(global_settings.playlist_shuffle), left_items, 2); option_select_init_items(&bottom_option, - (char *)str(LANG_SYSFONT_FILTER), + (char *)STR(LANG_SYSFONT_FILTER), global_settings.dirfilter, bottom_items, sizeof(bottom_items)/sizeof(struct opt_items)); option_select_init_items(&right_option, - (char *)str(LANG_SYSFONT_REPEAT), + (char *)STR(LANG_SYSFONT_REPEAT), global_settings.repeat_mode, right_items, sizeof(right_items)/sizeof(struct opt_items)); @@ -755,17 +755,17 @@ bool quick_screen_f3(int button_enter) lcd_setmargins(0, 0); option_select_init_items(&left_option, - str(LANG_SYSFONT_SCROLL_BAR), + STR(LANG_SYSFONT_SCROLL_BAR), bool_to_int(global_settings.scrollbar), onoff_items, 2); option_select_init_items(&bottom_option, - str(LANG_SYSFONT_FLIP_DISPLAY), + STR(LANG_SYSFONT_FLIP_DISPLAY), bool_to_int(global_settings.flip_display), yesno_items, 2); option_select_init_items(&right_option, - str(LANG_SYSFONT_STATUS_BAR), + STR(LANG_SYSFONT_STATUS_BAR), bool_to_int(global_settings.statusbar), onoff_items, 2); Index: trunk/apps/lang/english.lang =================================================================== --- trunk.orig/apps/lang/english.lang +++ trunk/apps/lang/english.lang @@ -11233,12 +11233,40 @@ *: none usbstack: "Device Driver" *: none usbstack: "Device Driver" *: none usbstack: "Device Driver" + + id: VOICE_QUICKSCREEN + desc: spoken only, Announces entering the "quick screen" + user: + + *: "" + + + *: "" + + + *: "Quick screen" + + + + id: VOICE_OK + desc: spoken only, On exiting a context, specifically the quick screen + user: + + *: "" + + + *: "" + + + *: "OK" + +