diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-12-14 03:06:04 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-12-14 22:35:33 -0500 |
commit | 6b87bfadfff6c44722f8ffe5227c05c41b1b47c8 (patch) | |
tree | a0f346c8cde95c33d0561977a064cc438841923e /apps | |
parent | eaf717744d425e0bb8905f451e7443b07b67f97b (diff) | |
download | rockbox-6b87bfadfff6c44722f8ffe5227c05c41b1b47c8.tar.gz rockbox-6b87bfadfff6c44722f8ffe5227c05c41b1b47c8.zip |
wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow
Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
Diffstat (limited to 'apps')
-rw-r--r-- | apps/bookmark.c | 4 | ||||
-rw-r--r-- | apps/gui/option_select.c | 2 | ||||
-rw-r--r-- | apps/gui/quickscreen.c | 4 | ||||
-rw-r--r-- | apps/gui/usb_screen.c | 2 | ||||
-rw-r--r-- | apps/gui/wps.c | 354 | ||||
-rw-r--r-- | apps/menus/time_menu.c | 2 | ||||
-rw-r--r-- | apps/misc.c | 35 | ||||
-rw-r--r-- | apps/misc.h | 9 | ||||
-rw-r--r-- | apps/onplay.c | 8 | ||||
-rw-r--r-- | apps/playlist_viewer.c | 17 | ||||
-rw-r--r-- | apps/plugin.c | 16 | ||||
-rw-r--r-- | apps/plugins/pitch_screen.c | 2 | ||||
-rw-r--r-- | apps/radio/radio.c | 2 | ||||
-rw-r--r-- | apps/recorder/recording.c | 2 | ||||
-rw-r--r-- | apps/root_menu.c | 20 | ||||
-rw-r--r-- | apps/screens.c | 2 | ||||
-rw-r--r-- | apps/shortcuts.c | 4 |
17 files changed, 248 insertions, 237 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index 64a4b9f761..68c10b36e7 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -1122,7 +1122,7 @@ int bookmark_load_menu(void) | |||
1122 | } | 1122 | } |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 1125 | pop_current_activity(); |
1126 | return ret; | 1126 | return ret; |
1127 | } | 1127 | } |
1128 | 1128 | ||
@@ -1143,7 +1143,7 @@ bool bookmark_mrb_load() | |||
1143 | ret = play_bookmark(bookmark); | 1143 | ret = play_bookmark(bookmark); |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 1146 | pop_current_activity(); |
1147 | return ret; | 1147 | return ret; |
1148 | } | 1148 | } |
1149 | 1149 | ||
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 918335d6cd..ca16b5b05f 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -574,7 +574,7 @@ bool option_screen(const struct settings_list *setting, | |||
574 | if (function == sound_get_fn(SOUND_VOLUME)) | 574 | if (function == sound_get_fn(SOUND_VOLUME)) |
575 | global_status.last_volume_change = current_tick; | 575 | global_status.last_volume_change = current_tick; |
576 | } | 576 | } |
577 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 577 | pop_current_activity(); |
578 | return false; | 578 | return false; |
579 | } | 579 | } |
580 | 580 | ||
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index 1f32dca544..4eebe09fd3 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -410,9 +410,9 @@ static int gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter | |||
410 | } | 410 | } |
411 | 411 | ||
412 | if (ret & QUICKSCREEN_GOTO_SHORTCUTS_MENU) /* Eliminate flashing of parent during */ | 412 | if (ret & QUICKSCREEN_GOTO_SHORTCUTS_MENU) /* Eliminate flashing of parent during */ |
413 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); /* transition to Shortcuts */ | 413 | pop_current_activity_without_refresh(); /* transition to Shortcuts */ |
414 | else | 414 | else |
415 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 415 | pop_current_activity(); |
416 | 416 | ||
417 | return ret; | 417 | return ret; |
418 | } | 418 | } |
diff --git a/apps/gui/usb_screen.c b/apps/gui/usb_screen.c index 05e60067e0..31321ec005 100644 --- a/apps/gui/usb_screen.c +++ b/apps/gui/usb_screen.c | |||
@@ -315,5 +315,5 @@ void gui_usb_screen_run(bool early_usb) | |||
315 | viewportmanager_theme_undo(i, false); | 315 | viewportmanager_theme_undo(i, false); |
316 | } | 316 | } |
317 | 317 | ||
318 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 318 | pop_current_activity(); |
319 | } | 319 | } |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index fe4bcf3213..8b74b0e02b 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -65,9 +65,6 @@ | |||
65 | #include "skin_engine/wps_internals.h" | 65 | #include "skin_engine/wps_internals.h" |
66 | #include "open_plugin.h" | 66 | #include "open_plugin.h" |
67 | 67 | ||
68 | #define RESTORE_WPS_INSTANTLY 0l | ||
69 | #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) | ||
70 | |||
71 | #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ | 68 | #define FF_REWIND_MAX_PERCENT 3 /* cap ff/rewind step size at max % of file */ |
72 | /* 3% of 30min file == 54s step size */ | 69 | /* 3% of 30min file == 54s step size */ |
73 | #define MIN_FF_REWIND_STEP 500 | 70 | #define MIN_FF_REWIND_STEP 500 |
@@ -148,14 +145,6 @@ void unpause_action(bool updatewps) | |||
148 | update_non_static(); | 145 | update_non_static(); |
149 | } | 146 | } |
150 | 147 | ||
151 | static bool update_onvol_change(enum screen_type screen) | ||
152 | { | ||
153 | skin_update(WPS, screen, SKIN_REFRESH_NON_STATIC); | ||
154 | |||
155 | return false; | ||
156 | } | ||
157 | |||
158 | |||
159 | #ifdef HAVE_TOUCHSCREEN | 148 | #ifdef HAVE_TOUCHSCREEN |
160 | static int skintouch_to_wps(void) | 149 | static int skintouch_to_wps(void) |
161 | { | 150 | { |
@@ -340,9 +329,9 @@ static bool ffwd_rew(int button, bool seek_from_end) | |||
340 | return usb; | 329 | return usb; |
341 | } | 330 | } |
342 | 331 | ||
343 | #if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD) | ||
344 | static void gwps_caption_backlight(struct wps_state *state) | 332 | static void gwps_caption_backlight(struct wps_state *state) |
345 | { | 333 | { |
334 | #if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD) | ||
346 | if (state->id3) | 335 | if (state->id3) |
347 | { | 336 | { |
348 | #ifdef HAVE_BACKLIGHT | 337 | #ifdef HAVE_BACKLIGHT |
@@ -379,9 +368,10 @@ static void gwps_caption_backlight(struct wps_state *state) | |||
379 | } | 368 | } |
380 | #endif | 369 | #endif |
381 | } | 370 | } |
371 | #else | ||
372 | (void) state; | ||
373 | #endif /* def HAVE_BACKLIGHT || def HAVE_REMOTE_LCD */ | ||
382 | } | 374 | } |
383 | #endif | ||
384 | |||
385 | 375 | ||
386 | static void change_dir(int direction) | 376 | static void change_dir(int direction) |
387 | { | 377 | { |
@@ -498,7 +488,6 @@ static void play_hop(int direction) | |||
498 | audio_ff_rewind(elapsed); | 488 | audio_ff_rewind(elapsed); |
499 | } | 489 | } |
500 | 490 | ||
501 | |||
502 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 491 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
503 | /* | 492 | /* |
504 | * If the user is unable to see the wps, because the display is deactivated, | 493 | * If the user is unable to see the wps, because the display is deactivated, |
@@ -541,20 +530,30 @@ static void gwps_leave_wps(bool theme_enabled) | |||
541 | #endif | 530 | #endif |
542 | } | 531 | } |
543 | 532 | ||
533 | static void restore_theme(void) | ||
534 | { | ||
535 | FOR_NB_SCREENS(i) | ||
536 | { | ||
537 | struct gui_wps *gwps = skin_get_gwps(WPS, i); | ||
538 | struct screen *display = gwps->display; | ||
539 | display->scroll_stop(); | ||
540 | viewportmanager_theme_enable(i, skin_has_sbs(gwps), NULL); | ||
541 | } | ||
542 | } | ||
543 | |||
544 | /* | 544 | /* |
545 | * display the wps on entering or restoring */ | 545 | * display the wps on entering or restoring */ |
546 | static void gwps_enter_wps(bool theme_enabled) | 546 | static void gwps_enter_wps(bool theme_enabled) |
547 | { | 547 | { |
548 | struct gui_wps *gwps; | 548 | struct gui_wps *gwps; |
549 | struct screen *display; | 549 | struct screen *display; |
550 | if (theme_enabled) | ||
551 | restore_theme(); | ||
550 | FOR_NB_SCREENS(i) | 552 | FOR_NB_SCREENS(i) |
551 | { | 553 | { |
552 | gwps = skin_get_gwps(WPS, i); | 554 | gwps = skin_get_gwps(WPS, i); |
553 | display = gwps->display; | 555 | display = gwps->display; |
554 | display->scroll_stop(); | 556 | display->scroll_stop(); |
555 | if (theme_enabled) | ||
556 | viewportmanager_theme_enable(i, skin_has_sbs(gwps), NULL); | ||
557 | |||
558 | /* Update the values in the first (default) viewport - in case the user | 557 | /* Update the values in the first (default) viewport - in case the user |
559 | has modified the statusbar or colour settings */ | 558 | has modified the statusbar or colour settings */ |
560 | #if LCD_DEPTH > 1 | 559 | #if LCD_DEPTH > 1 |
@@ -607,6 +606,57 @@ void wps_do_playpause(bool updatewps) | |||
607 | } | 606 | } |
608 | } | 607 | } |
609 | 608 | ||
609 | static long do_wps_exit(long action, bool bookmark) | ||
610 | { | ||
611 | audio_pause(); | ||
612 | update_non_static(); | ||
613 | if (bookmark) | ||
614 | bookmark_autobookmark(true); | ||
615 | audio_stop(); | ||
616 | #ifdef AB_REPEAT_ENABLE | ||
617 | ab_reset_markers(); | ||
618 | #endif | ||
619 | gwps_leave_wps(true); | ||
620 | #ifdef HAVE_RECORDING | ||
621 | if (action == ACTION_WPS_REC) | ||
622 | return GO_TO_RECSCREEN; | ||
623 | #else | ||
624 | (void)action; | ||
625 | #endif | ||
626 | if (global_settings.browse_current) | ||
627 | return GO_TO_PREVIOUS_BROWSER; | ||
628 | return GO_TO_PREVIOUS; | ||
629 | } | ||
630 | |||
631 | static long do_party_mode(long action) | ||
632 | { | ||
633 | if (global_settings.party_mode) | ||
634 | { | ||
635 | switch (action) | ||
636 | { | ||
637 | #ifdef ACTION_WPSAB_SINGLE | ||
638 | case ACTION_WPSAB_SINGLE: | ||
639 | if (!ab_repeat_mode_enabled()) | ||
640 | break; | ||
641 | /* Note: currently all targets use ACTION_WPS_BROWSE | ||
642 | * if mapped to any of below actions this will cause problems */ | ||
643 | #endif | ||
644 | case ACTION_WPS_PLAY: | ||
645 | case ACTION_WPS_SEEKFWD: | ||
646 | case ACTION_WPS_SEEKBACK: | ||
647 | case ACTION_WPS_SKIPPREV: | ||
648 | case ACTION_WPS_SKIPNEXT: | ||
649 | case ACTION_WPS_ABSETB_NEXTDIR: | ||
650 | case ACTION_WPS_ABSETA_PREVDIR: | ||
651 | case ACTION_WPS_STOP: | ||
652 | return ACTION_NONE; | ||
653 | break; | ||
654 | default: | ||
655 | break; | ||
656 | } | ||
657 | } | ||
658 | return action; | ||
659 | } | ||
610 | 660 | ||
611 | /* The WPS can be left in two ways: | 661 | /* The WPS can be left in two ways: |
612 | * a) call a function, which draws over the wps. In this case, the wps | 662 | * a) call a function, which draws over the wps. In this case, the wps |
@@ -621,11 +671,10 @@ long gui_wps_show(void) | |||
621 | { | 671 | { |
622 | long button = 0; | 672 | long button = 0; |
623 | bool restore = true; | 673 | bool restore = true; |
624 | long restoretimer = RESTORE_WPS_INSTANTLY; /* timer to delay screen redraw temporarily */ | ||
625 | bool exit = false; | 674 | bool exit = false; |
626 | bool bookmark = false; | 675 | bool bookmark = false; |
627 | bool update = false; | 676 | bool update = false; |
628 | bool vol_changed = false; | 677 | bool theme_enabled = true; |
629 | long last_left = 0, last_right = 0; | 678 | long last_left = 0, last_right = 0; |
630 | struct wps_state *state = get_wps_state(); | 679 | struct wps_state *state = get_wps_state(); |
631 | 680 | ||
@@ -634,12 +683,10 @@ long gui_wps_show(void) | |||
634 | ab_reset_markers(); | 683 | ab_reset_markers(); |
635 | #endif | 684 | #endif |
636 | wps_state_init(); | 685 | wps_state_init(); |
637 | |||
638 | while ( 1 ) | 686 | while ( 1 ) |
639 | { | 687 | { |
640 | bool theme_enabled = true; | 688 | bool hotkey = false; |
641 | bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false; | 689 | bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false; |
642 | |||
643 | /* did someone else (i.e power thread) change audio pause mode? */ | 690 | /* did someone else (i.e power thread) change audio pause mode? */ |
644 | if (state->paused != audio_paused) { | 691 | if (state->paused != audio_paused) { |
645 | state->paused = audio_paused; | 692 | state->paused = audio_paused; |
@@ -653,8 +700,53 @@ long gui_wps_show(void) | |||
653 | #endif | 700 | #endif |
654 | } | 701 | } |
655 | } | 702 | } |
656 | button = skin_wait_for_action(WPS, CONTEXT_WPS|ALLOW_SOFTLOCK, | 703 | |
657 | restore ? 1 : HZ/5); | 704 | if (restore) |
705 | { | ||
706 | restore = false; | ||
707 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | ||
708 | add_event(LCD_EVENT_ACTIVATION, wps_lcd_activation_hook); | ||
709 | #endif | ||
710 | /* we remove the update delay since it's not very usable in the wps, | ||
711 | * e.g. during volume changing or ffwd/rewind */ | ||
712 | sb_skin_set_update_delay(0); | ||
713 | skin_request_full_update(WPS); | ||
714 | update = true; | ||
715 | gwps_enter_wps(theme_enabled); | ||
716 | theme_enabled = true; | ||
717 | } | ||
718 | else | ||
719 | { | ||
720 | gwps_caption_backlight(state); | ||
721 | |||
722 | FOR_NB_SCREENS(i) | ||
723 | { | ||
724 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | ||
725 | /* currently, all remotes are readable without backlight | ||
726 | * so still update those */ | ||
727 | if (lcd_active() || (i != SCREEN_MAIN)) | ||
728 | #endif | ||
729 | { | ||
730 | bool full_update = skin_do_full_update(WPS, i); | ||
731 | if (update || full_update) | ||
732 | { | ||
733 | skin_update(WPS, i, full_update ? | ||
734 | SKIN_REFRESH_ALL : SKIN_REFRESH_NON_STATIC); | ||
735 | } | ||
736 | } | ||
737 | } | ||
738 | update = false; | ||
739 | } | ||
740 | |||
741 | if (exit) | ||
742 | { | ||
743 | return do_wps_exit(button, bookmark); | ||
744 | } | ||
745 | |||
746 | if (button && !IS_SYSEVENT(button) ) | ||
747 | storage_spin(); | ||
748 | |||
749 | button = skin_wait_for_action(WPS, CONTEXT_WPS|ALLOW_SOFTLOCK, HZ/5); | ||
658 | 750 | ||
659 | /* Exit if audio has stopped playing. This happens e.g. at end of | 751 | /* Exit if audio has stopped playing. This happens e.g. at end of |
660 | playlist or if using the sleep timer. */ | 752 | playlist or if using the sleep timer. */ |
@@ -664,44 +756,39 @@ long gui_wps_show(void) | |||
664 | if (button == ACTION_TOUCHSCREEN) | 756 | if (button == ACTION_TOUCHSCREEN) |
665 | button = skintouch_to_wps(); | 757 | button = skintouch_to_wps(); |
666 | #endif | 758 | #endif |
759 | button = do_party_mode(button); /* block select actions in party mode */ | ||
760 | |||
667 | /* The iPods/X5/M5 use a single button for the A-B mode markers, | 761 | /* The iPods/X5/M5 use a single button for the A-B mode markers, |
668 | defined as ACTION_WPSAB_SINGLE in their config files. */ | 762 | defined as ACTION_WPSAB_SINGLE in their config files. */ |
669 | #ifdef ACTION_WPSAB_SINGLE | 763 | #ifdef ACTION_WPSAB_SINGLE |
670 | if (!global_settings.party_mode && ab_repeat_mode_enabled()) | 764 | static int wps_ab_state = 0; |
765 | if (button == ACTION_WPSAB_SINGLE && ab_repeat_mode_enabled()) | ||
671 | { | 766 | { |
672 | static int wps_ab_state = 0; | 767 | switch (wps_ab_state) |
673 | if (button == ACTION_WPSAB_SINGLE) | ||
674 | { | 768 | { |
675 | switch (wps_ab_state) | 769 | case 0: /* set the A spot */ |
676 | { | 770 | button = ACTION_WPS_ABSETA_PREVDIR; |
677 | case 0: /* set the A spot */ | 771 | break; |
678 | button = ACTION_WPS_ABSETA_PREVDIR; | 772 | case 1: /* set the B spot */ |
679 | break; | 773 | button = ACTION_WPS_ABSETB_NEXTDIR; |
680 | case 1: /* set the B spot */ | 774 | break; |
681 | button = ACTION_WPS_ABSETB_NEXTDIR; | 775 | case 2: |
682 | break; | 776 | button = ACTION_WPS_ABRESET; |
683 | case 2: | 777 | break; |
684 | button = ACTION_WPS_ABRESET; | ||
685 | break; | ||
686 | } | ||
687 | wps_ab_state = (wps_ab_state+1) % 3; | ||
688 | } | 778 | } |
779 | wps_ab_state = (wps_ab_state+1) % 3; | ||
689 | } | 780 | } |
690 | #endif | 781 | #endif /* def ACTION_WPSAB_SINGLE */ |
782 | |||
691 | switch(button) | 783 | switch(button) |
692 | { | 784 | { |
693 | #ifdef HAVE_HOTKEY | 785 | #ifdef HAVE_HOTKEY |
694 | case ACTION_WPS_HOTKEY: | 786 | case ACTION_WPS_HOTKEY: |
787 | { | ||
788 | hotkey = true; | ||
695 | if (!global_settings.hotkey_wps) | 789 | if (!global_settings.hotkey_wps) |
696 | break; | 790 | break; |
697 | /* fall through */ | 791 | if (global_settings.hotkey_wps == HOTKEY_PLUGIN) |
698 | #endif | ||
699 | case ACTION_WPS_CONTEXT: | ||
700 | { | ||
701 | bool hotkey = button == ACTION_WPS_HOTKEY; | ||
702 | |||
703 | #ifdef HAVE_HOTKEY | ||
704 | if (hotkey && global_settings.hotkey_wps == HOTKEY_PLUGIN) | ||
705 | { | 792 | { |
706 | /* leave WPS without re-enabling theme */ | 793 | /* leave WPS without re-enabling theme */ |
707 | theme_enabled = false; | 794 | theme_enabled = false; |
@@ -711,39 +798,31 @@ long gui_wps_show(void) | |||
711 | if (!audio_status()) | 798 | if (!audio_status()) |
712 | { | 799 | { |
713 | /* re-enable theme since we're returning to SBS */ | 800 | /* re-enable theme since we're returning to SBS */ |
714 | FOR_NB_SCREENS(i) | 801 | gwps_leave_wps(true); |
715 | { | ||
716 | struct gui_wps *gwps = skin_get_gwps(WPS, i); | ||
717 | #ifdef HAVE_BACKDROP_IMAGE | ||
718 | skin_backdrop_show(sb_get_backdrop(i)); | ||
719 | #endif | ||
720 | viewportmanager_theme_undo(i, skin_has_sbs(gwps)); | ||
721 | } | ||
722 | return GO_TO_ROOT; | 802 | return GO_TO_ROOT; |
723 | } | 803 | } |
804 | restore = true; | ||
805 | break; | ||
724 | } | 806 | } |
725 | else | 807 | } |
726 | #endif | 808 | /* fall through */ |
809 | #endif /* def HAVE_HOTKEY */ | ||
810 | case ACTION_WPS_CONTEXT: | ||
811 | { | ||
812 | gwps_leave_wps(true); | ||
813 | int retval = onplay(state->id3->path, | ||
814 | FILE_ATTR_AUDIO, CONTEXT_WPS, hotkey); | ||
815 | /* if music is stopped in the context menu we want to exit the wps */ | ||
816 | if (retval == ONPLAY_MAINMENU | ||
817 | || !audio_status()) | ||
818 | return GO_TO_ROOT; | ||
819 | else if (retval == ONPLAY_PLAYLIST) | ||
820 | return GO_TO_PLAYLIST_VIEWER; | ||
821 | else if (retval == ONPLAY_PLUGIN) | ||
727 | { | 822 | { |
728 | gwps_leave_wps(true); | 823 | restore_theme(); |
729 | int retval = onplay(state->id3->path, | 824 | theme_enabled = false; |
730 | FILE_ATTR_AUDIO, CONTEXT_WPS, hotkey); | 825 | open_plugin_run(ID2P(LANG_OPEN_PLUGIN_SET_WPS_CONTEXT_PLUGIN)); |
731 | /* if music is stopped in the context menu we want to exit the wps */ | ||
732 | if (retval == ONPLAY_MAINMENU | ||
733 | || !audio_status()) | ||
734 | return GO_TO_ROOT; | ||
735 | else if (retval == ONPLAY_PLAYLIST) | ||
736 | return GO_TO_PLAYLIST_VIEWER; | ||
737 | else if (retval == ONPLAY_PLUGIN) | ||
738 | { | ||
739 | FOR_NB_SCREENS(i) | ||
740 | { | ||
741 | struct gui_wps *gwps = skin_get_gwps(WPS, i); | ||
742 | viewportmanager_theme_enable(i, skin_has_sbs(gwps), NULL); | ||
743 | } | ||
744 | theme_enabled = false; | ||
745 | open_plugin_run(ID2P(LANG_OPEN_PLUGIN_SET_WPS_CONTEXT_PLUGIN)); | ||
746 | } | ||
747 | } | 826 | } |
748 | 827 | ||
749 | restore = true; | 828 | restore = true; |
@@ -757,24 +836,26 @@ long gui_wps_show(void) | |||
757 | 836 | ||
758 | /* play/pause */ | 837 | /* play/pause */ |
759 | case ACTION_WPS_PLAY: | 838 | case ACTION_WPS_PLAY: |
760 | if (global_settings.party_mode) | ||
761 | break; | ||
762 | wps_do_playpause(true); | 839 | wps_do_playpause(true); |
763 | break; | 840 | break; |
764 | 841 | ||
765 | case ACTION_WPS_VOLUP: | 842 | case ACTION_WPS_VOLUP: /* fall through */ |
766 | global_settings.volume += sound_steps(SOUND_VOLUME); | ||
767 | vol_changed = true; | ||
768 | break; | ||
769 | case ACTION_WPS_VOLDOWN: | 843 | case ACTION_WPS_VOLDOWN: |
770 | global_settings.volume -= sound_steps(SOUND_VOLUME); | 844 | if (button == ACTION_WPS_VOLUP) |
771 | vol_changed = true; | 845 | global_settings.volume += sound_steps(SOUND_VOLUME); |
846 | else | ||
847 | global_settings.volume -= sound_steps(SOUND_VOLUME); | ||
848 | |||
849 | setvol(); | ||
850 | FOR_NB_SCREENS(i) | ||
851 | { | ||
852 | skin_update(WPS, i, SKIN_REFRESH_NON_STATIC); | ||
853 | } | ||
854 | update = false; | ||
772 | break; | 855 | break; |
773 | /* fast forward | 856 | /* fast forward |
774 | OR next dir if this is straight after ACTION_WPS_SKIPNEXT */ | 857 | OR next dir if this is straight after ACTION_WPS_SKIPNEXT */ |
775 | case ACTION_WPS_SEEKFWD: | 858 | case ACTION_WPS_SEEKFWD: |
776 | if (global_settings.party_mode) | ||
777 | break; | ||
778 | if (current_tick -last_right < HZ) | 859 | if (current_tick -last_right < HZ) |
779 | { | 860 | { |
780 | if (state->id3->cuesheet) | 861 | if (state->id3->cuesheet) |
@@ -793,9 +874,7 @@ long gui_wps_show(void) | |||
793 | /* fast rewind | 874 | /* fast rewind |
794 | OR prev dir if this is straight after ACTION_WPS_SKIPPREV,*/ | 875 | OR prev dir if this is straight after ACTION_WPS_SKIPPREV,*/ |
795 | case ACTION_WPS_SEEKBACK: | 876 | case ACTION_WPS_SEEKBACK: |
796 | if (global_settings.party_mode) | 877 | if (current_tick - last_left < HZ) |
797 | break; | ||
798 | if (current_tick -last_left < HZ) | ||
799 | { | 878 | { |
800 | if (state->id3->cuesheet) | 879 | if (state->id3->cuesheet) |
801 | { | 880 | { |
@@ -824,8 +903,6 @@ long gui_wps_show(void) | |||
824 | 903 | ||
825 | /* prev / restart */ | 904 | /* prev / restart */ |
826 | case ACTION_WPS_SKIPPREV: | 905 | case ACTION_WPS_SKIPPREV: |
827 | if (global_settings.party_mode) | ||
828 | break; | ||
829 | last_left = current_tick; | 906 | last_left = current_tick; |
830 | #ifdef AB_REPEAT_ENABLE | 907 | #ifdef AB_REPEAT_ENABLE |
831 | /* if we're in A/B repeat mode and the current position | 908 | /* if we're in A/B repeat mode and the current position |
@@ -844,8 +921,6 @@ long gui_wps_show(void) | |||
844 | /* next | 921 | /* next |
845 | OR if skip length set, hop by predetermined amount. */ | 922 | OR if skip length set, hop by predetermined amount. */ |
846 | case ACTION_WPS_SKIPNEXT: | 923 | case ACTION_WPS_SKIPNEXT: |
847 | if (global_settings.party_mode) | ||
848 | break; | ||
849 | last_right = current_tick; | 924 | last_right = current_tick; |
850 | #ifdef AB_REPEAT_ENABLE | 925 | #ifdef AB_REPEAT_ENABLE |
851 | /* if we're in A/B repeat mode and the current position is | 926 | /* if we're in A/B repeat mode and the current position is |
@@ -866,8 +941,6 @@ long gui_wps_show(void) | |||
866 | /* next / prev directories */ | 941 | /* next / prev directories */ |
867 | /* and set A-B markers if in a-b mode */ | 942 | /* and set A-B markers if in a-b mode */ |
868 | case ACTION_WPS_ABSETB_NEXTDIR: | 943 | case ACTION_WPS_ABSETB_NEXTDIR: |
869 | if (global_settings.party_mode) | ||
870 | break; | ||
871 | #if defined(AB_REPEAT_ENABLE) | 944 | #if defined(AB_REPEAT_ENABLE) |
872 | if (ab_repeat_mode_enabled()) | 945 | if (ab_repeat_mode_enabled()) |
873 | { | 946 | { |
@@ -881,8 +954,6 @@ long gui_wps_show(void) | |||
881 | } | 954 | } |
882 | break; | 955 | break; |
883 | case ACTION_WPS_ABSETA_PREVDIR: | 956 | case ACTION_WPS_ABSETA_PREVDIR: |
884 | if (global_settings.party_mode) | ||
885 | break; | ||
886 | #if defined(AB_REPEAT_ENABLE) | 957 | #if defined(AB_REPEAT_ENABLE) |
887 | if (ab_repeat_mode_enabled()) | 958 | if (ab_repeat_mode_enabled()) |
888 | ab_set_A_marker(state->id3->elapsed); | 959 | ab_set_A_marker(state->id3->elapsed); |
@@ -915,7 +986,7 @@ long gui_wps_show(void) | |||
915 | restore = true; | 986 | restore = true; |
916 | } | 987 | } |
917 | 988 | ||
918 | if (enter_shortcuts_menu) | 989 | if (enter_shortcuts_menu) /* enter_shortcuts_menu */ |
919 | { | 990 | { |
920 | global_status.last_screen = GO_TO_SHORTCUTMENU; | 991 | global_status.last_screen = GO_TO_SHORTCUTMENU; |
921 | int ret = do_shortcut_menu(NULL); | 992 | int ret = do_shortcut_menu(NULL); |
@@ -952,8 +1023,6 @@ long gui_wps_show(void) | |||
952 | 1023 | ||
953 | /* stop and exit wps */ | 1024 | /* stop and exit wps */ |
954 | case ACTION_WPS_STOP: | 1025 | case ACTION_WPS_STOP: |
955 | if (global_settings.party_mode) | ||
956 | break; | ||
957 | bookmark = true; | 1026 | bookmark = true; |
958 | exit = true; | 1027 | exit = true; |
959 | break; | 1028 | break; |
@@ -1013,85 +1082,6 @@ long gui_wps_show(void) | |||
1013 | update = true; | 1082 | update = true; |
1014 | break; | 1083 | break; |
1015 | } | 1084 | } |
1016 | |||
1017 | if (vol_changed) | ||
1018 | { | ||
1019 | bool res = false; | ||
1020 | vol_changed = false; | ||
1021 | setvol(); | ||
1022 | FOR_NB_SCREENS(i) | ||
1023 | { | ||
1024 | if(update_onvol_change(i)) | ||
1025 | res = true; | ||
1026 | } | ||
1027 | if (res) { | ||
1028 | restore = true; | ||
1029 | restoretimer = RESTORE_WPS_NEXT_SECOND; | ||
1030 | } | ||
1031 | } | ||
1032 | |||
1033 | |||
1034 | if (restore && | ||
1035 | ((restoretimer == RESTORE_WPS_INSTANTLY) || | ||
1036 | TIME_AFTER(current_tick, restoretimer))) | ||
1037 | { | ||
1038 | restore = false; | ||
1039 | restoretimer = RESTORE_WPS_INSTANTLY; | ||
1040 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | ||
1041 | add_event(LCD_EVENT_ACTIVATION, wps_lcd_activation_hook); | ||
1042 | #endif | ||
1043 | /* we remove the update delay since it's not very usable in the wps, | ||
1044 | * e.g. during volume changing or ffwd/rewind */ | ||
1045 | sb_skin_set_update_delay(0); | ||
1046 | skin_request_full_update(WPS); | ||
1047 | update = true; | ||
1048 | gwps_enter_wps(theme_enabled); | ||
1049 | } | ||
1050 | else | ||
1051 | { | ||
1052 | #if defined(HAVE_BACKLIGHT) || defined(HAVE_REMOTE_LCD) | ||
1053 | gwps_caption_backlight(state); | ||
1054 | #endif | ||
1055 | FOR_NB_SCREENS(i) | ||
1056 | { | ||
1057 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | ||
1058 | /* currently, all remotes are readable without backlight | ||
1059 | * so still update those */ | ||
1060 | if (lcd_active() || (i != SCREEN_MAIN)) | ||
1061 | #endif | ||
1062 | { | ||
1063 | bool full_update = skin_do_full_update(WPS, i); | ||
1064 | if (update || full_update) | ||
1065 | { | ||
1066 | skin_update(WPS, i, full_update ? | ||
1067 | SKIN_REFRESH_ALL : SKIN_REFRESH_NON_STATIC); | ||
1068 | } | ||
1069 | } | ||
1070 | } | ||
1071 | update = false; | ||
1072 | } | ||
1073 | |||
1074 | if (exit) { | ||
1075 | audio_pause(); | ||
1076 | update_non_static(); | ||
1077 | if (bookmark) | ||
1078 | bookmark_autobookmark(true); | ||
1079 | audio_stop(); | ||
1080 | #ifdef AB_REPEAT_ENABLE | ||
1081 | ab_reset_markers(); | ||
1082 | #endif | ||
1083 | gwps_leave_wps(true); | ||
1084 | #ifdef HAVE_RECORDING | ||
1085 | if (button == ACTION_WPS_REC) | ||
1086 | return GO_TO_RECSCREEN; | ||
1087 | #endif | ||
1088 | if (global_settings.browse_current) | ||
1089 | return GO_TO_PREVIOUS_BROWSER; | ||
1090 | return GO_TO_PREVIOUS; | ||
1091 | } | ||
1092 | |||
1093 | if (button && !IS_SYSEVENT(button) ) | ||
1094 | storage_spin(); | ||
1095 | } | 1085 | } |
1096 | return GO_TO_ROOT; /* unreachable - just to reduce compiler warnings */ | 1086 | return GO_TO_ROOT; /* unreachable - just to reduce compiler warnings */ |
1097 | } | 1087 | } |
diff --git a/apps/menus/time_menu.c b/apps/menus/time_menu.c index b44d47ff8b..e37e2b5637 100644 --- a/apps/menus/time_menu.c +++ b/apps/menus/time_menu.c | |||
@@ -304,7 +304,7 @@ int time_screen(void* ignored) | |||
304 | #endif | 304 | #endif |
305 | 305 | ||
306 | ret = do_menu(&time_menu, NULL, menu, false); | 306 | ret = do_menu(&time_menu, NULL, menu, false); |
307 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 307 | pop_current_activity(); |
308 | /* see comments above in the button callback */ | 308 | /* see comments above in the button callback */ |
309 | if (!menu_was_pressed && ret == GO_TO_PREVIOUS) | 309 | if (!menu_was_pressed && ret == GO_TO_PREVIOUS) |
310 | return 0; | 310 | return 0; |
diff --git a/apps/misc.c b/apps/misc.c index aa79ec632d..71ab913139 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -1569,25 +1569,43 @@ int clamp_value_wrap(int value, int max, int min) | |||
1569 | static enum current_activity | 1569 | static enum current_activity |
1570 | current_activity[MAX_ACTIVITY_DEPTH] = {ACTIVITY_UNKNOWN}; | 1570 | current_activity[MAX_ACTIVITY_DEPTH] = {ACTIVITY_UNKNOWN}; |
1571 | static int current_activity_top = 0; | 1571 | static int current_activity_top = 0; |
1572 | void push_current_activity(enum current_activity screen) | 1572 | |
1573 | static void push_current_activity_refresh(enum current_activity screen, bool refresh) | ||
1573 | { | 1574 | { |
1574 | current_activity[current_activity_top++] = screen; | 1575 | current_activity[current_activity_top++] = screen; |
1575 | FOR_NB_SCREENS(i) | 1576 | FOR_NB_SCREENS(i) |
1576 | { | 1577 | { |
1577 | skinlist_set_cfg(i, NULL); | 1578 | skinlist_set_cfg(i, NULL); |
1578 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | 1579 | if (refresh) |
1580 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | ||
1579 | } | 1581 | } |
1580 | } | 1582 | } |
1581 | 1583 | ||
1582 | void push_activity_without_refresh(enum current_activity screen) | 1584 | static void pop_current_activity_refresh(bool refresh) |
1583 | { | 1585 | { |
1584 | current_activity[current_activity_top++] = screen; | 1586 | current_activity_top--; |
1585 | FOR_NB_SCREENS(i) | 1587 | FOR_NB_SCREENS(i) |
1588 | { | ||
1586 | skinlist_set_cfg(i, NULL); | 1589 | skinlist_set_cfg(i, NULL); |
1590 | if (refresh) | ||
1591 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | ||
1592 | } | ||
1593 | } | ||
1594 | |||
1595 | void push_current_activity(enum current_activity screen) | ||
1596 | { | ||
1597 | push_current_activity_refresh(screen, true); | ||
1598 | } | ||
1599 | |||
1600 | void push_activity_without_refresh(enum current_activity screen) | ||
1601 | { | ||
1602 | push_current_activity_refresh(screen, false); | ||
1587 | } | 1603 | } |
1588 | 1604 | ||
1589 | void pop_current_activity(enum activity_refresh refresh) | 1605 | void pop_current_activity(void) |
1590 | { | 1606 | { |
1607 | pop_current_activity_refresh(true); | ||
1608 | #if 0 | ||
1591 | current_activity_top--; | 1609 | current_activity_top--; |
1592 | FOR_NB_SCREENS(i) | 1610 | FOR_NB_SCREENS(i) |
1593 | { | 1611 | { |
@@ -1595,7 +1613,14 @@ void pop_current_activity(enum activity_refresh refresh) | |||
1595 | if (ACTIVITY_REFRESH_NOW == refresh) | 1613 | if (ACTIVITY_REFRESH_NOW == refresh) |
1596 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | 1614 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); |
1597 | } | 1615 | } |
1616 | #endif | ||
1598 | } | 1617 | } |
1618 | |||
1619 | void pop_current_activity_without_refresh(void) | ||
1620 | { | ||
1621 | pop_current_activity_refresh(false); | ||
1622 | } | ||
1623 | |||
1599 | enum current_activity get_current_activity(void) | 1624 | enum current_activity get_current_activity(void) |
1600 | { | 1625 | { |
1601 | return current_activity[current_activity_top?current_activity_top-1:0]; | 1626 | return current_activity[current_activity_top?current_activity_top-1:0]; |
diff --git a/apps/misc.h b/apps/misc.h index e59399d55b..463e772aa5 100644 --- a/apps/misc.h +++ b/apps/misc.h | |||
@@ -214,15 +214,10 @@ struct mp3entry; | |||
214 | int id3_get_replaygain_mode(const struct mp3entry *id3); | 214 | int id3_get_replaygain_mode(const struct mp3entry *id3); |
215 | void replaygain_update(void); | 215 | void replaygain_update(void); |
216 | 216 | ||
217 | enum activity_refresh | ||
218 | { | ||
219 | ACTIVITY_REFRESH_DEFERRED = 0, | ||
220 | ACTIVITY_REFRESH_NOW, | ||
221 | }; | ||
222 | |||
223 | void push_current_activity(enum current_activity screen); | 217 | void push_current_activity(enum current_activity screen); |
224 | void push_activity_without_refresh(enum current_activity screen); | 218 | void push_activity_without_refresh(enum current_activity screen); |
225 | void pop_current_activity(enum activity_refresh refresh); | 219 | void pop_current_activity(void); |
220 | void pop_current_activity_without_refresh(void); | ||
226 | enum current_activity get_current_activity(void); | 221 | enum current_activity get_current_activity(void); |
227 | 222 | ||
228 | /* format a sound value like: -1.05 dB */ | 223 | /* format a sound value like: -1.05 dB */ |
diff --git a/apps/onplay.c b/apps/onplay.c index 7ea6b9035b..0fae795fb3 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -148,7 +148,7 @@ static bool clipboard_clip(struct clipboard *clip, const char *path, | |||
148 | static int bookmark_load_menu_wrapper(void) | 148 | static int bookmark_load_menu_wrapper(void) |
149 | { | 149 | { |
150 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* get rid of parent activity */ | 150 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* get rid of parent activity */ |
151 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); /* when called from ctxt menu */ | 151 | pop_current_activity_without_refresh(); /* when called from ctxt menu */ |
152 | 152 | ||
153 | return bookmark_load_menu(); | 153 | return bookmark_load_menu(); |
154 | } | 154 | } |
@@ -474,7 +474,7 @@ static bool save_playlist(void) | |||
474 | static int wps_view_cur_playlist(void) | 474 | static int wps_view_cur_playlist(void) |
475 | { | 475 | { |
476 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* get rid of parent activity */ | 476 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* get rid of parent activity */ |
477 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); /* when called from ctxt menu */ | 477 | pop_current_activity_without_refresh(); /* when called from ctxt menu */ |
478 | 478 | ||
479 | playlist_viewer_ex(NULL, NULL); | 479 | playlist_viewer_ex(NULL, NULL); |
480 | 480 | ||
@@ -1520,7 +1520,7 @@ MENUITEM_FUNCTION(view_cue_item, 0, ID2P(LANG_BROWSE_CUESHEET), | |||
1520 | static int browse_id3_wrapper(void) | 1520 | static int browse_id3_wrapper(void) |
1521 | { | 1521 | { |
1522 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* get rid of parent activity */ | 1522 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* get rid of parent activity */ |
1523 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); /* when called from ctxt menu */ | 1523 | pop_current_activity_without_refresh(); /* when called from ctxt menu */ |
1524 | 1524 | ||
1525 | if (browse_id3(audio_current_track(), | 1525 | if (browse_id3(audio_current_track(), |
1526 | playlist_get_display_index(), | 1526 | playlist_get_display_index(), |
@@ -1979,7 +1979,7 @@ int onplay(char* file, int attr, int from, bool hotkey) | |||
1979 | menu_selection = do_menu(menu, NULL, NULL, false); | 1979 | menu_selection = do_menu(menu, NULL, NULL, false); |
1980 | 1980 | ||
1981 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* Activity may have been */ | 1981 | if (get_current_activity() == ACTIVITY_CONTEXTMENU) /* Activity may have been */ |
1982 | pop_current_activity(ACTIVITY_REFRESH_NOW); /* popped already by menu item */ | 1982 | pop_current_activity(); /* popped already by menu item */ |
1983 | 1983 | ||
1984 | switch (menu_selection) | 1984 | switch (menu_selection) |
1985 | { | 1985 | { |
diff --git a/apps/playlist_viewer.c b/apps/playlist_viewer.c index 4c57d1a5ce..80239367e4 100644 --- a/apps/playlist_viewer.c +++ b/apps/playlist_viewer.c | |||
@@ -143,7 +143,7 @@ static void format_line(const struct playlist_entry* track, char* str, | |||
143 | static bool update_playlist(bool force); | 143 | static bool update_playlist(bool force); |
144 | static enum pv_onplay_result onplay_menu(int index); | 144 | static enum pv_onplay_result onplay_menu(int index); |
145 | 145 | ||
146 | static void close_playlist_viewer(bool pop_activity); | 146 | static void close_playlist_viewer(void); |
147 | 147 | ||
148 | static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer, | 148 | static void playlist_buffer_init(struct playlist_buffer *pb, char *names_buffer, |
149 | int names_buffer_size) | 149 | int names_buffer_size) |
@@ -525,12 +525,12 @@ static enum pv_onplay_result show_track_info(const struct playlist_entry *curren | |||
525 | static enum pv_onplay_result open_with(const struct playlist_entry *current_track) | 525 | static enum pv_onplay_result open_with(const struct playlist_entry *current_track) |
526 | { | 526 | { |
527 | char selected_track[MAX_PATH]; | 527 | char selected_track[MAX_PATH]; |
528 | close_playlist_viewer(false); /* don't pop activity yet – relevant for plugin_load */ | 528 | close_playlist_viewer(); /* don't pop activity yet – relevant for plugin_load */ |
529 | 529 | ||
530 | strmemccpy(selected_track, current_track->name, sizeof(selected_track)); | 530 | strmemccpy(selected_track, current_track->name, sizeof(selected_track)); |
531 | 531 | ||
532 | int plugin_return = filetype_list_viewers(selected_track); | 532 | int plugin_return = filetype_list_viewers(selected_track); |
533 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 533 | pop_current_activity_without_refresh(); |
534 | 534 | ||
535 | switch (plugin_return) | 535 | switch (plugin_return) |
536 | { | 536 | { |
@@ -548,11 +548,11 @@ static enum pv_onplay_result open_with(const struct playlist_entry *current_trac | |||
548 | static enum pv_onplay_result open_pictureflow(const struct playlist_entry *current_track) | 548 | static enum pv_onplay_result open_pictureflow(const struct playlist_entry *current_track) |
549 | { | 549 | { |
550 | char selected_track[MAX_PATH]; | 550 | char selected_track[MAX_PATH]; |
551 | close_playlist_viewer(false); /* don't pop activity yet – relevant for plugin_load */ | 551 | close_playlist_viewer(); /* don't pop activity yet – relevant for plugin_load */ |
552 | 552 | ||
553 | strmemccpy(selected_track, current_track->name, sizeof(selected_track)); | 553 | strmemccpy(selected_track, current_track->name, sizeof(selected_track)); |
554 | int plugin_return = filetype_load_plugin((void *)"pictureflow", selected_track); | 554 | int plugin_return = filetype_load_plugin((void *)"pictureflow", selected_track); |
555 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 555 | pop_current_activity_without_refresh(); |
556 | 556 | ||
557 | switch (plugin_return) | 557 | switch (plugin_return) |
558 | { | 558 | { |
@@ -1093,15 +1093,14 @@ enum playlist_viewer_result playlist_viewer_ex(const char* filename, | |||
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | exit: | 1095 | exit: |
1096 | close_playlist_viewer(true); | 1096 | pop_current_activity_without_refresh(); |
1097 | close_playlist_viewer(); | ||
1097 | return ret; | 1098 | return ret; |
1098 | } | 1099 | } |
1099 | 1100 | ||
1100 | static void close_playlist_viewer(bool pop_activity) | 1101 | static void close_playlist_viewer(void) |
1101 | { | 1102 | { |
1102 | talk_shutup(); | 1103 | talk_shutup(); |
1103 | if (pop_activity) | ||
1104 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | ||
1105 | if (viewer.playlist) | 1104 | if (viewer.playlist) |
1106 | { | 1105 | { |
1107 | if (viewer.initial_selection) | 1106 | if (viewer.initial_selection) |
diff --git a/apps/plugin.c b/apps/plugin.c index 21dbe47c54..45829a42ad 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -925,14 +925,16 @@ int plugin_load(const char* plugin, const void* parameter) | |||
925 | 925 | ||
926 | tree_unlock_cache(tree_get_context()); | 926 | tree_unlock_cache(tree_get_context()); |
927 | 927 | ||
928 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 928 | pop_current_activity_without_refresh(); |
929 | int curr_activity = get_current_activity(); | 929 | if (rc != PLUGIN_GOTO_WPS) |
930 | if ((curr_activity != ACTIVITY_PLAYLISTVIEWER) && | ||
931 | (curr_activity != ACTIVITY_WPS) && | ||
932 | (rc != PLUGIN_GOTO_WPS)) | ||
933 | { | 930 | { |
934 | FOR_NB_SCREENS(i) | 931 | int curr_activity = get_current_activity(); |
935 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | 932 | if ((curr_activity != ACTIVITY_PLAYLISTVIEWER) && |
933 | (curr_activity != ACTIVITY_WPS)) | ||
934 | { | ||
935 | FOR_NB_SCREENS(i) | ||
936 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | ||
937 | } | ||
936 | } | 938 | } |
937 | 939 | ||
938 | if (!pfn_tsr_exit) | 940 | if (!pfn_tsr_exit) |
diff --git a/apps/plugins/pitch_screen.c b/apps/plugins/pitch_screen.c index 76e7fa9775..e24e0240a2 100644 --- a/apps/plugins/pitch_screen.c +++ b/apps/plugins/pitch_screen.c | |||
@@ -1109,7 +1109,7 @@ int gui_syncpitchscreen_run(void) | |||
1109 | } | 1109 | } |
1110 | 1110 | ||
1111 | //rb->pcmbuf_set_low_latency(false); | 1111 | //rb->pcmbuf_set_low_latency(false); |
1112 | //pop_current_activity(ACTIVITY_REFRESH_NOW); | 1112 | //pop_current_activity(); |
1113 | 1113 | ||
1114 | /* Clean up */ | 1114 | /* Clean up */ |
1115 | FOR_NB_SCREENS(i) | 1115 | FOR_NB_SCREENS(i) |
diff --git a/apps/radio/radio.c b/apps/radio/radio.c index a02d4429fa..bf8ad865dd 100644 --- a/apps/radio/radio.c +++ b/apps/radio/radio.c | |||
@@ -729,7 +729,7 @@ void radio_screen(void) | |||
729 | cpu_idle_mode(false); | 729 | cpu_idle_mode(false); |
730 | #endif | 730 | #endif |
731 | fms_fix_displays(FMS_EXIT); | 731 | fms_fix_displays(FMS_EXIT); |
732 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 732 | pop_current_activity(); |
733 | in_screen = false; | 733 | in_screen = false; |
734 | } /* radio_screen */ | 734 | } /* radio_screen */ |
735 | 735 | ||
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 374583cc21..6c52adf5d3 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -1844,7 +1844,7 @@ rec_abort: | |||
1844 | #endif | 1844 | #endif |
1845 | 1845 | ||
1846 | settings_save(); | 1846 | settings_save(); |
1847 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 1847 | pop_current_activity(); |
1848 | return (rec_status & RCSTAT_BEEN_IN_USB_MODE) != 0; | 1848 | return (rec_status & RCSTAT_BEEN_IN_USB_MODE) != 0; |
1849 | } /* recording_screen */ | 1849 | } /* recording_screen */ |
1850 | 1850 | ||
diff --git a/apps/root_menu.c b/apps/root_menu.c index 6008c87eda..89afae8c25 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c | |||
@@ -280,9 +280,9 @@ static int browser(void* param) | |||
280 | if (ret_val == GO_TO_WPS | 280 | if (ret_val == GO_TO_WPS |
281 | || ret_val == GO_TO_PREVIOUS_MUSIC | 281 | || ret_val == GO_TO_PREVIOUS_MUSIC |
282 | || ret_val == GO_TO_PLUGIN) | 282 | || ret_val == GO_TO_PLUGIN) |
283 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 283 | pop_current_activity_without_refresh(); |
284 | else | 284 | else |
285 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 285 | pop_current_activity(); |
286 | 286 | ||
287 | switch ((intptr_t)param) | 287 | switch ((intptr_t)param) |
288 | { | 288 | { |
@@ -355,10 +355,10 @@ static int wpsscrn(void* param) | |||
355 | || last_screen == GO_TO_SYSTEM_SCREEN | 355 | || last_screen == GO_TO_SYSTEM_SCREEN |
356 | || last_screen == GO_TO_PLAYLISTS_SCREEN))) | 356 | || last_screen == GO_TO_PLAYLISTS_SCREEN))) |
357 | { | 357 | { |
358 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 358 | pop_current_activity_without_refresh(); |
359 | } | 359 | } |
360 | else | 360 | else |
361 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 361 | pop_current_activity(); |
362 | 362 | ||
363 | return ret_val; | 363 | return ret_val; |
364 | } | 364 | } |
@@ -396,10 +396,10 @@ static int playlist_view_catalog(void * param) | |||
396 | 396 | ||
397 | if (item_was_selected) | 397 | if (item_was_selected) |
398 | { | 398 | { |
399 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 399 | pop_current_activity_without_refresh(); |
400 | return GO_TO_WPS; | 400 | return GO_TO_WPS; |
401 | } | 401 | } |
402 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 402 | pop_current_activity(); |
403 | return GO_TO_ROOT; | 403 | return GO_TO_ROOT; |
404 | } | 404 | } |
405 | 405 | ||
@@ -714,10 +714,10 @@ static inline int load_screen(int screen) | |||
714 | || ret_val == GO_TO_PREVIOUS_BROWSER | 714 | || ret_val == GO_TO_PREVIOUS_BROWSER |
715 | || ret_val == GO_TO_FILEBROWSER) | 715 | || ret_val == GO_TO_FILEBROWSER) |
716 | { | 716 | { |
717 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 717 | pop_current_activity_without_refresh(); |
718 | } | 718 | } |
719 | else | 719 | else |
720 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 720 | pop_current_activity(); |
721 | } | 721 | } |
722 | 722 | ||
723 | last_screen = screen; | 723 | last_screen = screen; |
@@ -744,7 +744,7 @@ static int load_context_screen(int selection) | |||
744 | 744 | ||
745 | if (context_menu) | 745 | if (context_menu) |
746 | retval = do_menu(context_menu, NULL, NULL, false); | 746 | retval = do_menu(context_menu, NULL, NULL, false); |
747 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 747 | pop_current_activity(); |
748 | return retval; | 748 | return retval; |
749 | } | 749 | } |
750 | 750 | ||
@@ -992,7 +992,7 @@ void root_menu(void) | |||
992 | 992 | ||
993 | push_activity_without_refresh(ACTIVITY_UNKNOWN); /* prevent plugin_load */ | 993 | push_activity_without_refresh(ACTIVITY_UNKNOWN); /* prevent plugin_load */ |
994 | next_screen = load_plugin_screen(key); /* from flashing root */ | 994 | next_screen = load_plugin_screen(key); /* from flashing root */ |
995 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); /* menu activity */ | 995 | pop_current_activity_without_refresh(); /* menu activity */ |
996 | 996 | ||
997 | if (next_screen == GO_TO_PREVIOUS) | 997 | if (next_screen == GO_TO_PREVIOUS) |
998 | { | 998 | { |
diff --git a/apps/screens.c b/apps/screens.c index 2ffdf68023..db24e534c1 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -733,7 +733,7 @@ bool browse_id3(struct mp3entry *id3, int playlist_display_index, int playlist_a | |||
733 | } | 733 | } |
734 | } | 734 | } |
735 | 735 | ||
736 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 736 | pop_current_activity(); |
737 | return ret; | 737 | return ret; |
738 | } | 738 | } |
739 | 739 | ||
diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 98edcf653e..cf372ce023 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c | |||
@@ -719,9 +719,9 @@ int do_shortcut_menu(void *ignored) | |||
719 | } | 719 | } |
720 | } | 720 | } |
721 | if (GO_TO_PLUGIN == done) | 721 | if (GO_TO_PLUGIN == done) |
722 | pop_current_activity(ACTIVITY_REFRESH_DEFERRED); | 722 | pop_current_activity_without_refresh(); |
723 | else | 723 | else |
724 | pop_current_activity(ACTIVITY_REFRESH_NOW); | 724 | pop_current_activity(); |
725 | --buflib_move_lock; | 725 | --buflib_move_lock; |
726 | 726 | ||
727 | return done; | 727 | return done; |