diff options
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r-- | apps/root_menu.c | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c index 9ff7325ce1..c59c39fe88 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -704,7 +704,7 @@ static int load_context_screen(int selection) | |||
704 | } | 704 | } |
705 | 705 | ||
706 | #ifdef HAVE_PICTUREFLOW_INTEGRATION | 706 | #ifdef HAVE_PICTUREFLOW_INTEGRATION |
707 | static int load_plugin_screen(char *plug_path) | 707 | static int load_plugin_screen(char *plug_path, void* plug_param) |
708 | { | 708 | { |
709 | int ret_val; | 709 | int ret_val; |
710 | int old_previous = last_screen; | 710 | int old_previous = last_screen; |
@@ -712,7 +712,7 @@ static int load_plugin_screen(char *plug_path) | |||
712 | global_status.last_screen = (char)next_screen; | 712 | global_status.last_screen = (char)next_screen; |
713 | status_save(); | 713 | status_save(); |
714 | 714 | ||
715 | switch (plugin_load(plug_path, NULL)) | 715 | switch (plugin_load(plug_path, plug_param)) |
716 | { | 716 | { |
717 | case PLUGIN_GOTO_WPS: | 717 | case PLUGIN_GOTO_WPS: |
718 | ret_val = GO_TO_WPS; | 718 | ret_val = GO_TO_WPS; |
@@ -729,20 +729,6 @@ static int load_plugin_screen(char *plug_path) | |||
729 | last_screen = (old_previous == next_screen) ? GO_TO_ROOT : old_previous; | 729 | last_screen = (old_previous == next_screen) ? GO_TO_ROOT : old_previous; |
730 | return ret_val; | 730 | return ret_val; |
731 | } | 731 | } |
732 | |||
733 | static bool check_database(void) | ||
734 | { | ||
735 | bool needwarn = true; | ||
736 | while ( !tagcache_is_usable() ) | ||
737 | { | ||
738 | if (needwarn) | ||
739 | splash(0, ID2P(LANG_TAGCACHE_BUSY)); | ||
740 | if ( action_userabort(HZ/5) ) | ||
741 | return false; | ||
742 | needwarn = false; | ||
743 | } | ||
744 | return true; | ||
745 | } | ||
746 | #endif | 732 | #endif |
747 | 733 | ||
748 | void root_menu(void) | 734 | void root_menu(void) |
@@ -823,18 +809,18 @@ void root_menu(void) | |||
823 | break; | 809 | break; |
824 | #ifdef HAVE_PICTUREFLOW_INTEGRATION | 810 | #ifdef HAVE_PICTUREFLOW_INTEGRATION |
825 | case GO_TO_PICTUREFLOW: | 811 | case GO_TO_PICTUREFLOW: |
826 | if (check_database()) | 812 | { |
827 | { | 813 | char pf_path[MAX_PATH]; |
828 | char pf_path[MAX_PATH]; | 814 | char activity[6];/* big enough to display int */ |
829 | snprintf(pf_path, sizeof(pf_path), | 815 | snprintf(activity, sizeof(activity), "%d", get_current_activity()); |
830 | "%s/pictureflow.rock", | 816 | snprintf(pf_path, sizeof(pf_path), |
831 | PLUGIN_DEMOS_DIR); | 817 | "%s/pictureflow.rock", |
832 | next_screen = load_plugin_screen(pf_path); | 818 | PLUGIN_DEMOS_DIR); |
833 | previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PICTUREFLOW; | 819 | |
834 | } | 820 | next_screen = load_plugin_screen(pf_path, &activity); |
835 | else | 821 | previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PICTUREFLOW; |
836 | next_screen = GO_TO_PREVIOUS; | ||
837 | break; | 822 | break; |
823 | } | ||
838 | #endif | 824 | #endif |
839 | default: | 825 | default: |
840 | #ifdef HAVE_TAGCACHE | 826 | #ifdef HAVE_TAGCACHE |