diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/wps.c | 2 | ||||
-rw-r--r-- | apps/lang/english.lang | 14 | ||||
-rw-r--r-- | apps/onplay.c | 18 | ||||
-rw-r--r-- | apps/onplay.h | 2 | ||||
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 91 | ||||
-rw-r--r-- | apps/root_menu.c | 31 | ||||
-rw-r--r-- | apps/root_menu.h | 1 | ||||
-rw-r--r-- | apps/settings_list.c | 23 |
8 files changed, 157 insertions, 25 deletions
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index fa97e50897..1fa159ec0f 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -841,6 +841,8 @@ long gui_wps_show(void) | |||
841 | return GO_TO_ROOT; | 841 | return GO_TO_ROOT; |
842 | else if (retval == ONPLAY_PLAYLIST) | 842 | else if (retval == ONPLAY_PLAYLIST) |
843 | return GO_TO_PLAYLIST_VIEWER; | 843 | return GO_TO_PLAYLIST_VIEWER; |
844 | else if (retval == ONPLAY_PICTUREFLOW) | ||
845 | return GO_TO_PICTUREFLOW; | ||
844 | restore = true; | 846 | restore = true; |
845 | } | 847 | } |
846 | break; | 848 | break; |
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 4527c4aa45..49ce9b25a1 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -12540,3 +12540,17 @@ | |||
12540 | *: "Force" | 12540 | *: "Force" |
12541 | </voice> | 12541 | </voice> |
12542 | </phrase> | 12542 | </phrase> |
12543 | <phrase> | ||
12544 | id: LANG_ONPLAY_PICTUREFLOW | ||
12545 | desc: Onplay pictureflow | ||
12546 | user: core | ||
12547 | <source> | ||
12548 | *: "PictureFlow" | ||
12549 | </source> | ||
12550 | <dest> | ||
12551 | *: "PictureFlow" | ||
12552 | </dest> | ||
12553 | <voice> | ||
12554 | *: "open picture flow" | ||
12555 | </voice> | ||
12556 | </phrase> | ||
diff --git a/apps/onplay.c b/apps/onplay.c index 556da1cde2..e27a7a35a9 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -929,6 +929,8 @@ static int ratingitem_callback(int action,const struct menu_item_ex *this_item) | |||
929 | MENUITEM_FUNCTION(rating_item, 0, ID2P(LANG_MENU_SET_RATING), | 929 | MENUITEM_FUNCTION(rating_item, 0, ID2P(LANG_MENU_SET_RATING), |
930 | set_rating_inline, NULL, | 930 | set_rating_inline, NULL, |
931 | ratingitem_callback, Icon_Questionmark); | 931 | ratingitem_callback, Icon_Questionmark); |
932 | MENUITEM_RETURNVALUE(pictureflow_item, ID2P(LANG_ONPLAY_PICTUREFLOW), | ||
933 | GO_TO_PICTUREFLOW, NULL, Icon_NOICON); | ||
932 | #endif | 934 | #endif |
933 | 935 | ||
934 | static bool view_cue(void) | 936 | static bool view_cue(void) |
@@ -1131,7 +1133,11 @@ MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), | |||
1131 | #ifdef HAVE_TAGCACHE | 1133 | #ifdef HAVE_TAGCACHE |
1132 | &rating_item, | 1134 | &rating_item, |
1133 | #endif | 1135 | #endif |
1134 | &bookmark_menu, &browse_id3_item, &list_viewers_item, | 1136 | &bookmark_menu, |
1137 | #ifdef HAVE_TAGCACHE | ||
1138 | &pictureflow_item, | ||
1139 | #endif | ||
1140 | &browse_id3_item, &list_viewers_item, | ||
1135 | &delete_file_item, &view_cue_item, | 1141 | &delete_file_item, &view_cue_item, |
1136 | #ifdef HAVE_PITCHSCREEN | 1142 | #ifdef HAVE_PITCHSCREEN |
1137 | &pitch_screen_item, | 1143 | &pitch_screen_item, |
@@ -1244,6 +1250,11 @@ static struct hotkey_assignment hotkey_items[] = { | |||
1244 | { HOTKEY_INSERT_SHUFFLED, LANG_INSERT_SHUFFLED, | 1250 | { HOTKEY_INSERT_SHUFFLED, LANG_INSERT_SHUFFLED, |
1245 | HOTKEY_FUNC(playlist_insert_shuffled, NULL), | 1251 | HOTKEY_FUNC(playlist_insert_shuffled, NULL), |
1246 | ONPLAY_OK }, | 1252 | ONPLAY_OK }, |
1253 | #ifdef HAVE_TAGCACHE | ||
1254 | { HOTKEY_PICTUREFLOW, LANG_ONPLAY_PICTUREFLOW, | ||
1255 | HOTKEY_FUNC(NULL, NULL), | ||
1256 | ONPLAY_PICTUREFLOW }, | ||
1257 | #endif | ||
1247 | }; | 1258 | }; |
1248 | 1259 | ||
1249 | /* Return the language ID for this action */ | 1260 | /* Return the language ID for this action */ |
@@ -1316,6 +1327,7 @@ int onplay(char* file, int attr, int from, bool hotkey) | |||
1316 | else | 1327 | else |
1317 | menu = &tree_onplay_menu; | 1328 | menu = &tree_onplay_menu; |
1318 | menu_selection = do_menu(menu, NULL, NULL, false); | 1329 | menu_selection = do_menu(menu, NULL, NULL, false); |
1330 | |||
1319 | switch (menu_selection) | 1331 | switch (menu_selection) |
1320 | { | 1332 | { |
1321 | case GO_TO_WPS: | 1333 | case GO_TO_WPS: |
@@ -1325,6 +1337,10 @@ int onplay(char* file, int attr, int from, bool hotkey) | |||
1325 | return ONPLAY_MAINMENU; | 1337 | return ONPLAY_MAINMENU; |
1326 | case GO_TO_PLAYLIST_VIEWER: | 1338 | case GO_TO_PLAYLIST_VIEWER: |
1327 | return ONPLAY_PLAYLIST; | 1339 | return ONPLAY_PLAYLIST; |
1340 | #ifdef HAVE_TAGCACHE | ||
1341 | case GO_TO_PICTUREFLOW: | ||
1342 | return ONPLAY_PICTUREFLOW; | ||
1343 | #endif | ||
1328 | default: | 1344 | default: |
1329 | return onplay_result; | 1345 | return onplay_result; |
1330 | } | 1346 | } |
diff --git a/apps/onplay.h b/apps/onplay.h index 8462603bcc..b129296a7b 100644 --- a/apps/onplay.h +++ b/apps/onplay.h | |||
@@ -29,6 +29,7 @@ enum { | |||
29 | ONPLAY_RELOAD_DIR, | 29 | ONPLAY_RELOAD_DIR, |
30 | ONPLAY_START_PLAY, | 30 | ONPLAY_START_PLAY, |
31 | ONPLAY_PLAYLIST, | 31 | ONPLAY_PLAYLIST, |
32 | ONPLAY_PICTUREFLOW, | ||
32 | }; | 33 | }; |
33 | 34 | ||
34 | #ifdef HAVE_HOTKEY | 35 | #ifdef HAVE_HOTKEY |
@@ -43,6 +44,7 @@ enum hotkey_action { | |||
43 | HOTKEY_DELETE, | 44 | HOTKEY_DELETE, |
44 | HOTKEY_INSERT, | 45 | HOTKEY_INSERT, |
45 | HOTKEY_INSERT_SHUFFLED, | 46 | HOTKEY_INSERT_SHUFFLED, |
47 | HOTKEY_PICTUREFLOW, | ||
46 | }; | 48 | }; |
47 | #endif | 49 | #endif |
48 | 50 | ||
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 155b495ebf..3a150d10c0 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -58,6 +58,7 @@ PLUGIN_HEADER | |||
58 | #define PF_WPS ACTION_TREE_WPS | 58 | #define PF_WPS ACTION_TREE_WPS |
59 | 59 | ||
60 | #define PF_QUIT (LAST_ACTION_PLACEHOLDER + 1) | 60 | #define PF_QUIT (LAST_ACTION_PLACEHOLDER + 1) |
61 | #define PF_TRACKLIST (LAST_ACTION_PLACEHOLDER + 2) | ||
61 | 62 | ||
62 | #if defined(HAVE_SCROLLWHEEL) || CONFIG_KEYPAD == IRIVER_H10_PAD || \ | 63 | #if defined(HAVE_SCROLLWHEEL) || CONFIG_KEYPAD == IRIVER_H10_PAD || \ |
63 | CONFIG_KEYPAD == SAMSUNG_YH_PAD | 64 | CONFIG_KEYPAD == SAMSUNG_YH_PAD |
@@ -120,6 +121,7 @@ const struct button_mapping pf_context_buttons[] = | |||
120 | {PF_QUIT, BUTTON_POWER, BUTTON_NONE}, | 121 | {PF_QUIT, BUTTON_POWER, BUTTON_NONE}, |
121 | #elif CONFIG_KEYPAD == SANSA_FUZE_PAD | 122 | #elif CONFIG_KEYPAD == SANSA_FUZE_PAD |
122 | {PF_QUIT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE}, | 123 | {PF_QUIT, BUTTON_HOME|BUTTON_REPEAT, BUTTON_NONE}, |
124 | {PF_TRACKLIST, BUTTON_RIGHT, BUTTON_NONE}, | ||
123 | /* These all use short press of BUTTON_POWER for menu, map long POWER to quit | 125 | /* These all use short press of BUTTON_POWER for menu, map long POWER to quit |
124 | */ | 126 | */ |
125 | #elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_M200_PAD || \ | 127 | #elif CONFIG_KEYPAD == SANSA_C200_PAD || CONFIG_KEYPAD == SANSA_M200_PAD || \ |
@@ -311,6 +313,8 @@ static int center_margin = (LCD_WIDTH - DISPLAY_WIDTH) / 12; | |||
311 | static int num_slides = 4; | 313 | static int num_slides = 4; |
312 | static int zoom = 100; | 314 | static int zoom = 100; |
313 | static bool show_fps = false; | 315 | static bool show_fps = false; |
316 | static int auto_wps = 0; | ||
317 | static int last_album = 0; | ||
314 | static bool resize = true; | 318 | static bool resize = true; |
315 | static int cache_version = 0; | 319 | static int cache_version = 0; |
316 | static int show_album_name = (LCD_HEIGHT > 100) | 320 | static int show_album_name = (LCD_HEIGHT > 100) |
@@ -328,8 +332,10 @@ static struct configdata config[] = | |||
328 | { TYPE_BOOL, 0, 1, { .bool_p = &show_fps }, "show fps", NULL }, | 332 | { TYPE_BOOL, 0, 1, { .bool_p = &show_fps }, "show fps", NULL }, |
329 | { TYPE_BOOL, 0, 1, { .bool_p = &resize }, "resize", NULL }, | 333 | { TYPE_BOOL, 0, 1, { .bool_p = &resize }, "resize", NULL }, |
330 | { TYPE_INT, 0, 100, { .int_p = &cache_version }, "cache version", NULL }, | 334 | { TYPE_INT, 0, 100, { .int_p = &cache_version }, "cache version", NULL }, |
331 | { TYPE_ENUM, 0, 2, { .int_p = &show_album_name }, "show album name", | 335 | { TYPE_ENUM, 0, 3, { .int_p = &show_album_name }, "show album name", |
332 | show_album_name_conf } | 336 | show_album_name_conf }, |
337 | { TYPE_INT, 0, 2, { .int_p = &auto_wps }, "auto wps", NULL }, | ||
338 | { TYPE_INT, 0, 999999, { .int_p = &last_album }, "last album", NULL } | ||
333 | }; | 339 | }; |
334 | 340 | ||
335 | #define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata)) | 341 | #define CONFIG_NUM_ITEMS (sizeof(config) / sizeof(struct configdata)) |
@@ -782,6 +788,18 @@ char* get_track_filename(const int track_index) | |||
782 | return track_names + tracks[track_index].filename_idx; | 788 | return track_names + tracks[track_index].filename_idx; |
783 | return 0; | 789 | return 0; |
784 | } | 790 | } |
791 | |||
792 | int get_wps_current_index(void) | ||
793 | { | ||
794 | struct mp3entry *id3 = rb->audio_current_track(); | ||
795 | if(id3 && id3->album) { | ||
796 | int i; | ||
797 | for( i=0; i < album_count; i++ ) | ||
798 | if(!rb->strcmp(album_names + album[i].name_idx, id3->album)) | ||
799 | return i; | ||
800 | } | ||
801 | return last_album; | ||
802 | } | ||
785 | #endif | 803 | #endif |
786 | /** | 804 | /** |
787 | Compare two unsigned ints passed via pointers. | 805 | Compare two unsigned ints passed via pointers. |
@@ -2071,13 +2089,19 @@ int settings_menu(void) | |||
2071 | 2089 | ||
2072 | MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", | 2090 | MENUITEM_STRINGLIST(settings_menu, "PictureFlow Settings", NULL, "Show FPS", |
2073 | "Spacing", "Centre margin", "Number of slides", "Zoom", | 2091 | "Spacing", "Centre margin", "Number of slides", "Zoom", |
2074 | "Show album title", "Resize Covers", "Rebuild cache"); | 2092 | "Show album title", "Resize Covers", "Rebuild cache", |
2093 | "WPS Integration"); | ||
2075 | 2094 | ||
2076 | static const struct opt_items album_name_options[] = { | 2095 | static const struct opt_items album_name_options[] = { |
2077 | { "Hide album title", -1 }, | 2096 | { "Hide album title", -1 }, |
2078 | { "Show at the bottom", -1 }, | 2097 | { "Show at the bottom", -1 }, |
2079 | { "Show at the top", -1 } | 2098 | { "Show at the top", -1 } |
2080 | }; | 2099 | }; |
2100 | static const struct opt_items wps_options[] = { | ||
2101 | { "Off", -1 }, | ||
2102 | { "Direct", -1 }, | ||
2103 | { "Via Track list", -1 } | ||
2104 | }; | ||
2081 | 2105 | ||
2082 | do { | 2106 | do { |
2083 | selection=rb->do_menu(&settings_menu,&selection, NULL, true); | 2107 | selection=rb->do_menu(&settings_menu,&selection, NULL, true); |
@@ -2134,6 +2158,9 @@ int settings_menu(void) | |||
2134 | rb->remove(EMPTY_SLIDE); | 2158 | rb->remove(EMPTY_SLIDE); |
2135 | rb->splash(HZ, "Cache will be rebuilt on next restart"); | 2159 | rb->splash(HZ, "Cache will be rebuilt on next restart"); |
2136 | break; | 2160 | break; |
2161 | case 8: | ||
2162 | rb->set_option("WPS Integration", &auto_wps, INT, wps_options, 3, NULL); | ||
2163 | break; | ||
2137 | 2164 | ||
2138 | case MENU_ATTACHED_USB: | 2165 | case MENU_ATTACHED_USB: |
2139 | return PLUGIN_USB_CONNECTED; | 2166 | return PLUGIN_USB_CONNECTED; |
@@ -2373,7 +2400,7 @@ void select_prev_track(void) | |||
2373 | /* | 2400 | /* |
2374 | * Puts the current tracklist into a newly created playlist and starts playling | 2401 | * Puts the current tracklist into a newly created playlist and starts playling |
2375 | */ | 2402 | */ |
2376 | void start_playback(void) | 2403 | void start_playback(bool append) |
2377 | { | 2404 | { |
2378 | static int old_playlist = -1, old_shuffle = 0; | 2405 | static int old_playlist = -1, old_shuffle = 0; |
2379 | int count = 0; | 2406 | int count = 0; |
@@ -2382,14 +2409,14 @@ void start_playback(void) | |||
2382 | /* reuse existing playlist if possible | 2409 | /* reuse existing playlist if possible |
2383 | * regenerate if shuffle is on or changed, since playlist index and | 2410 | * regenerate if shuffle is on or changed, since playlist index and |
2384 | * selected track are "out of sync" */ | 2411 | * selected track are "out of sync" */ |
2385 | if (!shuffle && center_slide.slide_index == old_playlist | 2412 | if (!shuffle && !append && center_slide.slide_index == old_playlist |
2386 | && (old_shuffle == shuffle)) | 2413 | && (old_shuffle == shuffle)) |
2387 | { | 2414 | { |
2388 | goto play; | 2415 | goto play; |
2389 | } | 2416 | } |
2390 | /* First, replace the current playlist with a new one */ | 2417 | /* First, replace the current playlist with a new one */ |
2391 | else if (rb->playlist_remove_all_tracks(NULL) == 0 | 2418 | else if (append || (rb->playlist_remove_all_tracks(NULL) == 0 |
2392 | && rb->playlist_create(NULL, NULL) == 0) | 2419 | && rb->playlist_create(NULL, NULL) == 0)) |
2393 | { | 2420 | { |
2394 | do { | 2421 | do { |
2395 | rb->yield(); | 2422 | rb->yield(); |
@@ -2408,7 +2435,8 @@ play: | |||
2408 | /* TODO: can we adjust selected_track if !play_selected ? | 2435 | /* TODO: can we adjust selected_track if !play_selected ? |
2409 | * if shuffle, we can't predict the playing track easily, and for either | 2436 | * if shuffle, we can't predict the playing track easily, and for either |
2410 | * case the track list doesn't get auto scrolled*/ | 2437 | * case the track list doesn't get auto scrolled*/ |
2411 | rb->playlist_start(position, 0); | 2438 | if(!append) |
2439 | rb->playlist_start(position, 0); | ||
2412 | old_playlist = center_slide.slide_index; | 2440 | old_playlist = center_slide.slide_index; |
2413 | old_shuffle = shuffle; | 2441 | old_shuffle = shuffle; |
2414 | } | 2442 | } |
@@ -2493,7 +2521,6 @@ int main(void) | |||
2493 | int ret; | 2521 | int ret; |
2494 | 2522 | ||
2495 | rb->lcd_setfont(FONT_UI); | 2523 | rb->lcd_setfont(FONT_UI); |
2496 | draw_splashscreen(); | ||
2497 | 2524 | ||
2498 | if ( ! rb->dir_exists( CACHE_PREFIX ) ) { | 2525 | if ( ! rb->dir_exists( CACHE_PREFIX ) ) { |
2499 | if ( rb->mkdir( CACHE_PREFIX ) < 0 ) { | 2526 | if ( rb->mkdir( CACHE_PREFIX ) < 0 ) { |
@@ -2502,7 +2529,9 @@ int main(void) | |||
2502 | } | 2529 | } |
2503 | } | 2530 | } |
2504 | 2531 | ||
2505 | configfile_load(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION); | 2532 | configfile_load(CONFIG_FILE, config, CONFIG_NUM_ITEMS, CONFIG_VERSION); |
2533 | if(auto_wps == 0) | ||
2534 | draw_splashscreen(); | ||
2506 | 2535 | ||
2507 | init_reflect_table(); | 2536 | init_reflect_table(); |
2508 | 2537 | ||
@@ -2581,6 +2610,7 @@ int main(void) | |||
2581 | 2610 | ||
2582 | recalc_offsets(); | 2611 | recalc_offsets(); |
2583 | reset_slides(); | 2612 | reset_slides(); |
2613 | set_current_slide(get_wps_current_index()); | ||
2584 | 2614 | ||
2585 | char fpstxt[10]; | 2615 | char fpstxt[10]; |
2586 | int button; | 2616 | int button; |
@@ -2713,13 +2743,48 @@ int main(void) | |||
2713 | show_previous_slide(); | 2743 | show_previous_slide(); |
2714 | break; | 2744 | break; |
2715 | 2745 | ||
2746 | case PF_CONTEXT: | ||
2747 | if ( auto_wps != 0 ) { | ||
2748 | if( pf_state == pf_idle ) { | ||
2749 | create_track_index(center_slide.slide_index); | ||
2750 | reset_track_list(); | ||
2751 | start_playback(true); | ||
2752 | rb->splash(HZ*2, "Added to playlist"); | ||
2753 | } | ||
2754 | else if( pf_state == pf_show_tracks ) { | ||
2755 | rb->playlist_insert_track(NULL, get_track_filename(selected_track), | ||
2756 | PLAYLIST_INSERT_LAST, false, true); | ||
2757 | rb->playlist_sync(NULL); | ||
2758 | rb->splash(HZ*2, "Added to playlist"); | ||
2759 | } | ||
2760 | } | ||
2761 | break; | ||
2762 | case PF_TRACKLIST: | ||
2763 | if ( auto_wps == 1 && pf_state == pf_idle ) { | ||
2764 | pf_state = pf_cover_in; | ||
2765 | break; | ||
2766 | } | ||
2716 | case PF_SELECT: | 2767 | case PF_SELECT: |
2717 | if ( pf_state == pf_idle ) { | 2768 | if ( pf_state == pf_idle ) { |
2718 | pf_state = pf_cover_in; | 2769 | #if PF_PLAYBACK_CAPABLE |
2770 | if(auto_wps == 1) { | ||
2771 | create_track_index(center_slide.slide_index); | ||
2772 | reset_track_list(); | ||
2773 | start_playback(false); | ||
2774 | last_album = center_index; | ||
2775 | return PLUGIN_GOTO_WPS; | ||
2776 | } | ||
2777 | else | ||
2778 | #endif | ||
2779 | pf_state = pf_cover_in; | ||
2719 | } | 2780 | } |
2720 | else if ( pf_state == pf_show_tracks ) { | 2781 | else if ( pf_state == pf_show_tracks ) { |
2721 | #if PF_PLAYBACK_CAPABLE | 2782 | #if PF_PLAYBACK_CAPABLE |
2722 | start_playback(); | 2783 | start_playback(false); |
2784 | if(auto_wps != 0) { | ||
2785 | last_album = center_index; | ||
2786 | return PLUGIN_GOTO_WPS; | ||
2787 | } | ||
2723 | #endif | 2788 | #endif |
2724 | } | 2789 | } |
2725 | break; | 2790 | break; |
@@ -2759,7 +2824,7 @@ enum plugin_status plugin_start(const void *parameter) | |||
2759 | #endif | 2824 | #endif |
2760 | #endif | 2825 | #endif |
2761 | ret = main(); | 2826 | ret = main(); |
2762 | if ( ret == PLUGIN_OK ) { | 2827 | if ( ret == PLUGIN_OK || ret == PLUGIN_GOTO_WPS) { |
2763 | if (configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, | 2828 | if (configfile_save(CONFIG_FILE, config, CONFIG_NUM_ITEMS, |
2764 | CONFIG_VERSION)) | 2829 | CONFIG_VERSION)) |
2765 | { | 2830 | { |
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 @@ | |||
68 | #include "tagcache.h" | 68 | #include "tagcache.h" |
69 | #endif | 69 | #endif |
70 | #include "language.h" | 70 | #include "language.h" |
71 | #include "plugin.h" | ||
71 | 72 | ||
72 | struct root_items { | 73 | struct root_items { |
73 | int (*function)(void* param); | 74 | int (*function)(void* param); |
@@ -544,6 +545,24 @@ static int load_context_screen(int selection) | |||
544 | return GO_TO_PREVIOUS; | 545 | return GO_TO_PREVIOUS; |
545 | } | 546 | } |
546 | 547 | ||
548 | #ifdef HAVE_TAGCACHE | ||
549 | static int load_plugin_screen(char *plug_path) | ||
550 | { | ||
551 | int ret_val; | ||
552 | int old_previous = last_screen; | ||
553 | last_screen = next_screen; | ||
554 | global_status.last_screen = (char)next_screen; | ||
555 | status_save(); | ||
556 | |||
557 | ret_val = plugin_load(plug_path, NULL); | ||
558 | if (ret_val == PLUGIN_OK) | ||
559 | ret_val = GO_TO_PREVIOUS; | ||
560 | if (ret_val == GO_TO_PREVIOUS) | ||
561 | last_screen = (old_previous == next_screen) ? GO_TO_ROOT : old_previous; | ||
562 | return ret_val; | ||
563 | } | ||
564 | #endif | ||
565 | |||
547 | static int previous_music = GO_TO_WPS; | 566 | static int previous_music = GO_TO_WPS; |
548 | 567 | ||
549 | void previous_music_is_wps(void) | 568 | void previous_music_is_wps(void) |
@@ -619,6 +638,18 @@ void root_menu(void) | |||
619 | case GO_TO_ROOTITEM_CONTEXT: | 638 | case GO_TO_ROOTITEM_CONTEXT: |
620 | next_screen = load_context_screen(selected); | 639 | next_screen = load_context_screen(selected); |
621 | break; | 640 | break; |
641 | #ifdef HAVE_TAGCACHE | ||
642 | case GO_TO_PICTUREFLOW: | ||
643 | while ( !tagcache_is_usable() ) | ||
644 | { | ||
645 | splash(0, str(LANG_TAGCACHE_BUSY)); | ||
646 | if ( action_userabort(HZ/5) ) | ||
647 | break; | ||
648 | } | ||
649 | next_screen = load_plugin_screen(PLUGIN_DEMOS_DIR "/pictureflow.rock"); | ||
650 | previous_browser = GO_TO_PICTUREFLOW; | ||
651 | break; | ||
652 | #endif | ||
622 | default: | 653 | default: |
623 | if (next_screen == GO_TO_FILEBROWSER | 654 | if (next_screen == GO_TO_FILEBROWSER |
624 | #ifdef HAVE_TAGCACHE | 655 | #ifdef HAVE_TAGCACHE |
diff --git a/apps/root_menu.h b/apps/root_menu.h index 4113b64495..9674a73f50 100644 --- a/apps/root_menu.h +++ b/apps/root_menu.h | |||
@@ -47,6 +47,7 @@ enum { | |||
47 | GO_TO_FM, | 47 | GO_TO_FM, |
48 | #endif | 48 | #endif |
49 | GO_TO_RECENTBMARKS, | 49 | GO_TO_RECENTBMARKS, |
50 | GO_TO_PICTUREFLOW, | ||
50 | /* Do Not add any items above here unless you want it to be able to | 51 | /* Do Not add any items above here unless you want it to be able to |
51 | be the "start screen" after a boot up. The setting in settings_list.c | 52 | be the "start screen" after a boot up. The setting in settings_list.c |
52 | will need editing if this is the case. */ | 53 | will need editing if this is the case. */ |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 55cefd9bb7..56107e7b04 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -1572,22 +1572,22 @@ const struct settings_list settings[] = { | |||
1572 | #if CONFIG_TUNER | 1572 | #if CONFIG_TUNER |
1573 | "radio," | 1573 | "radio," |
1574 | #endif | 1574 | #endif |
1575 | "bookmarks" ,NULL, | 1575 | "bookmarks,pictureflow", NULL, |
1576 | #if defined(HAVE_TAGCACHE) | 1576 | #if defined(HAVE_TAGCACHE) |
1577 | #if defined(HAVE_RECORDING) && CONFIG_TUNER | 1577 | #if defined(HAVE_RECORDING) && CONFIG_TUNER |
1578 | 9, | 1578 | 10, |
1579 | #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */ | 1579 | #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */ |
1580 | 8, | 1580 | 9, |
1581 | #else | 1581 | #else |
1582 | 7, | 1582 | 8, |
1583 | #endif | 1583 | #endif |
1584 | #else | 1584 | #else |
1585 | #if defined(HAVE_RECORDING) && CONFIG_TUNER | 1585 | #if defined(HAVE_RECORDING) && CONFIG_TUNER |
1586 | 8, | 1586 | 9, |
1587 | #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */ | 1587 | #elif defined(HAVE_RECORDING) || CONFIG_TUNER /* only one of them */ |
1588 | 7, | 1588 | 8, |
1589 | #else | 1589 | #else |
1590 | 6, | 1590 | 7, |
1591 | #endif | 1591 | #endif |
1592 | #endif | 1592 | #endif |
1593 | ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU), | 1593 | ID2P(LANG_PREVIOUS_SCREEN), ID2P(LANG_MAIN_MENU), |
@@ -1602,7 +1602,8 @@ const struct settings_list settings[] = { | |||
1602 | #if CONFIG_TUNER | 1602 | #if CONFIG_TUNER |
1603 | ID2P(LANG_FM_RADIO), | 1603 | ID2P(LANG_FM_RADIO), |
1604 | #endif | 1604 | #endif |
1605 | ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS) | 1605 | ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS), |
1606 | ID2P(LANG_ONPLAY_PICTUREFLOW) | ||
1606 | ), | 1607 | ), |
1607 | SYSTEM_SETTING(NVRAM(1),last_screen,-1), | 1608 | SYSTEM_SETTING(NVRAM(1),last_screen,-1), |
1608 | #if defined(HAVE_RTC_ALARM) && \ | 1609 | #if defined(HAVE_RTC_ALARM) && \ |
@@ -1746,10 +1747,10 @@ const struct settings_list settings[] = { | |||
1746 | #ifdef HAVE_HOTKEY | 1747 | #ifdef HAVE_HOTKEY |
1747 | TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_wps, | 1748 | TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_wps, |
1748 | LANG_HOTKEY_WPS, HOTKEY_VIEW_PLAYLIST, "hotkey wps", | 1749 | LANG_HOTKEY_WPS, HOTKEY_VIEW_PLAYLIST, "hotkey wps", |
1749 | "off,view playlist,show track info,pitchscreen,open with,delete", | 1750 | "off,view playlist,show track info,pitchscreen,open with,delete,pictureflow", |
1750 | UNIT_INT, hotkey_formatter, hotkey_getlang, NULL, 6, HOTKEY_OFF, | 1751 | UNIT_INT, hotkey_formatter, hotkey_getlang, NULL, 7, HOTKEY_OFF, |
1751 | HOTKEY_VIEW_PLAYLIST, HOTKEY_SHOW_TRACK_INFO, HOTKEY_PITCHSCREEN, | 1752 | HOTKEY_VIEW_PLAYLIST, HOTKEY_SHOW_TRACK_INFO, HOTKEY_PITCHSCREEN, |
1752 | HOTKEY_OPEN_WITH, HOTKEY_DELETE), | 1753 | HOTKEY_OPEN_WITH, HOTKEY_DELETE, HOTKEY_PICTUREFLOW), |
1753 | TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_tree, | 1754 | TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, hotkey_tree, |
1754 | LANG_HOTKEY_FILE_BROWSER, HOTKEY_OFF, "hotkey tree", | 1755 | LANG_HOTKEY_FILE_BROWSER, HOTKEY_OFF, "hotkey tree", |
1755 | "off,open with,delete,insert,insert shuffled", | 1756 | "off,open with,delete,insert,insert shuffled", |