summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-06-09 04:25:41 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-06-09 04:25:41 +0000
commitd871ff8cce9afe8437f7b51f4cd853018abd9924 (patch)
tree58f4372df6559179a790d499075972a6ce70dc71 /apps/root_menu.c
parent159612829648740f4b64accb9794c091b01bca58 (diff)
downloadrockbox-d871ff8cce9afe8437f7b51f4cd853018abd9924.tar.gz
rockbox-d871ff8cce9afe8437f7b51f4cd853018abd9924.tar.bz2
rockbox-d871ff8cce9afe8437f7b51f4cd853018abd9924.zip
FS#11270 by Chris Savery - WPS integration for pictureflow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26710 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index dab70f52c7..d1a05a0c13 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -68,6 +68,7 @@
#include "tagcache.h"
#endif
#include "language.h"
+#include "plugin.h"
struct root_items {
int (*function)(void* param);
@@ -544,6 +545,24 @@ static int load_context_screen(int selection)
return GO_TO_PREVIOUS;
}
+#ifdef HAVE_TAGCACHE
+static int load_plugin_screen(char *plug_path)
+{
+ int ret_val;
+ int old_previous = last_screen;
+ last_screen = next_screen;
+ global_status.last_screen = (char)next_screen;
+ status_save();
+
+ ret_val = plugin_load(plug_path, NULL);
+ if (ret_val == PLUGIN_OK)
+ ret_val = GO_TO_PREVIOUS;
+ if (ret_val == GO_TO_PREVIOUS)
+ last_screen = (old_previous == next_screen) ? GO_TO_ROOT : old_previous;
+ return ret_val;
+}
+#endif
+
static int previous_music = GO_TO_WPS;
void previous_music_is_wps(void)
@@ -619,6 +638,18 @@ void root_menu(void)
case GO_TO_ROOTITEM_CONTEXT:
next_screen = load_context_screen(selected);
break;
+#ifdef HAVE_TAGCACHE
+ case GO_TO_PICTUREFLOW:
+ while ( !tagcache_is_usable() )
+ {
+ splash(0, str(LANG_TAGCACHE_BUSY));
+ if ( action_userabort(HZ/5) )
+ break;
+ }
+ next_screen = load_plugin_screen(PLUGIN_DEMOS_DIR "/pictureflow.rock");
+ previous_browser = GO_TO_PICTUREFLOW;
+ break;
+#endif
default:
if (next_screen == GO_TO_FILEBROWSER
#ifdef HAVE_TAGCACHE