Fix exit/return behavior in the id3 info screen.Fixes returning immediately on touchscreen.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30727 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-10-07 22:59:06 +00:00
parent 1195b2384f
commit b779fcc3ed
2 changed files with 16 additions and 5 deletions

View file

@ -978,9 +978,17 @@ static int view_cue_item_callback(int action,
MENUITEM_FUNCTION(view_cue_item, 0, ID2P(LANG_BROWSE_CUESHEET),
view_cue, NULL, view_cue_item_callback, Icon_NOICON);
static int browse_id3_wrapper(void)
{
if (browse_id3())
return GO_TO_ROOT;
return GO_TO_PREVIOUS;
}
/* CONTEXT_WPS items */
MENUITEM_FUNCTION(browse_id3_item, 0, ID2P(LANG_MENU_SHOW_ID3_INFO),
browse_id3, NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(browse_id3_item, MENU_FUNC_CHECK_RETVAL, ID2P(LANG_MENU_SHOW_ID3_INFO),
browse_id3_wrapper, NULL, NULL, Icon_NOICON);
#ifdef HAVE_PITCHSCREEN
MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH),
gui_syncpitchscreen_run, NULL, NULL, Icon_Audio);

View file

@ -774,10 +774,13 @@ bool browse_id3(void)
gui_synclist_draw(&id3_lists);
while (true) {
key = get_action(CONTEXT_LIST,HZ/2);
if(key!=ACTION_NONE && key!=ACTION_UNKNOWN
&& !gui_synclist_do_button(&id3_lists, &key,LIST_WRAP_UNLESS_HELD))
if(!gui_synclist_do_button(&id3_lists, &key,LIST_WRAP_UNLESS_HELD))
{
return(default_event_handler(key) == SYS_USB_CONNECTED);
if (key == ACTION_STD_OK || key == ACTION_STD_CANCEL)
return false;
else if (key == ACTION_STD_MENU ||
default_event_handler(key) == SYS_USB_CONNECTED)
return true;
}
}
}