summaryrefslogtreecommitdiffstats
path: root/apps/recorder/radio.c
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2005-11-20 01:02:14 +0000
committerKevin Ferrare <kevin@rockbox.org>2005-11-20 01:02:14 +0000
commit1a1abf25f43e33dfa7d421d6c43f283763226dbd (patch)
tree71e57b7c1f5d3c2521fbf2215e938b55fe77bb99 /apps/recorder/radio.c
parente3367212bd8a25cfe6468aa20adaacf4c5b0b2d4 (diff)
downloadrockbox-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.c38
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 @@
#include "textarea.h"
#include "splash.h"
#include "yesno.h"
+#include "buttonbar.h"
#include "power.h"
#ifdef CONFIG_TUNER
@@ -298,9 +299,13 @@ bool radio_screen(void)
int hours, minutes;
bool keep_playing = false;
bool statusbar = global_settings.statusbar;
+#ifdef HAS_BUTTONBAR
+ struct gui_buttonbar buttonbar;
+ gui_buttonbar_init(&buttonbar);
+ gui_buttonbar_set_display(&buttonbar, &(screens[SCREEN_MAIN]) );
+#endif
/* always display status bar in radio screen for now */
global_settings.statusbar = true;
-
FOR_NB_SCREENS(i){
gui_textarea_clear(&screens[i]);
screen_set_xmargin(&screens[i],0);
@@ -377,8 +382,8 @@ bool radio_screen(void)
radio_mode = RADIO_PRESET_MODE;
#endif
-#if CONFIG_KEYPAD == RECORDER_PAD
- buttonbar_set(str(LANG_BUTTONBAR_MENU), str(LANG_FM_BUTTONBAR_PRESETS),
+#ifdef HAS_BUTTONBAR
+ gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU), str(LANG_FM_BUTTONBAR_PRESETS),
str(LANG_FM_BUTTONBAR_RECORD));
#endif
@@ -613,10 +618,10 @@ bool radio_screen(void)
gui_textarea_clear(&screens[i]);
screen_set_xmargin(&screens[i],0);
}
-#if CONFIG_KEYPAD == RECORDER_PAD
- buttonbar_set(str(LANG_BUTTONBAR_MENU),
- str(LANG_FM_BUTTONBAR_PRESETS),
- str(LANG_FM_BUTTONBAR_RECORD));
+#ifdef HAS_BUTTONBAR
+ gui_buttonbar_set(&buttonbar, str(LANG_BUTTONBAR_MENU),
+ str(LANG_FM_BUTTONBAR_PRESETS),
+ str(LANG_FM_BUTTONBAR_RECORD));
#endif
update_screen = true;
break;
@@ -646,10 +651,11 @@ bool radio_screen(void)
gui_textarea_clear(&screens[i]);
screen_set_xmargin(&screens[i],0);
}
-#if CONFIG_KEYPAD == RECORDER_PAD
- buttonbar_set(str(LANG_BUTTONBAR_MENU),
- str(LANG_FM_BUTTONBAR_PRESETS),
- str(LANG_FM_BUTTONBAR_RECORD));
+#ifdef HAS_BUTTONBAR
+ gui_buttonbar_set(&buttonbar,
+ str(LANG_BUTTONBAR_MENU),
+ str(LANG_FM_BUTTONBAR_PRESETS),
+ str(LANG_FM_BUTTONBAR_RECORD));
#endif
update_screen = true;
break;
@@ -807,16 +813,16 @@ bool radio_screen(void)
screens[i].puts_scroll(0, top_of_screen + 4, buf);
}
}
-
-#if CONFIG_KEYPAD == RECORDER_PAD
- buttonbar_draw();
-#endif
+
+#if HAS_BUTTONBAR
+ gui_buttonbar_draw(&buttonbar);
+#endif
FOR_NB_SCREENS(i)
gui_textarea_update(&screens[i]);
}
/* Only force the redraw if update_screen is true */
gui_syncstatusbar_draw(&statusbars,true);
-
+
update_screen = false;
}