summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-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)
195 /* Check if ready status is known */ 195 /* Check if ready status is known */
196 if (!stat->readyvalid) 196 if (!stat->readyvalid)
197 { 197 {
198 splash(0, str(LANG_TAGCACHE_BUSY)); 198 splash(0, ID2P(LANG_TAGCACHE_BUSY));
199 continue; 199 continue;
200 } 200 }
201 201
@@ -741,6 +741,20 @@ static int load_plugin_screen(char *plug_path)
741 last_screen = (old_previous == next_screen) ? GO_TO_ROOT : old_previous; 741 last_screen = (old_previous == next_screen) ? GO_TO_ROOT : old_previous;
742 return ret_val; 742 return ret_val;
743} 743}
744
745static bool check_database(void)
746{
747 bool needwarn = true;
748 while ( !tagcache_is_usable() )
749 {
750 if (needwarn)
751 splash(0, ID2P(LANG_TAGCACHE_BUSY));
752 if ( action_userabort(HZ/5) )
753 return false;
754 needwarn = false;
755 }
756 return true;
757}
744#endif 758#endif
745 759
746void root_menu(void) 760void root_menu(void)
@@ -821,20 +835,17 @@ void root_menu(void)
821 break; 835 break;
822#ifdef HAVE_PICTUREFLOW_INTEGRATION 836#ifdef HAVE_PICTUREFLOW_INTEGRATION
823 case GO_TO_PICTUREFLOW: 837 case GO_TO_PICTUREFLOW:
824 while ( !tagcache_is_usable() ) 838 if (check_database())
825 {
826 splash(0, str(LANG_TAGCACHE_BUSY));
827 if ( action_userabort(HZ/5) )
828 break;
829 }
830 { 839 {
831 char pf_path[MAX_PATH]; 840 char pf_path[MAX_PATH];
832 snprintf(pf_path, sizeof(pf_path), 841 snprintf(pf_path, sizeof(pf_path),
833 "%s/pictureflow.rock", 842 "%s/pictureflow.rock",
834 PLUGIN_DEMOS_DIR); 843 PLUGIN_DEMOS_DIR);
835 next_screen = load_plugin_screen(pf_path); 844 next_screen = load_plugin_screen(pf_path);
845 previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PICTUREFLOW;
836 } 846 }
837 previous_browser = GO_TO_PICTUREFLOW; 847 else
848 next_screen = GO_TO_PREVIOUS;
838 break; 849 break;
839#endif 850#endif
840 default: 851 default: