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/gui | |
parent | e3367212bd8a25cfe6468aa20adaacf4c5b0b2d4 (diff) |
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/gui')
-rw-r--r-- | apps/gui/splash.c | 1 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 39 | ||||
-rw-r--r-- | apps/gui/statusbar.h | 6 | ||||
-rw-r--r-- | apps/gui/textarea.c | 4 |
4 files changed, 23 insertions, 27 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c index ce8b3cd995..551888544f 100644 --- a/apps/gui/splash.c +++ b/apps/gui/splash.c @@ -56,6 +56,7 @@ static void splash(struct screen * screen, #ifdef HAVE_LCD_CHARCELLS screen->double_height (false); #endif + screen->stop_scroll(); vsnprintf( splash_buf, sizeof(splash_buf), fmt, ap ); if(center) { diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index dad317e9e2..02c69815a1 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c @@ -107,17 +107,17 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) #ifdef HAVE_LCD_BITMAP if(!global_settings.statusbar) return; -#endif +#endif /* HAVE_LCD_BITMAP */ struct screen * display = bar->display; #ifdef HAVE_RTC struct tm* tm; /* For Time */ -#endif +#endif /* HAVE_RTC */ #ifdef HAVE_LCD_CHARCELLS (void)force_redraw; /* players always "redraw" */ -#endif +#endif /* HAVE_LCD_CHARCELLS */ bar->info.volume = sound_val2phys(SOUND_VOLUME, global_settings.volume); bar->info.inserted = charger_inserted(); @@ -129,22 +129,22 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) tm = get_time(); bar->info.hour = tm->tm_hour; bar->info.minute = tm->tm_min; -#endif +#endif /* HAVE_RTC */ bar->info.shuffle = global_settings.playlist_shuffle; #if CONFIG_KEYPAD == IRIVER_H100_PAD bar->info.keylock = button_hold(); #else bar->info.keylock = keys_locked; -#endif +#endif /* CONFIG_KEYPAD == IRIVER_H100_PAD */ bar->info.repeat = global_settings.repeat_mode; bar->info.playmode = current_playmode(); -#if CONFIG_LED == LED_VIRTUAL - bar->info.led = led_read(HZ/2); /* delay should match polling interval */ -#endif + if(!display->has_disk_led) + bar->info.led = led_read(HZ/2); /* delay should match polling interval */ + #ifdef HAVE_USB_POWER bar->info.usb_power = usb_powered(); -#endif +#endif /* HAVE_USB_POWER */ /* only redraw if forced to, or info has changed */ if (force_redraw || @@ -161,7 +161,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) /* players always "redraw" */ { -#endif +#endif /* HAVE_LCD_BITMAP */ #ifdef HAVE_CHARGING if (bar->info.inserted) { @@ -220,7 +220,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) STATUSBAR_PLUG_X_POS, STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH, STATUSBAR_HEIGHT); -#endif +#endif /* HAVE_USB_POWER */ bar->info.redraw_volume = gui_statusbar_icon_volume(bar, bar->info.volume); @@ -232,7 +232,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) case REPEAT_AB: gui_statusbar_icon_play_mode(display, Icon_RepeatAB); break; -#endif +#endif /* AB_REPEAT_ENABLE */ case REPEAT_ONE: gui_statusbar_icon_play_mode(display, Icon_RepeatOne); @@ -249,14 +249,12 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) gui_statusbar_icon_lock(display); #ifdef HAVE_RTC gui_statusbar_time(display, bar->info.hour, bar->info.minute); -#endif -#if CONFIG_LED == LED_VIRTUAL - if (bar->info.led) - statusbar_led(); -#endif +#endif /* HAVE_RTC */ + if(!display->has_disk_led && bar->info.led) + gui_statusbar_led(display); display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT); bar->lastinfo = bar->info; -#endif +#endif /* HAVE_LCD_BITMAP */ } @@ -284,7 +282,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) display->icon(ICON_AUDIO, audio); display->icon(ICON_PARAM, param); display->icon(ICON_USB, usb); -#endif +#endif /* HAVE_LCD_CHARCELLS */ } #ifdef HAVE_LCD_BITMAP @@ -448,7 +446,6 @@ void gui_statusbar_icon_lock(struct screen * display) STATUSBAR_Y_POS, 5, 8); } -#if CONFIG_LED == LED_VIRTUAL /* * no real LED: disk activity in status bar */ @@ -459,8 +456,6 @@ void gui_statusbar_led(struct screen * display) STATUSBAR_Y_POS, STATUSBAR_DISK_WIDTH, STATUSBAR_HEIGHT); } -#endif - #ifdef HAVE_RTC /* diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h index afbdce6d5a..77ceefd69f 100644 --- a/apps/gui/statusbar.h +++ b/apps/gui/statusbar.h @@ -42,9 +42,8 @@ struct status_info { bool keylock; bool battery_safe; bool redraw_volume; /* true if the volume gauge needs updating */ -#if CONFIG_LED == LED_VIRTUAL bool led; /* disk LED simulation in the status bar */ -#endif + #ifdef HAVE_USB_POWER bool usb_power; #endif @@ -100,9 +99,8 @@ void gui_statusbar_icon_play_state(struct screen * display, int state); void gui_statusbar_icon_play_mode(struct screen * display, int mode); void gui_statusbar_icon_shuffle(struct screen * display); void gui_statusbar_icon_lock(struct screen * display); -#if CONFIG_LED == LED_VIRTUAL void gui_statusbar_led(struct screen * display); -#endif + #ifdef HAVE_RTC void gui_statusbar_time(struct screen * display, int hour, int minute); diff --git a/apps/gui/textarea.c b/apps/gui/textarea.c index d73f20d0e7..28ca2c5b29 100644 --- a/apps/gui/textarea.c +++ b/apps/gui/textarea.c @@ -18,6 +18,7 @@ ****************************************************************************/ #include "textarea.h" +#include "font.h" void gui_textarea_clear(struct screen * display) { @@ -27,6 +28,7 @@ void gui_textarea_clear(struct screen * display) screen_clear_area(display, 0, y_start, display->width, y_end - y_start); display->stop_scroll(); screen_set_ymargin(display, y_start); + display->setfont(FONT_SYSFIXED); #else display->clear_display(); #endif @@ -48,7 +50,7 @@ int gui_textarea_put_message(struct screen * display, int i; gui_textarea_clear(display); for(i=0;i<message->nb_lines && i+ystart<display->nb_lines;i++) - display->puts(0, i+ystart, message->message_lines[i]); + display->puts_scroll(0, i+ystart, message->message_lines[i]); gui_textarea_update(display); return(i); } |