diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-09-03 20:47:23 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-09-03 20:47:23 +0000 |
commit | 0ad2010865165120a521272eef68d00b6a7b2edc (patch) | |
tree | 6384e594f4df2d0bca683528c3026accb67d3ab8 /apps/wps.c | |
parent | 5867b496593011017808d8b819da9fa0b347e8c9 (diff) | |
download | rockbox-0ad2010865165120a521272eef68d00b6a7b2edc.tar.gz rockbox-0ad2010865165120a521272eef68d00b6a7b2edc.zip |
Added dir filter toggle (mp3/m3u) to F2 quick-set screen.
Added UpArrow and DownArrow icons.
Simplified dir reload handling in tree.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2158 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/wps.c')
-rw-r--r-- | apps/wps.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/apps/wps.c b/apps/wps.c index 029ed44f55..e894cad774 100644 --- a/apps/wps.c +++ b/apps/wps.c | |||
@@ -638,15 +638,7 @@ bool f2_screen(void) | |||
638 | 638 | ||
639 | while (!exit) { | 639 | while (!exit) { |
640 | int w,h; | 640 | int w,h; |
641 | char* ptr; | 641 | char buf[32]; |
642 | |||
643 | ptr = "Repeat"; | ||
644 | #ifdef LCD_PROPFONTS | ||
645 | lcd_getstringsize(ptr,0,&w,&h); | ||
646 | #else | ||
647 | lcd_getfontsize(0,&w,&h); | ||
648 | w *= strlen(ptr); | ||
649 | #endif | ||
650 | 642 | ||
651 | lcd_clear_display(); | 643 | lcd_clear_display(); |
652 | 644 | ||
@@ -657,13 +649,18 @@ bool f2_screen(void) | |||
657 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 649 | lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
658 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); | 650 | LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8, true); |
659 | 651 | ||
660 | /* commented out until we really can disable repeat | 652 | snprintf(buf, sizeof buf, "Dir filter: %s", |
661 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h*2, ptr, 0); | 653 | global_settings.mp3filter ? "on" : "off"); |
662 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2 - h, "mode:", 0); | 654 | #ifdef LCD_PROPFONTS |
663 | lcd_putsxy(LCD_WIDTH - w, LCD_HEIGHT/2, "on", 0 ); | 655 | lcd_getstringsize(buf,0,&w,&h); |
664 | lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], | 656 | #else |
665 | LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8, true); | 657 | lcd_getfontsize(0,&w,&h); |
666 | */ | 658 | w *= strlen(buf); |
659 | #endif | ||
660 | lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, buf, 0); | ||
661 | lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], | ||
662 | LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8, true); | ||
663 | |||
667 | lcd_update(); | 664 | lcd_update(); |
668 | 665 | ||
669 | switch (button_get(true)) { | 666 | switch (button_get(true)) { |
@@ -678,9 +675,9 @@ bool f2_screen(void) | |||
678 | sort_playlist(true); | 675 | sort_playlist(true); |
679 | break; | 676 | break; |
680 | 677 | ||
681 | case BUTTON_RIGHT: | 678 | case BUTTON_DOWN: |
682 | case BUTTON_F2 | BUTTON_RIGHT: | 679 | case BUTTON_F2 | BUTTON_DOWN: |
683 | /* toggle repeat */ | 680 | global_settings.mp3filter = !global_settings.mp3filter; |
684 | break; | 681 | break; |
685 | 682 | ||
686 | #ifdef SIMULATOR | 683 | #ifdef SIMULATOR |