From 888890ad60df0a47db207c5d897a3ab3656d6130 Mon Sep 17 00:00:00 2001 From: Steve Bavin Date: Fri, 9 Mar 2007 16:54:35 +0000 Subject: Fix and simplify previous browser tracking. Auto-init the database when selected but not ready for use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12698 a1c6a512-1295-4272-9138-f99709370657 --- apps/lang/english.lang | 24 ++++++++++++------------ apps/root_menu.c | 40 +++++++++++++--------------------------- 2 files changed, 25 insertions(+), 39 deletions(-) (limited to 'apps') diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 9cbcb70404..7efdc2e285 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -10706,18 +10706,18 @@ desc: splash database building progress user: - *: "Building database... %d found (OFF for menu)" - h100,h120,h300: "Building database... %d found (STOP for menu)" - ipod*: "Building database... %d found (PLAY/PAUSE for menu)" - x5: "Building database... %d found (Long PLAY for menu)" - h10: "Building database... %d found (PREV for menu)" - - - *: "Building database... %d found (OFF for menu)" - h100,h120,h300: "Building database... %d found (STOP for menu)" - ipod*: "Building database... %d found (PLAY/PAUSE for menu)" - x5: "Building database... %d found (Long PLAY for menu)" - h10: "Building database... %d found (PREV for menu)" + *: "Building database... %d found (OFF to return)" + h100,h120,h300: "Building database... %d found (STOP to return)" + ipod*: "Building database... %d found (PLAY/PAUSE to return)" + x5: "Building database... %d found (Long PLAY to return)" + h10: "Building database... %d found (PREV to return)" + + + *: "Building database... %d found (OFF to return)" + h100,h120,h300: "Building database... %d found (STOP to return)" + ipod*: "Building database... %d found (PLAY/PAUSE to return)" + x5: "Building database... %d found (Long PLAY to return)" + h10: "Building database... %d found (PREV to return)" *: "" diff --git a/apps/root_menu.c b/apps/root_menu.c index 3b301e6d3a..49c31cb512 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -102,7 +102,6 @@ static int browser(void* param) break; #ifdef HAVE_TAGCACHE case GO_TO_DBBROWSER: -#if 0 /* Revert this for now */ if (!tagcache_is_usable()) { bool reinit_attempted = false; @@ -165,13 +164,6 @@ static int browser(void* param) } if (!tagcache_is_usable()) return GO_TO_PREVIOUS; -#else /* The old code */ - if ((last_screen != GO_TO_ROOT) && !tagcache_is_usable()) - { - gui_syncsplash(0, true, str(LANG_TAGCACHE_BUSY)); - return GO_TO_PREVIOUS; - } -#endif /* Sorry for the interruption */ filter = SHOW_ID3DB; tc->dirlevel = last_db_dirlevel; break; @@ -457,35 +449,29 @@ void root_menu(void) break; case GO_TO_PREVIOUS_BROWSER: -#ifdef HAVE_TAGCACHE - if ((previous_browser == GO_TO_DBBROWSER) && - !tagcache_is_usable()) - ret_val = GO_TO_FILEBROWSER; - else -#endif - ret_val = previous_browser; - /* fall through */ - case GO_TO_FILEBROWSER: -#ifdef HAVE_TAGCACHE - case GO_TO_DBBROWSER: -#endif - previous_browser = ret_val; + ret_val = previous_browser; break; case GO_TO_PREVIOUS_MUSIC: ret_val = previous_music; - /* fall through */ - case GO_TO_WPS: -#if CONFIG_TUNER - case GO_TO_FM: -#endif - previous_music = ret_val; break; } this_screen = ret_val; /* set the global_status.last_screen before entering, if we dont we will always return to the wrong screen on boot */ global_status.last_screen = (char)this_screen; + if (this_screen == GO_TO_FILEBROWSER +#ifdef HAVE_TAGCACHE + || this_screen == GO_TO_DBBROWSER +#endif + ) + previous_browser = this_screen; + if (this_screen == GO_TO_WPS +#ifdef CONFIG_TUNER + || this_screen == GO_TO_FM +#endif + ) + previous_music = this_screen; status_save(); action_signalscreenchange(); ret_val = items[this_screen].function(items[this_screen].param); -- cgit v1.2.3