summaryrefslogtreecommitdiff
path: root/apps/recorder/radio.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-12-09 07:25:46 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-12-09 07:25:46 +0000
commitb2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24 (patch)
treeff3c0e14e9a53c08749ee1f233a5b1e887d3561a /apps/recorder/radio.c
parent85aad9b3972208b0e34ba0241ebb5314118ae05e (diff)
downloadrockbox-b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24.tar.gz
rockbox-b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24.zip
FS#10824 - viewport/statusbar API rework.
Hopefully the only user visible changes are: - fm and recording screens go by the statusbar setting (sbs or inbuilt) - plugins go back to using the theme as they should for menus and lists - splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later. - hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed New GUI screen rules: * Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit * Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly. ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/radio.c')
-rw-r--r--apps/recorder/radio.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index 87614aec15..d49b94d434 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -494,7 +494,6 @@ int radio_screen(void)
494 int button_timeout = current_tick + (2*HZ); 494 int button_timeout = current_tick + (2*HZ);
495#endif 495#endif
496 struct viewport vp[NB_SCREENS]; 496 struct viewport vp[NB_SCREENS];
497 int oldbars = 0, fmbars = VP_SB_ALLSCREENS;
498#ifdef HAVE_BUTTONBAR 497#ifdef HAVE_BUTTONBAR
499 struct gui_buttonbar buttonbar; 498 struct gui_buttonbar buttonbar;
500 gui_buttonbar_init(&buttonbar); 499 gui_buttonbar_init(&buttonbar);
@@ -506,9 +505,6 @@ int radio_screen(void)
506 505
507 /* always display status bar in radio screen for now */ 506 /* always display status bar in radio screen for now */
508 FOR_NB_SCREENS(i) 507 FOR_NB_SCREENS(i)
509 fmbars |= VP_SB_IGNORE_SETTING(i);
510 oldbars = viewportmanager_set_statusbar(fmbars);
511 FOR_NB_SCREENS(i)
512 { 508 {
513 viewport_set_defaults(&vp[i], i); 509 viewport_set_defaults(&vp[i], i);
514#ifdef HAVE_BUTTONBAR 510#ifdef HAVE_BUTTONBAR
@@ -761,14 +757,14 @@ int radio_screen(void)
761 break; 757 break;
762 758
763 case ACTION_FM_MENU: 759 case ACTION_FM_MENU:
764 viewportmanager_set_statusbar(oldbars);
765 FOR_NB_SCREENS(i) 760 FOR_NB_SCREENS(i)
761 {
766 screens[i].scroll_stop(&vp[i]); 762 screens[i].scroll_stop(&vp[i]);
763 }
767 radio_menu(); 764 radio_menu();
768 curr_preset = find_preset(curr_freq); 765 curr_preset = find_preset(curr_freq);
769 viewportmanager_set_statusbar(fmbars);
770 FOR_NB_SCREENS(i) 766 FOR_NB_SCREENS(i)
771 { 767 {
772 screens[i].set_viewport(&vp[i]); 768 screens[i].set_viewport(&vp[i]);
773 screens[i].clear_viewport(); 769 screens[i].clear_viewport();
774 screens[i].update_viewport(); 770 screens[i].update_viewport();
@@ -798,9 +794,7 @@ int radio_screen(void)
798 794
799 break; 795 break;
800 } 796 }
801 viewportmanager_set_statusbar(oldbars);
802 handle_radio_presets(); 797 handle_radio_presets();
803 viewportmanager_set_statusbar(fmbars);
804 FOR_NB_SCREENS(i) 798 FOR_NB_SCREENS(i)
805 { 799 {
806 screens[i].set_viewport(&vp[i]); 800 screens[i].set_viewport(&vp[i]);
@@ -932,12 +926,9 @@ int radio_screen(void)
932 FOR_NB_SCREENS(i) 926 FOR_NB_SCREENS(i)
933 { 927 {
934 screens[i].set_viewport(&vp[i]); 928 screens[i].set_viewport(&vp[i]);
935 peak_meter_screen(&screens[i],0, 929 peak_meter_screen(&screens[i],0, fh*(top_of_screen + 4),fh);
936 STATUSBAR_HEIGHT + fh*(top_of_screen + 4), 930 screens[i].update_rect(0, fh*(top_of_screen + 4),
937 fh); 931 screens[i].getwidth(), fh);
938 screens[i].update_rect(0,
939 STATUSBAR_HEIGHT + fh*(top_of_screen + 4),
940 screens[i].getwidth(), fh);
941 screens[i].set_viewport(NULL); 932 screens[i].set_viewport(NULL);
942 } 933 }
943 } 934 }
@@ -1134,8 +1125,9 @@ int radio_screen(void)
1134 cpu_idle_mode(false); 1125 cpu_idle_mode(false);
1135#endif 1126#endif
1136 FOR_NB_SCREENS(i) 1127 FOR_NB_SCREENS(i)
1128 {
1137 screens[i].scroll_stop(&vp[i]); 1129 screens[i].scroll_stop(&vp[i]);
1138 viewportmanager_set_statusbar(oldbars); 1130 }
1139 in_screen = false; 1131 in_screen = false;
1140#if CONFIG_CODEC != SWCODEC 1132#if CONFIG_CODEC != SWCODEC
1141 return have_recorded; 1133 return have_recorded;