summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2019-08-07 12:45:34 -0400
committerSolomon Peachy <pizza@shaftnet.org>2019-08-13 16:41:14 +0200
commitc46147c6b2a70068e71f4baa34e4ca0892ca4f92 (patch)
tree69c8568ea1ea69f886c4185d20d9acca4c917cff /apps/root_menu.c
parente3ed277f6813aa20876f6d4919040eaec62f9af0 (diff)
downloadrockbox-c46147c6b2a70068e71f4baa34e4ca0892ca4f92.tar.gz
rockbox-c46147c6b2a70068e71f4baa34e4ca0892ca4f92.tar.bz2
rockbox-c46147c6b2a70068e71f4baa34e4ca0892ca4f92.zip
Tweak how the pictureflow plugin is invoked
- Only load when database is ready - Assign to file browser only when returning to WPS - Minor speech fixes Patch by Igor Poretsky Re-synchronized by myself Change-Id: If9c943b3af415a2decd3dd5803d730bd790d09fe
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 7ec803f585..6b3e213831 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -195,7 +195,7 @@ static int browser(void* param)
/* Check if ready status is known */
if (!stat->readyvalid)
{
- splash(0, str(LANG_TAGCACHE_BUSY));
+ splash(0, ID2P(LANG_TAGCACHE_BUSY));
continue;
}
@@ -741,6 +741,20 @@ static int load_plugin_screen(char *plug_path)
last_screen = (old_previous == next_screen) ? GO_TO_ROOT : old_previous;
return ret_val;
}
+
+static bool check_database(void)
+{
+ bool needwarn = true;
+ while ( !tagcache_is_usable() )
+ {
+ if (needwarn)
+ splash(0, ID2P(LANG_TAGCACHE_BUSY));
+ if ( action_userabort(HZ/5) )
+ return false;
+ needwarn = false;
+ }
+ return true;
+}
#endif
void root_menu(void)
@@ -821,20 +835,17 @@ void root_menu(void)
break;
#ifdef HAVE_PICTUREFLOW_INTEGRATION
case GO_TO_PICTUREFLOW:
- while ( !tagcache_is_usable() )
- {
- splash(0, str(LANG_TAGCACHE_BUSY));
- if ( action_userabort(HZ/5) )
- break;
- }
+ if (check_database())
{
char pf_path[MAX_PATH];
snprintf(pf_path, sizeof(pf_path),
"%s/pictureflow.rock",
PLUGIN_DEMOS_DIR);
next_screen = load_plugin_screen(pf_path);
+ previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PICTUREFLOW;
}
- previous_browser = GO_TO_PICTUREFLOW;
+ else
+ next_screen = GO_TO_PREVIOUS;
break;
#endif
default: