diff options
author | Kevin Ferrare <kevin@rockbox.org> | 2005-11-20 01:02:14 +0000 |
---|---|---|
committer | Kevin Ferrare <kevin@rockbox.org> | 2005-11-20 01:02:14 +0000 |
commit | 1a1abf25f43e33dfa7d421d6c43f283763226dbd (patch) | |
tree | 71e57b7c1f5d3c2521fbf2215e938b55fe77bb99 /apps/recorder/radio.c | |
parent | e3367212bd8a25cfe6468aa20adaacf4c5b0b2d4 (diff) | |
download | rockbox-1a1abf25f43e33dfa7d421d6c43f283763226dbd.tar.gz rockbox-1a1abf25f43e33dfa7d421d6c43f283763226dbd.zip |
removed old statusbar and buttonbar code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8004 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/radio.c')
-rw-r--r-- | apps/recorder/radio.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index ff1d49bd2a..a6b540dd3d 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "textarea.h" | 56 | #include "textarea.h" |
57 | #include "splash.h" | 57 | #include "splash.h" |
58 | #include "yesno.h" | 58 | #include "yesno.h" |
59 | #include "buttonbar.h" | ||
59 | #include "power.h" | 60 | #include "power.h" |
60 | 61 | ||
61 | #ifdef CONFIG_TUNER | 62 | #ifdef CONFIG_TUNER |
@@ -298,9 +299,13 @@ bool radio_screen(void) | |||
298 | int hours, minutes; | 299 | int hours, minutes; |
299 | bool keep_playing = false; | 300 | bool keep_playing = false; |
300 | bool statusbar = global_settings.statusbar; | 301 | bool statusbar = global_settings.statusbar; |
302 | #ifdef HAS_BUTTONBAR | ||
303 | struct gui_buttonbar buttonbar; | ||
304 | gui_buttonbar_init(&buttonbar); | ||
305 | gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) ); | ||
306 | #endif | ||
301 | /* always display status bar in radio screen for now */ | 307 | /* always display status bar in radio screen for now */ |
302 | global_settings.statusbar = true; | 308 | global_settings.statusbar = true; |
303 | |||
304 | FOR_NB_SCREENS(i){ | 309 | FOR_NB_SCREENS(i){ |
305 | gui_textarea_clear(&screens[i]); | 310 | gui_textarea_clear(&screens[i]); |
306 | screen_set_xmargin(&screens[i],0); | 311 | screen_set_xmargin(&screens[i],0); |
@@ -377,8 +382,8 @@ bool radio_screen(void) | |||
377 | radio_mode = RADIO_PRESET_MODE; | 382 | radio_mode = RADIO_PRESET_MODE; |
378 | #endif | 383 | #endif |
379 | 384 | ||
380 | #if CONFIG_KEYPAD == RECORDER_PAD | 385 | #ifdef HAS_BUTTONBAR |
381 | buttonbar_set(str(LANG_BUTTONBAR_MENU), str(LANG_FM_BUTTONBAR_PRESETS), | 386 | gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU), str(LANG_FM_BUTTONBAR_PRESETS), |
382 | str(LANG_FM_BUTTONBAR_RECORD)); | 387 | str(LANG_FM_BUTTONBAR_RECORD)); |
383 | #endif | 388 | #endif |
384 | 389 | ||
@@ -613,10 +618,10 @@ bool radio_screen(void) | |||
613 | gui_textarea_clear(&screens[i]); | 618 | gui_textarea_clear(&screens[i]); |
614 | screen_set_xmargin(&screens[i],0); | 619 | screen_set_xmargin(&screens[i],0); |
615 | } | 620 | } |
616 | #if CONFIG_KEYPAD == RECORDER_PAD | 621 | #ifdef HAS_BUTTONBAR |
617 | buttonbar_set(str(LANG_BUTTONBAR_MENU), | 622 | gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU), |
618 | str(LANG_FM_BUTTONBAR_PRESETS), | 623 | str(LANG_FM_BUTTONBAR_PRESETS), |
619 | str(LANG_FM_BUTTONBAR_RECORD)); | 624 | str(LANG_FM_BUTTONBAR_RECORD)); |
620 | #endif | 625 | #endif |
621 | update_screen = true; | 626 | update_screen = true; |
622 | break; | 627 | break; |
@@ -646,10 +651,11 @@ bool radio_screen(void) | |||
646 | gui_textarea_clear(&screens[i]); | 651 | gui_textarea_clear(&screens[i]); |
647 | screen_set_xmargin(&screens[i],0); | 652 | screen_set_xmargin(&screens[i],0); |
648 | } | 653 | } |
649 | #if CONFIG_KEYPAD == RECORDER_PAD | 654 | #ifdef HAS_BUTTONBAR |
650 | buttonbar_set(str(LANG_BUTTONBAR_MENU), | 655 | gui_buttonbar_set(&buttonbar, |
651 | str(LANG_FM_BUTTONBAR_PRESETS), | 656 | str(LANG_BUTTONBAR_MENU), |
652 | str(LANG_FM_BUTTONBAR_RECORD)); | 657 | str(LANG_FM_BUTTONBAR_PRESETS), |
658 | str(LANG_FM_BUTTONBAR_RECORD)); | ||
653 | #endif | 659 | #endif |
654 | update_screen = true; | 660 | update_screen = true; |
655 | break; | 661 | break; |
@@ -807,16 +813,16 @@ bool radio_screen(void) | |||
807 | screens[i].puts_scroll(0, top_of_screen + 4, buf); | 813 | screens[i].puts_scroll(0, top_of_screen + 4, buf); |
808 | } | 814 | } |
809 | } | 815 | } |
810 | 816 | ||
811 | #if CONFIG_KEYPAD == RECORDER_PAD | 817 | #if HAS_BUTTONBAR |
812 | buttonbar_draw(); | 818 | gui_buttonbar_draw(&buttonbar); |
813 | #endif | 819 | #endif |
814 | FOR_NB_SCREENS(i) | 820 | FOR_NB_SCREENS(i) |
815 | gui_textarea_update(&screens[i]); | 821 | gui_textarea_update(&screens[i]); |
816 | } | 822 | } |
817 | /* Only force the redraw if update_screen is true */ | 823 | /* Only force the redraw if update_screen is true */ |
818 | gui_syncstatusbar_draw(&statusbars,true); | 824 | gui_syncstatusbar_draw(&statusbars,true); |
819 | 825 | ||
820 | update_screen = false; | 826 | update_screen = false; |
821 | } | 827 | } |
822 | 828 | ||