diff options
author | Steve Bavin <pondlife@pondlife.me> | 2007-03-09 16:54:35 +0000 |
---|---|---|
committer | Steve Bavin <pondlife@pondlife.me> | 2007-03-09 16:54:35 +0000 |
commit | 888890ad60df0a47db207c5d897a3ab3656d6130 (patch) | |
tree | be8afa48fdb0f2f8c46781ee74297c765d6c257b | |
parent | d7a4c4c4f3039e57975ea7a1ab05e77ed640af4f (diff) | |
download | rockbox-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.lang | 24 | ||||
-rw-r--r-- | apps/root_menu.c | 40 |
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 @@ | |||
10706 | desc: splash database building progress | 10706 | desc: splash database building progress |
10707 | user: | 10707 | user: |
10708 | <source> | 10708 | <source> |
10709 | *: "Building database... %d found (OFF for menu)" | 10709 | *: "Building database... %d found (OFF to return)" |
10710 | h100,h120,h300: "Building database... %d found (STOP for menu)" | 10710 | h100,h120,h300: "Building database... %d found (STOP to return)" |
10711 | ipod*: "Building database... %d found (PLAY/PAUSE for menu)" | 10711 | ipod*: "Building database... %d found (PLAY/PAUSE to return)" |
10712 | x5: "Building database... %d found (Long PLAY for menu)" | 10712 | x5: "Building database... %d found (Long PLAY to return)" |
10713 | h10: "Building database... %d found (PREV for menu)" | 10713 | h10: "Building database... %d found (PREV to return)" |
10714 | </source> | 10714 | </source> |
10715 | <dest> | 10715 | <dest> |
10716 | *: "Building database... %d found (OFF for menu)" | 10716 | *: "Building database... %d found (OFF to return)" |
10717 | h100,h120,h300: "Building database... %d found (STOP for menu)" | 10717 | h100,h120,h300: "Building database... %d found (STOP to return)" |
10718 | ipod*: "Building database... %d found (PLAY/PAUSE for menu)" | 10718 | ipod*: "Building database... %d found (PLAY/PAUSE to return)" |
10719 | x5: "Building database... %d found (Long PLAY for menu)" | 10719 | x5: "Building database... %d found (Long PLAY to return)" |
10720 | h10: "Building database... %d found (PREV for menu)" | 10720 | h10: "Building database... %d found (PREV to return)" |
10721 | </dest> | 10721 | </dest> |
10722 | <voice> | 10722 | <voice> |
10723 | *: "" | 10723 | *: "" |
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) | |||
102 | break; | 102 | break; |
103 | #ifdef HAVE_TAGCACHE | 103 | #ifdef HAVE_TAGCACHE |
104 | case GO_TO_DBBROWSER: | 104 | case GO_TO_DBBROWSER: |
105 | #if 0 /* Revert this for now */ | ||
106 | if (!tagcache_is_usable()) | 105 | if (!tagcache_is_usable()) |
107 | { | 106 | { |
108 | bool reinit_attempted = false; | 107 | bool reinit_attempted = false; |
@@ -165,13 +164,6 @@ static int browser(void* param) | |||
165 | } | 164 | } |
166 | if (!tagcache_is_usable()) | 165 | if (!tagcache_is_usable()) |
167 | return GO_TO_PREVIOUS; | 166 | return GO_TO_PREVIOUS; |
168 | #else /* The old code */ | ||
169 | if ((last_screen != GO_TO_ROOT) && !tagcache_is_usable()) | ||
170 | { | ||
171 | gui_syncsplash(0, true, str(LANG_TAGCACHE_BUSY)); | ||
172 | return GO_TO_PREVIOUS; | ||
173 | } | ||
174 | #endif /* Sorry for the interruption */ | ||
175 | filter = SHOW_ID3DB; | 167 | filter = SHOW_ID3DB; |
176 | tc->dirlevel = last_db_dirlevel; | 168 | tc->dirlevel = last_db_dirlevel; |
177 | break; | 169 | break; |
@@ -457,35 +449,29 @@ void root_menu(void) | |||
457 | break; | 449 | break; |
458 | 450 | ||
459 | case GO_TO_PREVIOUS_BROWSER: | 451 | case GO_TO_PREVIOUS_BROWSER: |
460 | #ifdef HAVE_TAGCACHE | 452 | ret_val = previous_browser; |
461 | if ((previous_browser == GO_TO_DBBROWSER) && | ||
462 | !tagcache_is_usable()) | ||
463 | ret_val = GO_TO_FILEBROWSER; | ||
464 | else | ||
465 | #endif | ||
466 | ret_val = previous_browser; | ||
467 | /* fall through */ | ||
468 | case GO_TO_FILEBROWSER: | ||
469 | #ifdef HAVE_TAGCACHE | ||
470 | case GO_TO_DBBROWSER: | ||
471 | #endif | ||
472 | previous_browser = ret_val; | ||
473 | break; | 453 | break; |
474 | 454 | ||
475 | case GO_TO_PREVIOUS_MUSIC: | 455 | case GO_TO_PREVIOUS_MUSIC: |
476 | ret_val = previous_music; | 456 | ret_val = previous_music; |
477 | /* fall through */ | ||
478 | case GO_TO_WPS: | ||
479 | #if CONFIG_TUNER | ||
480 | case GO_TO_FM: | ||
481 | #endif | ||
482 | previous_music = ret_val; | ||
483 | break; | 457 | break; |
484 | } | 458 | } |
485 | this_screen = ret_val; | 459 | this_screen = ret_val; |
486 | /* set the global_status.last_screen before entering, | 460 | /* set the global_status.last_screen before entering, |
487 | if we dont we will always return to the wrong screen on boot */ | 461 | if we dont we will always return to the wrong screen on boot */ |
488 | global_status.last_screen = (char)this_screen; | 462 | global_status.last_screen = (char)this_screen; |
463 | if (this_screen == GO_TO_FILEBROWSER | ||
464 | #ifdef HAVE_TAGCACHE | ||
465 | || this_screen == GO_TO_DBBROWSER | ||
466 | #endif | ||
467 | ) | ||
468 | previous_browser = this_screen; | ||
469 | if (this_screen == GO_TO_WPS | ||
470 | #ifdef CONFIG_TUNER | ||
471 | || this_screen == GO_TO_FM | ||
472 | #endif | ||
473 | ) | ||
474 | previous_music = this_screen; | ||
489 | status_save(); | 475 | status_save(); |
490 | action_signalscreenchange(); | 476 | action_signalscreenchange(); |
491 | ret_val = items[this_screen].function(items[this_screen].param); | 477 | ret_val = items[this_screen].function(items[this_screen].param); |