summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Bavin <pondlife@pondlife.me>2007-03-09 16:54:35 +0000
committerSteve Bavin <pondlife@pondlife.me>2007-03-09 16:54:35 +0000
commit888890ad60df0a47db207c5d897a3ab3656d6130 (patch)
treebe8afa48fdb0f2f8c46781ee74297c765d6c257b
parentd7a4c4c4f3039e57975ea7a1ab05e77ed640af4f (diff)
downloadrockbox-888890ad60df0a47db207c5d897a3ab3656d6130.tar.gz
rockbox-888890ad60df0a47db207c5d897a3ab3656d6130.zip
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
-rw-r--r--apps/lang/english.lang24
-rw-r--r--apps/root_menu.c40
2 files changed, 25 insertions, 39 deletions
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:
<source>
- *: "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)"
- </source>
- <dest>
- *: "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)"
+ </source>
+ <dest>
+ *: "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)"
</dest>
<voice>
*: ""
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);