Index: src/apps/lang/english.lang =================================================================== --- src/apps/lang/english.lang (revision 25992) +++ src/apps/lang/english.lang (working copy) @@ -13595,3 +13595,17 @@ radio: "" + + id: LANG_ONPLAY_PICTUREFLOW + desc: Onplay pictureflow + user: core + + *: "PictureFlow" + + + *: "PictureFlow" + + + *: "open picture flow" + + Index: src/apps/plugins/pictureflow/pictureflow.c =================================================================== --- src/apps/plugins/pictureflow/pictureflow.c (revision 25992) +++ src/apps/plugins/pictureflow/pictureflow.c (working copy) @@ -312,6 +312,8 @@ static int num_slides = 4; static int zoom = 100; static bool show_fps = false; +static bool auto_wps = false; +static int last_album = 0; static bool resize = true; static int cache_version = 0; static int show_album_name = (LCD_HEIGHT > 100) @@ -330,7 +332,9 @@ { TYPE_BOOL, 0, 1, { .bool_p = &resize }, "resize", NULL }, { TYPE_INT, 0, 100, { .int_p = &cache_version }, "cache version", NULL }, { TYPE_ENUM, 0, 2, { .int_p = &show_album_name }, "show album name", - show_album_name_conf } + show_album_name_conf }, + { TYPE_BOOL, 0, 1, { .bool_p = &auto_wps }, "auto wps", NULL }, + { TYPE_INT, 0, 999999, { .int_p = &last_album }, "last album", NULL } }; #define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata)) @@ -2072,7 +2076,7 @@ MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", "Spacing", "Centre margin", "Number of slides", "Zoom", - "Show album title", "Resize Covers", "Rebuild cache"); + "Show album title", "Resize Covers", "Rebuild cache", "Auto WPS"); static const struct opt_items album_name_options[] = { { "Hide album title", -1 }, @@ -2135,6 +2139,9 @@ rb->remove(EMPTY_SLIDE); rb->splash(HZ, "Cache will be rebuilt on next restart"); break; + case 8: + rb->set_bool("Auto WPS", &auto_wps); + break; case MENU_ATTACHED_USB: return PLUGIN_USB_CONNECTED; @@ -2494,7 +2501,6 @@ int ret; rb->lcd_setfont(FONT_UI); - draw_splashscreen(); if ( ! rb->dir_exists( CACHE_PREFIX ) ) { if ( rb->mkdir( CACHE_PREFIX ) < 0 ) { @@ -2504,6 +2510,8 @@ } configfile_load(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION); + if(!auto_wps) + draw_splashscreen(); init_reflect_table(); @@ -2582,6 +2590,7 @@ recalc_offsets(); reset_slides(); + set_current_slide(last_album); char fpstxt[10]; int button; @@ -2721,6 +2730,10 @@ else if ( pf_state == pf_show_tracks ) { #if PF_PLAYBACK_CAPABLE start_playback(); + if(auto_wps) { + last_album = center_index; + return PLUGIN_GOTO_WPS; + } #endif } break; @@ -2760,7 +2773,7 @@ #endif #endif ret = main(); - if ( ret == PLUGIN_OK ) { + if ( ret == PLUGIN_OK || ret == PLUGIN_GOTO_WPS) { if (configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION)) { Index: src/apps/onplay.c =================================================================== --- src/apps/onplay.c (revision 25992) +++ src/apps/onplay.c (working copy) @@ -1195,6 +1195,12 @@ return list_viewers(); } +static bool open_pictureflow(void) +{ + plugin_load(PLUGIN_DEMOS_DIR "/pictureflow.rock", NULL); + return ONPLAY_OK; +} + static int playlist_insert_shuffled(void) { if ((audio_status() & AUDIO_STATUS_PLAY) || @@ -1244,6 +1250,9 @@ { HOTKEY_INSERT_SHUFFLED, LANG_INSERT_SHUFFLED, HOTKEY_FUNC(playlist_insert_shuffled, NULL), ONPLAY_OK }, + { HOTKEY_PICTUREFLOW, LANG_ONPLAY_PICTUREFLOW, + HOTKEY_FUNC(open_pictureflow, NULL), + ONPLAY_OK }, }; /* Return the language ID for this action */ Index: src/apps/gui/wps.c =================================================================== --- src/apps/gui/wps.c (revision 25992) +++ src/apps/gui/wps.c (working copy) @@ -66,6 +66,7 @@ #include "playlist_viewer.h" #include "wps.h" #include "statusbar-skinned.h" +#include "plugin.h" #define RESTORE_WPS_INSTANTLY 0l #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) @@ -1213,6 +1214,8 @@ #endif if (global_settings.browse_current) return GO_TO_PREVIOUS_BROWSER; + if(global_settings.hotkey_wps == HOTKEY_PICTUREFLOW) + return plugin_load(PLUGIN_DEMOS_DIR "/pictureflow.rock", NULL); return GO_TO_PREVIOUS; } Index: src/apps/onplay.h =================================================================== --- src/apps/onplay.h (revision 25992) +++ src/apps/onplay.h (working copy) @@ -43,6 +43,7 @@ HOTKEY_DELETE, HOTKEY_INSERT, HOTKEY_INSERT_SHUFFLED, + HOTKEY_PICTUREFLOW, }; #endif Index: src/apps/settings_list.c =================================================================== --- src/apps/settings_list.c (revision 25992) +++ src/apps/settings_list.c (working copy) @@ -1689,10 +1689,10 @@ #ifdef HAVE_HOTKEY TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_wps, LANG_HOTKEY_WPS, HOTKEY_VIEW_PLAYLIST, "hotkey wps", - "off,view playlist,show track info,pitchscreen,open with,delete", - UNIT_INT, hotkey_formatter, hotkey_getlang, NULL, 6, HOTKEY_OFF, + "off,view playlist,show track info,pitchscreen,open with,delete,plugin", + UNIT_INT, hotkey_formatter, hotkey_getlang, NULL, 7, HOTKEY_OFF, HOTKEY_VIEW_PLAYLIST, HOTKEY_SHOW_TRACK_INFO, HOTKEY_PITCHSCREEN, - HOTKEY_OPEN_WITH, HOTKEY_DELETE), + HOTKEY_OPEN_WITH, HOTKEY_DELETE, HOTKEY_PICTUREFLOW), TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_tree, LANG_HOTKEY_FILE_BROWSER, HOTKEY_OFF, "hotkey tree", "off,open with,delete,insert,insert shuffled",