diff options
Diffstat (limited to 'apps/plugins/pictureflow/pictureflow.c')
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 07403083f0..aebbc9aa6d 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -3227,7 +3227,7 @@ static int main_menu(void) | |||
3227 | return -2; | 3227 | return -2; |
3228 | #if PF_PLAYBACK_CAPABLE | 3228 | #if PF_PLAYBACK_CAPABLE |
3229 | case PF_MENU_CLEAR_PLAYLIST: | 3229 | case PF_MENU_CLEAR_PLAYLIST: |
3230 | if(rb->playlist_remove_all_tracks(NULL) == 0) { | 3230 | if(rb->warn_on_pl_erase() && rb->playlist_remove_all_tracks(NULL) == 0) { |
3231 | rb->playlist_create(NULL, NULL); | 3231 | rb->playlist_create(NULL, NULL); |
3232 | rb->splash(HZ*2, ID2P(LANG_PLAYLIST_CLEARED)); | 3232 | rb->splash(HZ*2, ID2P(LANG_PLAYLIST_CLEARED)); |
3233 | } | 3233 | } |
@@ -3484,6 +3484,19 @@ static void select_prev_track(void) | |||
3484 | } | 3484 | } |
3485 | 3485 | ||
3486 | #if PF_PLAYBACK_CAPABLE | 3486 | #if PF_PLAYBACK_CAPABLE |
3487 | |||
3488 | static bool pf_warn_on_pl_erase(void) | ||
3489 | { | ||
3490 | #ifdef USEGSLIB | ||
3491 | grey_show(false); | ||
3492 | #endif | ||
3493 | bool ret = rb->warn_on_pl_erase(); | ||
3494 | #ifdef USEGSLIB | ||
3495 | grey_show(true); | ||
3496 | #endif | ||
3497 | return ret; | ||
3498 | } | ||
3499 | |||
3487 | /* | 3500 | /* |
3488 | * Puts the current tracklist into a newly created playlist and starts playling | 3501 | * Puts the current tracklist into a newly created playlist and starts playling |
3489 | */ | 3502 | */ |
@@ -3523,7 +3536,11 @@ play: | |||
3523 | * if shuffle, we can't predict the playing track easily, and for either | 3536 | * if shuffle, we can't predict the playing track easily, and for either |
3524 | * case the track list doesn't get auto scrolled*/ | 3537 | * case the track list doesn't get auto scrolled*/ |
3525 | if(!append) | 3538 | if(!append) |
3539 | { | ||
3526 | rb->playlist_start(position, 0, 0); | 3540 | rb->playlist_start(position, 0, 0); |
3541 | /* make warn on playlist erase work */ | ||
3542 | rb->playlist_get_current()->num_inserted_tracks = 0; | ||
3543 | } | ||
3527 | old_playlist = center_slide.slide_index; | 3544 | old_playlist = center_slide.slide_index; |
3528 | old_shuffle = shuffle; | 3545 | old_shuffle = shuffle; |
3529 | } | 3546 | } |
@@ -3956,6 +3973,8 @@ static int pictureflow_main(void) | |||
3956 | set_current_slide(target); | 3973 | set_current_slide(target); |
3957 | #if PF_PLAYBACK_CAPABLE | 3974 | #if PF_PLAYBACK_CAPABLE |
3958 | if(pf_cfg.auto_wps == 1) { | 3975 | if(pf_cfg.auto_wps == 1) { |
3976 | if (!pf_warn_on_pl_erase()) | ||
3977 | break; | ||
3959 | create_track_index(center_slide.slide_index); | 3978 | create_track_index(center_slide.slide_index); |
3960 | reset_track_list(); | 3979 | reset_track_list(); |
3961 | start_playback(false); | 3980 | start_playback(false); |
@@ -3970,15 +3989,15 @@ static int pictureflow_main(void) | |||
3970 | revert_cover_out_animation(); | 3989 | revert_cover_out_animation(); |
3971 | else if (pf_state == pf_cover_in) | 3990 | else if (pf_state == pf_cover_in) |
3972 | interrupt_cover_in_animation(); | 3991 | interrupt_cover_in_animation(); |
3973 | else if ( pf_state == pf_show_tracks ) { | ||
3974 | #if PF_PLAYBACK_CAPABLE | 3992 | #if PF_PLAYBACK_CAPABLE |
3993 | else if (pf_state == pf_show_tracks && pf_warn_on_pl_erase()) { | ||
3975 | start_playback(false); | 3994 | start_playback(false); |
3976 | if(pf_cfg.auto_wps != 0) { | 3995 | if(pf_cfg.auto_wps != 0) { |
3977 | pf_cfg.last_album = center_index; | 3996 | pf_cfg.last_album = center_index; |
3978 | return PLUGIN_GOTO_WPS; | 3997 | return PLUGIN_GOTO_WPS; |
3979 | } | 3998 | } |
3980 | #endif | ||
3981 | } | 3999 | } |
4000 | #endif | ||
3982 | break; | 4001 | break; |
3983 | default: | 4002 | default: |
3984 | exit_on_usb(button); | 4003 | exit_on_usb(button); |