mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-11 06:05:21 -05:00
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
This commit is contained in:
parent
27f59f64c6
commit
7e86e5d866
2 changed files with 49 additions and 17 deletions
|
|
@ -230,6 +230,17 @@ static int option_value(const struct settings_list *setting)
|
||||||
else
|
else
|
||||||
return *(int*)setting->setting;
|
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
|
* Does the actions associated to the given button if any
|
||||||
* - qs : the quickscreen
|
* - qs : the quickscreen
|
||||||
|
|
@ -258,9 +269,7 @@ static bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
option_select_next_val((struct settings_list *)qs->items[item], false, true);
|
option_select_next_val((struct settings_list *)qs->items[item], false, true);
|
||||||
if (global_settings.talk_menu)
|
talk_qs_option((struct settings_list *)qs->items[item], false);
|
||||||
option_talk_value((struct settings_list *)qs->items[item],
|
|
||||||
option_value((struct settings_list *)qs->items[item]), false);
|
|
||||||
return true;
|
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]);
|
quickscreen_fix_viewports(qs, &screens[i], &vp[i]);
|
||||||
gui_quickscreen_draw(qs, &screens[i], &vp[i]);
|
gui_quickscreen_draw(qs, &screens[i], &vp[i]);
|
||||||
}
|
}
|
||||||
if (global_settings.talk_menu)
|
/* Announce current selection on entering this screen. This is all
|
||||||
{
|
queued up, but can be interrupted as soon as a setting is
|
||||||
talk_id(qs->items[QUICKSCREEN_LEFT]->lang_id, false);
|
changed. */
|
||||||
option_talk_value(qs->items[QUICKSCREEN_LEFT],
|
cond_talk_ids(VOICE_QUICKSCREEN);
|
||||||
option_value(qs->items[QUICKSCREEN_LEFT]), true);
|
talk_qs_option((struct settings_list *)qs->items[QUICKSCREEN_LEFT], true);
|
||||||
|
talk_qs_option((struct settings_list *)qs->items[QUICKSCREEN_BOTTOM], true);
|
||||||
talk_id(qs->items[QUICKSCREEN_RIGHT]->lang_id, true);
|
talk_qs_option((struct settings_list *)qs->items[QUICKSCREEN_RIGHT], 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);
|
|
||||||
}
|
|
||||||
while (true) {
|
while (true) {
|
||||||
button = get_action(CONTEXT_QUICKSCREEN,HZ/5);
|
button = get_action(CONTEXT_QUICKSCREEN,HZ/5);
|
||||||
if(default_event_handler(button) == SYS_USB_CONNECTED)
|
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);
|
gui_syncstatusbar_draw(&statusbars, false);
|
||||||
}
|
}
|
||||||
|
/* Notify that we're exiting this screen */
|
||||||
|
cond_talk_ids_fq(VOICE_OK);
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11660,3 +11660,31 @@
|
||||||
*: "Disable Study Mode"
|
*: "Disable Study Mode"
|
||||||
</voice>
|
</voice>
|
||||||
</phrase>
|
</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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue