summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
authorMarkus Braun <markus.braun@krawel.de>2002-08-07 10:35:26 +0000
committerMarkus Braun <markus.braun@krawel.de>2002-08-07 10:35:26 +0000
commitde8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9 (patch)
tree5cc60884b43b291f3878527413c4d7f21f210624 /apps/playlist.c
parent999e2127af292ffac2d36dcb54b78a2f1abce6bf (diff)
downloadrockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.tar.gz
rockbox-de8fbf00a8a4a2c85fc9ee4b2758881f4ec435d9.zip
Added status bar to file browser and wps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1582 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 44d1e34349..48c66dbc80 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -30,6 +30,13 @@
30#include "lcd.h" 30#include "lcd.h"
31#include "kernel.h" 31#include "kernel.h"
32#include "settings.h" 32#include "settings.h"
33#include "status.h"
34
35#ifdef HAVE_LCD_BITMAP
36#define LINE_Y (global_settings.statusbar&&statusbar_enabled?1:0) /* Y position the entry-list starts at */
37#else /* HAVE_LCD_BITMAP */
38#define LINE_Y 0 /* Y position the entry-list starts at */
39#endif /* HAVE_LCD_BITMAP */
33 40
34playlist_info_t playlist; 41playlist_info_t playlist;
35 42
@@ -165,7 +172,8 @@ void play_list(char *dir, char *file, int start_index)
165 /* If file is NULL, the list is in RAM */ 172 /* If file is NULL, the list is in RAM */
166 if(file) { 173 if(file) {
167 lcd_clear_display(); 174 lcd_clear_display();
168 lcd_puts(0,0,"Loading..."); 175 lcd_puts(0,LINE_Y,"Loading...");
176 status_draw();
169 lcd_update(); 177 lcd_update();
170 playlist.in_ram = false; 178 playlist.in_ram = false;
171 } else { 179 } else {
@@ -194,14 +202,16 @@ void play_list(char *dir, char *file, int start_index)
194 202
195 if(global_settings.playlist_shuffle) { 203 if(global_settings.playlist_shuffle) {
196 if(!playlist.in_ram) { 204 if(!playlist.in_ram) {
197 lcd_puts(0,0,"Shuffling..."); 205 lcd_puts(0,LINE_Y,"Shuffling...");
206 status_draw();
198 lcd_update(); 207 lcd_update();
199 } 208 }
200 randomise_playlist( current_tick ); 209 randomise_playlist( current_tick );
201 } 210 }
202 211
203 if(!playlist.in_ram) { 212 if(!playlist.in_ram) {
204 lcd_puts(0,0,"Playing... "); 213 lcd_puts(0,LINE_Y,"Playing... ");
214 status_draw();
205 lcd_update(); 215 lcd_update();
206 } 216 }
207 /* also make the first song get playing */ 217 /* also make the first song get playing */
@@ -287,7 +297,8 @@ void add_indices_to_playlist(void)
287 next_tick = current_tick + HZ; 297 next_tick = current_tick + HZ;
288 snprintf(line, sizeof line, "%d files", 298 snprintf(line, sizeof line, "%d files",
289 playlist.amount); 299 playlist.amount);
290 lcd_puts(0,1,line); 300 lcd_puts(0,LINE_Y+1,line);
301 status_draw();
291 lcd_update(); 302 lcd_update();
292 } 303 }
293 } 304 }
@@ -301,7 +312,8 @@ void add_indices_to_playlist(void)
301 } 312 }
302 if(!playlist.in_ram) { 313 if(!playlist.in_ram) {
303 snprintf(line, sizeof line, "%d files", playlist.amount); 314 snprintf(line, sizeof line, "%d files", playlist.amount);
304 lcd_puts(0,1,line); 315 lcd_puts(0,LINE_Y+1,line);
316 status_draw();
305 lcd_update(); 317 lcd_update();
306 close(fd); 318 close(fd);
307 } 319 }