Index: apps/plugins/pictureflow/pictureflow.c =================================================================== --- apps/plugins/pictureflow/pictureflow.c (revision 26094) +++ apps/plugins/pictureflow/pictureflow.c (working copy) @@ -312,11 +312,19 @@ static int num_slides = 4; static int zoom = 100; static bool show_fps = false; +static int auto_wps = 0; +static int last_album = 0; static bool resize = true; static int cache_version = 0; static int show_album_name = (LCD_HEIGHT > 100) ? album_name_top : album_name_bottom; +static const struct opt_items wps_options[] = { + { "Off", -1 }, + { "Direct", -1 }, + { "Via Track list", -1 } +}; + static struct configdata config[] = { { TYPE_INT, 0, MAX_SPACING, { .int_p = &slide_spacing }, "slide spacing", @@ -330,7 +338,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_INT, 0, 2, { .int_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 +2082,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", "WPS Integration"); static const struct opt_items album_name_options[] = { { "Hide album title", -1 }, @@ -2135,6 +2145,9 @@ rb->remove(EMPTY_SLIDE); rb->splash(HZ, "Cache will be rebuilt on next restart"); break; + case 8: + rb->set_option("WPS Integration", &auto_wps, INT, wps_options, 3, NULL); + break; case MENU_ATTACHED_USB: return PLUGIN_USB_CONNECTED; @@ -2494,7 +2507,6 @@ int ret; rb->lcd_setfont(FONT_UI); - draw_splashscreen(); if ( ! rb->dir_exists( CACHE_PREFIX ) ) { if ( rb->mkdir( CACHE_PREFIX ) < 0 ) { @@ -2504,6 +2516,8 @@ } configfile_load(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION); + if(auto_wps == 0) + draw_splashscreen(); init_reflect_table(); @@ -2582,6 +2596,7 @@ recalc_offsets(); reset_slides(); + set_current_slide(last_album); char fpstxt[10]; int button; @@ -2716,11 +2731,24 @@ case PF_SELECT: if ( pf_state == pf_idle ) { - pf_state = pf_cover_in; +#if PF_PLAYBACK_CAPABLE + if(auto_wps == 1) { + show_track_list(); + start_playback(); + last_album = center_index; + return PLUGIN_GOTO_WPS; + } + else +#endif + pf_state = pf_cover_in; } else if ( pf_state == pf_show_tracks ) { #if PF_PLAYBACK_CAPABLE start_playback(); + if(auto_wps == 2) { + last_album = center_index; + return PLUGIN_GOTO_WPS; + } #endif } break; @@ -2760,7 +2788,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: apps/lang/english.lang =================================================================== --- apps/lang/english.lang (revision 26094) +++ apps/lang/english.lang (working copy) @@ -13731,4 +13731,17 @@ gigabeats: "3-D Enhancement" - + + id: LANG_ONPLAY_PICTUREFLOW + desc: Onplay pictureflow + user: core + + *: "PictureFlow" + + + *: "PictureFlow" + + + *: "open picture flow" + + \ No newline at end of file Index: apps/onplay.c =================================================================== --- apps/onplay.c (revision 26094) +++ 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: apps/gui/wps.c =================================================================== --- apps/gui/wps.c (revision 26094) +++ 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: apps/onplay.h =================================================================== --- apps/onplay.h (revision 26094) +++ apps/onplay.h (working copy) @@ -43,6 +43,7 @@ HOTKEY_DELETE, HOTKEY_INSERT, HOTKEY_INSERT_SHUFFLED, + HOTKEY_PICTUREFLOW, }; #endif Index: apps/settings_list.c =================================================================== --- apps/settings_list.c (revision 26094) +++ apps/settings_list.c (working copy) @@ -1783,10 +1783,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,pictureflow", + 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",