1
0
Fork 0
forked from len0rd/rockbox

Fix for issues in speaking the time in Rockbox Info screen (B#9167).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18309 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Stéphane Doyon 2008-08-18 00:58:47 +00:00
parent 9ffc30bec0
commit 50512d696d
2 changed files with 11 additions and 24 deletions

View file

@ -905,8 +905,6 @@ bool simplelist_show_list(struct simplelist_info *info)
if (info->get_name == NULL)
gui_synclist_set_nb_items(&lists, simplelist_line_count*info->selection_size);
gui_synclist_draw(&lists);
if (action != ACTION_NONE)
gui_synclist_speak_item(&lists);
old_line_count = simplelist_line_count;
}
else if(default_event_handler(action) == SYS_USB_CONNECTED)

View file

@ -289,7 +289,6 @@ static int info_speak_item(int selected_item, void * data)
#if CONFIG_RTC
struct tm *tm;
static int last_talk = 0;
#endif
switch (selected_item)
@ -300,8 +299,6 @@ static int info_speak_item(int selected_item, void * data)
break;
#if CONFIG_RTC
case INFO_TIME:
if (TIME_AFTER(current_tick, last_talk + HZ*60))
{
tm = get_time();
talk_id(VOICE_CURRENT_TIME, false);
if (valid_time(tm))
@ -312,8 +309,6 @@ static int info_speak_item(int selected_item, void * data)
{
talk_id(LANG_UNKNOWN, true);
}
last_talk = current_tick;
}
break;
case INFO_DATE:
tm = get_time();
@ -417,23 +412,17 @@ static int info_action_callback(int action, struct gui_synclist *lists)
(void) lists;
#endif
gui_synclist_speak_item(lists);
return ACTION_REDRAW;
}
#if CONFIG_RTC
else if (action == ACTION_NONE)
{
if ((global_settings.talk_menu && lists->selected_item == INFO_TIME) ||
(!global_settings.talk_menu &&
gui_synclist_item_is_onscreen(lists, 0, INFO_TIME)))
if (gui_synclist_item_is_onscreen(lists, 0, INFO_TIME))
{
static int last_redraw = 0;
if (TIME_AFTER(current_tick, last_redraw + HZ*5))
{
last_redraw = current_tick;
return ACTION_REDRAW;
}
}
}
#endif
return action;
}