Index: src/apps/root_menu.c =================================================================== --- src/apps/root_menu.c (revision 26249) +++ src/apps/root_menu.c (working copy) @@ -37,6 +37,7 @@ #include "power.h" #include "talk.h" #include "audio.h" +#include "plugin.h" #ifdef HAVE_HOTSWAP #include "storage.h" @@ -365,6 +366,20 @@ } return retval; } +static int pictureflow_shortcut(void* param) +{ +int ret_val = GO_TO_PREVIOUS; + (void)param; + plugin_load(PLUGIN_DEMOS_DIR "/pictureflow.rock", NULL); +/* Check if something is playing and therefore if it is possible to go to the WPS + without falling in a "Nothing to Resume > GO_TO_PREVIOUS > pictureflow.rock" loop*/ + if (audio_status()) + { + ret_val = GO_TO_WPS; + } + return ret_val; +} + int time_screen(void* ignored); /* These are all static const'd from apps/menus/ *.c @@ -398,6 +413,7 @@ [GO_TO_RECENTBMARKS] = { load_bmarks, NULL, &bookmark_settings_menu }, [GO_TO_BROWSEPLUGINS] = { plugins_menu, NULL, NULL }, [GO_TO_PLAYLIST_VIEWER] = { playlist_view, NULL, NULL }, + [GO_TO_PICTUREFLOW_SHORTCUT] = { pictureflow_shortcut, NULL, NULL }, }; static const int nb_items = sizeof(items)/sizeof(*items); @@ -412,6 +428,10 @@ #endif MENUITEM_RETURNVALUE(rocks_browser, ID2P(LANG_PLUGINS), GO_TO_BROWSEPLUGINS, NULL, Icon_Plugin); + +MENUITEM_RETURNVALUE(pictureflow_shortcut_item, ID2P(LANG_ONPLAY_PICTUREFLOW), GO_TO_PICTUREFLOW_SHORTCUT, + NULL, Icon_Plugin); + static char *get_wps_item_name(int selected_item, void * data, char *buffer) { (void)selected_item; (void)data; (void)buffer; @@ -454,6 +474,7 @@ #ifdef HAVE_TAGCACHE &db_browser, #endif + &pictureflow_shortcut_item, &wps_item, &menu_, #ifdef HAVE_RECORDING &rec, Index: src/apps/root_menu.h =================================================================== --- src/apps/root_menu.h (revision 26249) +++ src/apps/root_menu.h (working copy) @@ -53,6 +53,7 @@ GO_TO_BROWSEPLUGINS, GO_TO_TIMESCREEN, GO_TO_PLAYLIST_VIEWER, + GO_TO_PICTUREFLOW_SHORTCUT, }; extern const struct menu_item_ex root_menu_;