diff options
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, | |||
56 | #ifdef HAVE_LCD_CHARCELLS | 56 | #ifdef HAVE_LCD_CHARCELLS |
57 | screen->double_height (false); | 57 | screen->double_height (false); |
58 | #endif | 58 | #endif |
59 | screen->stop_scroll(); | ||
59 | vsnprintf( splash_buf, sizeof(splash_buf), fmt, ap ); | 60 | vsnprintf( splash_buf, sizeof(splash_buf), fmt, ap ); |
60 | 61 | ||
61 | if(center) { | 62 | 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) | |||
107 | #ifdef HAVE_LCD_BITMAP | 107 | #ifdef HAVE_LCD_BITMAP |
108 | if(!global_settings.statusbar) | 108 | if(!global_settings.statusbar) |
109 | return; | 109 | return; |
110 | #endif | 110 | #endif /* HAVE_LCD_BITMAP */ |
111 | 111 | ||
112 | struct screen * display = bar->display; | 112 | struct screen * display = bar->display; |
113 | 113 | ||
114 | #ifdef HAVE_RTC | 114 | #ifdef HAVE_RTC |
115 | struct tm* tm; /* For Time */ | 115 | struct tm* tm; /* For Time */ |
116 | #endif | 116 | #endif /* HAVE_RTC */ |
117 | 117 | ||
118 | #ifdef HAVE_LCD_CHARCELLS | 118 | #ifdef HAVE_LCD_CHARCELLS |
119 | (void)force_redraw; /* players always "redraw" */ | 119 | (void)force_redraw; /* players always "redraw" */ |
120 | #endif | 120 | #endif /* HAVE_LCD_CHARCELLS */ |
121 | 121 | ||
122 | bar->info.volume = sound_val2phys(SOUND_VOLUME, global_settings.volume); | 122 | bar->info.volume = sound_val2phys(SOUND_VOLUME, global_settings.volume); |
123 | bar->info.inserted = charger_inserted(); | 123 | bar->info.inserted = charger_inserted(); |
@@ -129,22 +129,22 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
129 | tm = get_time(); | 129 | tm = get_time(); |
130 | bar->info.hour = tm->tm_hour; | 130 | bar->info.hour = tm->tm_hour; |
131 | bar->info.minute = tm->tm_min; | 131 | bar->info.minute = tm->tm_min; |
132 | #endif | 132 | #endif /* HAVE_RTC */ |
133 | 133 | ||
134 | bar->info.shuffle = global_settings.playlist_shuffle; | 134 | bar->info.shuffle = global_settings.playlist_shuffle; |
135 | #if CONFIG_KEYPAD == IRIVER_H100_PAD | 135 | #if CONFIG_KEYPAD == IRIVER_H100_PAD |
136 | bar->info.keylock = button_hold(); | 136 | bar->info.keylock = button_hold(); |
137 | #else | 137 | #else |
138 | bar->info.keylock = keys_locked; | 138 | bar->info.keylock = keys_locked; |
139 | #endif | 139 | #endif /* CONFIG_KEYPAD == IRIVER_H100_PAD */ |
140 | bar->info.repeat = global_settings.repeat_mode; | 140 | bar->info.repeat = global_settings.repeat_mode; |
141 | bar->info.playmode = current_playmode(); | 141 | bar->info.playmode = current_playmode(); |
142 | #if CONFIG_LED == LED_VIRTUAL | 142 | if(!display->has_disk_led) |
143 | bar->info.led = led_read(HZ/2); /* delay should match polling interval */ | 143 | bar->info.led = led_read(HZ/2); /* delay should match polling interval */ |
144 | #endif | 144 | |
145 | #ifdef HAVE_USB_POWER | 145 | #ifdef HAVE_USB_POWER |
146 | bar->info.usb_power = usb_powered(); | 146 | bar->info.usb_power = usb_powered(); |
147 | #endif | 147 | #endif /* HAVE_USB_POWER */ |
148 | 148 | ||
149 | /* only redraw if forced to, or info has changed */ | 149 | /* only redraw if forced to, or info has changed */ |
150 | if (force_redraw || | 150 | if (force_redraw || |
@@ -161,7 +161,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
161 | 161 | ||
162 | /* players always "redraw" */ | 162 | /* players always "redraw" */ |
163 | { | 163 | { |
164 | #endif | 164 | #endif /* HAVE_LCD_BITMAP */ |
165 | 165 | ||
166 | #ifdef HAVE_CHARGING | 166 | #ifdef HAVE_CHARGING |
167 | if (bar->info.inserted) { | 167 | if (bar->info.inserted) { |
@@ -220,7 +220,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
220 | STATUSBAR_PLUG_X_POS, | 220 | STATUSBAR_PLUG_X_POS, |
221 | STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH, | 221 | STATUSBAR_Y_POS, STATUSBAR_PLUG_WIDTH, |
222 | STATUSBAR_HEIGHT); | 222 | STATUSBAR_HEIGHT); |
223 | #endif | 223 | #endif /* HAVE_USB_POWER */ |
224 | 224 | ||
225 | bar->info.redraw_volume = gui_statusbar_icon_volume(bar, | 225 | bar->info.redraw_volume = gui_statusbar_icon_volume(bar, |
226 | bar->info.volume); | 226 | bar->info.volume); |
@@ -232,7 +232,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
232 | case REPEAT_AB: | 232 | case REPEAT_AB: |
233 | gui_statusbar_icon_play_mode(display, Icon_RepeatAB); | 233 | gui_statusbar_icon_play_mode(display, Icon_RepeatAB); |
234 | break; | 234 | break; |
235 | #endif | 235 | #endif /* AB_REPEAT_ENABLE */ |
236 | 236 | ||
237 | case REPEAT_ONE: | 237 | case REPEAT_ONE: |
238 | gui_statusbar_icon_play_mode(display, Icon_RepeatOne); | 238 | gui_statusbar_icon_play_mode(display, Icon_RepeatOne); |
@@ -249,14 +249,12 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
249 | gui_statusbar_icon_lock(display); | 249 | gui_statusbar_icon_lock(display); |
250 | #ifdef HAVE_RTC | 250 | #ifdef HAVE_RTC |
251 | gui_statusbar_time(display, bar->info.hour, bar->info.minute); | 251 | gui_statusbar_time(display, bar->info.hour, bar->info.minute); |
252 | #endif | 252 | #endif /* HAVE_RTC */ |
253 | #if CONFIG_LED == LED_VIRTUAL | 253 | if(!display->has_disk_led && bar->info.led) |
254 | if (bar->info.led) | 254 | gui_statusbar_led(display); |
255 | statusbar_led(); | ||
256 | #endif | ||
257 | display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT); | 255 | display->update_rect(0, 0, display->width, STATUSBAR_HEIGHT); |
258 | bar->lastinfo = bar->info; | 256 | bar->lastinfo = bar->info; |
259 | #endif | 257 | #endif /* HAVE_LCD_BITMAP */ |
260 | } | 258 | } |
261 | 259 | ||
262 | 260 | ||
@@ -284,7 +282,7 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
284 | display->icon(ICON_AUDIO, audio); | 282 | display->icon(ICON_AUDIO, audio); |
285 | display->icon(ICON_PARAM, param); | 283 | display->icon(ICON_PARAM, param); |
286 | display->icon(ICON_USB, usb); | 284 | display->icon(ICON_USB, usb); |
287 | #endif | 285 | #endif /* HAVE_LCD_CHARCELLS */ |
288 | } | 286 | } |
289 | 287 | ||
290 | #ifdef HAVE_LCD_BITMAP | 288 | #ifdef HAVE_LCD_BITMAP |
@@ -448,7 +446,6 @@ void gui_statusbar_icon_lock(struct screen * display) | |||
448 | STATUSBAR_Y_POS, 5, 8); | 446 | STATUSBAR_Y_POS, 5, 8); |
449 | } | 447 | } |
450 | 448 | ||
451 | #if CONFIG_LED == LED_VIRTUAL | ||
452 | /* | 449 | /* |
453 | * no real LED: disk activity in status bar | 450 | * no real LED: disk activity in status bar |
454 | */ | 451 | */ |
@@ -459,8 +456,6 @@ void gui_statusbar_led(struct screen * display) | |||
459 | STATUSBAR_Y_POS, STATUSBAR_DISK_WIDTH, | 456 | STATUSBAR_Y_POS, STATUSBAR_DISK_WIDTH, |
460 | STATUSBAR_HEIGHT); | 457 | STATUSBAR_HEIGHT); |
461 | } | 458 | } |
462 | #endif | ||
463 | |||
464 | 459 | ||
465 | #ifdef HAVE_RTC | 460 | #ifdef HAVE_RTC |
466 | /* | 461 | /* |
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 { | |||
42 | bool keylock; | 42 | bool keylock; |
43 | bool battery_safe; | 43 | bool battery_safe; |
44 | bool redraw_volume; /* true if the volume gauge needs updating */ | 44 | bool redraw_volume; /* true if the volume gauge needs updating */ |
45 | #if CONFIG_LED == LED_VIRTUAL | ||
46 | bool led; /* disk LED simulation in the status bar */ | 45 | bool led; /* disk LED simulation in the status bar */ |
47 | #endif | 46 | |
48 | #ifdef HAVE_USB_POWER | 47 | #ifdef HAVE_USB_POWER |
49 | bool usb_power; | 48 | bool usb_power; |
50 | #endif | 49 | #endif |
@@ -100,9 +99,8 @@ void gui_statusbar_icon_play_state(struct screen * display, int state); | |||
100 | void gui_statusbar_icon_play_mode(struct screen * display, int mode); | 99 | void gui_statusbar_icon_play_mode(struct screen * display, int mode); |
101 | void gui_statusbar_icon_shuffle(struct screen * display); | 100 | void gui_statusbar_icon_shuffle(struct screen * display); |
102 | void gui_statusbar_icon_lock(struct screen * display); | 101 | void gui_statusbar_icon_lock(struct screen * display); |
103 | #if CONFIG_LED == LED_VIRTUAL | ||
104 | void gui_statusbar_led(struct screen * display); | 102 | void gui_statusbar_led(struct screen * display); |
105 | #endif | 103 | |
106 | 104 | ||
107 | #ifdef HAVE_RTC | 105 | #ifdef HAVE_RTC |
108 | void gui_statusbar_time(struct screen * display, int hour, int minute); | 106 | 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 @@ | |||
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | #include "textarea.h" | 20 | #include "textarea.h" |
21 | #include "font.h" | ||
21 | 22 | ||
22 | void gui_textarea_clear(struct screen * display) | 23 | void gui_textarea_clear(struct screen * display) |
23 | { | 24 | { |
@@ -27,6 +28,7 @@ void gui_textarea_clear(struct screen * display) | |||
27 | screen_clear_area(display, 0, y_start, display->width, y_end - y_start); | 28 | screen_clear_area(display, 0, y_start, display->width, y_end - y_start); |
28 | display->stop_scroll(); | 29 | display->stop_scroll(); |
29 | screen_set_ymargin(display, y_start); | 30 | screen_set_ymargin(display, y_start); |
31 | display->setfont(FONT_SYSFIXED); | ||
30 | #else | 32 | #else |
31 | display->clear_display(); | 33 | display->clear_display(); |
32 | #endif | 34 | #endif |
@@ -48,7 +50,7 @@ int gui_textarea_put_message(struct screen * display, | |||
48 | int i; | 50 | int i; |
49 | gui_textarea_clear(display); | 51 | gui_textarea_clear(display); |
50 | for(i=0;i<message->nb_lines && i+ystart<display->nb_lines;i++) | 52 | for(i=0;i<message->nb_lines && i+ystart<display->nb_lines;i++) |
51 | display->puts(0, i+ystart, message->message_lines[i]); | 53 | display->puts_scroll(0, i+ystart, message->message_lines[i]); |
52 | gui_textarea_update(display); | 54 | gui_textarea_update(display); |
53 | return(i); | 55 | return(i); |
54 | } | 56 | } |