diff options
author | Kevin Ferrare <kevin@rockbox.org> | 2005-11-22 21:55:05 +0000 |
---|---|---|
committer | Kevin Ferrare <kevin@rockbox.org> | 2005-11-22 21:55:05 +0000 |
commit | f57d0220dd216937a210a18f8ab8394091bb6a08 (patch) | |
tree | 79b724000023174b931ce898a42f8a2fbf6d1438 /apps | |
parent | fd02642ee0238ae2b32b7a5ea7005abf0e72489d (diff) | |
download | rockbox-f57d0220dd216937a210a18f8ab8394091bb6a08.tar.gz rockbox-f57d0220dd216937a210a18f8ab8394091bb6a08.zip |
Adapted and commited Markus Kaufhold's remote hold icon on statusbar patch for iriver ; generic logo handler (now it's possible to have a different USB logo on main screen and on remote), made the quickscreen behave as it was before
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8044 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/SOURCES | 1 | ||||
-rw-r--r-- | apps/gui/gwps.c | 4 | ||||
-rw-r--r-- | apps/gui/logo.c | 94 | ||||
-rw-r--r-- | apps/gui/logo.h | 43 | ||||
-rw-r--r-- | apps/gui/quickscreen.c | 28 | ||||
-rw-r--r-- | apps/gui/quickscreen.h | 11 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 61 | ||||
-rw-r--r-- | apps/gui/statusbar.h | 5 | ||||
-rw-r--r-- | apps/recorder/icons.c | 6 | ||||
-rw-r--r-- | apps/recorder/icons.h | 14 | ||||
-rw-r--r-- | apps/screens.c | 70 | ||||
-rw-r--r-- | apps/screens.h | 4 | ||||
-rw-r--r-- | apps/tree.c | 4 |
13 files changed, 236 insertions, 109 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index c4eee62714..c811dd2757 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -36,6 +36,7 @@ gui/gwps.c | |||
36 | gui/gwps-common.c | 36 | gui/gwps-common.c |
37 | gui/icon.c | 37 | gui/icon.c |
38 | gui/list.c | 38 | gui/list.c |
39 | gui/logo.c | ||
39 | gui/option_select.c | 40 | gui/option_select.c |
40 | gui/quickscreen.c | 41 | gui/quickscreen.c |
41 | gui/scrollbar.c | 42 | gui/scrollbar.c |
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index 52340e6547..aec3a1401d 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -509,7 +509,7 @@ long gui_wps_show(void) | |||
509 | #ifdef WPS_RC_QUICK | 509 | #ifdef WPS_RC_QUICK |
510 | case WPS_RC_QUICK: | 510 | case WPS_RC_QUICK: |
511 | #endif | 511 | #endif |
512 | if (quick_screen_quick()) | 512 | if (quick_screen_quick(button)) |
513 | return SYS_USB_CONNECTED; | 513 | return SYS_USB_CONNECTED; |
514 | restore = true; | 514 | restore = true; |
515 | lastbutton = 0; | 515 | lastbutton = 0; |
@@ -518,7 +518,7 @@ long gui_wps_show(void) | |||
518 | /* screen settings */ | 518 | /* screen settings */ |
519 | #ifdef BUTTON_F3 | 519 | #ifdef BUTTON_F3 |
520 | case BUTTON_F3: | 520 | case BUTTON_F3: |
521 | if (quick_screen_f3()) | 521 | if (quick_screen_f3(button)) |
522 | return SYS_USB_CONNECTED; | 522 | return SYS_USB_CONNECTED; |
523 | restore = true; | 523 | restore = true; |
524 | break; | 524 | break; |
diff --git a/apps/gui/logo.c b/apps/gui/logo.c new file mode 100644 index 0000000000..9e2945a216 --- /dev/null +++ b/apps/gui/logo.c | |||
@@ -0,0 +1,94 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 Björn Stenberg | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include "logo.h" | ||
21 | |||
22 | #ifdef HAVE_LCD_BITMAP | ||
23 | #define BMPHEIGHT_usb_logo_main 32 | ||
24 | #define BMPWIDTH_usb_logo_main 100 | ||
25 | static const unsigned char usb_logo_main[] = { | ||
26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, | ||
29 | 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, | ||
30 | 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x81, | ||
31 | 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, | ||
32 | 0x01, 0x01, 0x01, 0x01, 0xf1, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, | ||
33 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, | ||
34 | 0x00, 0x00, 0xe0, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
35 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
36 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x81, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, | ||
37 | 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x1c, | ||
38 | 0x0c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, | ||
39 | 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, | ||
40 | 0x00, 0x00, 0xe0, 0x1f, 0x00, 0xf8, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, | ||
41 | 0x02, 0x02, 0x02, 0x82, 0x7e, 0x00, 0xc0, 0x3e, 0x01, | ||
42 | 0x70, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, | ||
43 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, | ||
44 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, | ||
45 | 0x0f, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f, | ||
46 | 0x1f, 0x3f, 0x7b, 0xf3, 0xe3, 0xc3, 0x83, 0x83, 0x83, 0x83, 0xe3, 0xe3, 0xe3, | ||
47 | 0xe3, 0xe3, 0xe3, 0x03, 0x03, 0x03, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x02, | ||
48 | 0xc0, 0x3e, 0x01, 0xe0, 0x9f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | ||
49 | 0x80, 0x80, 0xf0, 0x0f, 0x80, 0x78, 0x07, 0x00, 0x00, | ||
50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, 0x20, 0x40, 0x40, 0x80, 0x80, | ||
53 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | ||
54 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x87, 0x87, 0x87, | ||
55 | 0x87, 0x87, 0x87, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0, | ||
56 | 0x0f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
57 | 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
58 | }; | ||
59 | |||
60 | struct logo usb_logos[]= | ||
61 | { | ||
62 | [SCREEN_MAIN]={usb_logo_main, BMPWIDTH_usb_logo_main, BMPHEIGHT_usb_logo_main}, | ||
63 | #if NB_SCREENS==2 | ||
64 | [SCREEN_REMOTE]={usb_logo_main, BMPWIDTH_usb_logo_main, BMPHEIGHT_usb_logo_main} | ||
65 | #endif | ||
66 | |||
67 | }; | ||
68 | #else | ||
69 | struct logo usb_logos[]= | ||
70 | { | ||
71 | [SCREEN_MAIN]={"[USB Mode]"} | ||
72 | }; | ||
73 | #endif | ||
74 | |||
75 | void gui_logo_draw(struct logo * logo, struct screen * display) | ||
76 | { | ||
77 | display->clear_display(); | ||
78 | |||
79 | #ifdef HAVE_LCD_BITMAP | ||
80 | /* Center bitmap on screen */ | ||
81 | display->mono_bitmap(logo->bitmap, | ||
82 | display->width/2-logo->width/2, | ||
83 | display->height/2-logo->height/2, | ||
84 | logo->width, | ||
85 | logo->height); | ||
86 | display->update(); | ||
87 | #else | ||
88 | display->double_height(false); | ||
89 | display->puts_scroll(0, 0, logo->text); | ||
90 | #ifdef SIMULATOR | ||
91 | display->update(); | ||
92 | #endif /* SIMULATOR */ | ||
93 | #endif /* HAVE_LCD_BITMAP */ | ||
94 | } | ||
diff --git a/apps/gui/logo.h b/apps/gui/logo.h new file mode 100644 index 0000000000..38eafeaef2 --- /dev/null +++ b/apps/gui/logo.h | |||
@@ -0,0 +1,43 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2005 by Kevin Ferrare | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef _GUI_LOGO_H_ | ||
21 | #define _GUI_LOGO_H_ | ||
22 | #include "screen_access.h" | ||
23 | |||
24 | struct logo{ | ||
25 | #ifdef HAVE_LCD_BITMAP | ||
26 | const unsigned char * bitmap; | ||
27 | int width; | ||
28 | int height; | ||
29 | #else | ||
30 | const char * text; | ||
31 | #endif | ||
32 | }; | ||
33 | |||
34 | extern struct logo usb_logos[]; | ||
35 | |||
36 | /* | ||
37 | * Draws the given logo at the center of the given screen | ||
38 | * - logo : the logo | ||
39 | * - display : the screen to draw on | ||
40 | */ | ||
41 | void gui_logo_draw(struct logo * logo, struct screen * display); | ||
42 | |||
43 | #endif /* _GUI_LOGO_H_ */ | ||
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c index a11107cb51..7d94d4a0dc 100644 --- a/apps/gui/quickscreen.c +++ b/apps/gui/quickscreen.c | |||
@@ -51,6 +51,7 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display) | |||
51 | display->has_buttonbar=false; | 51 | display->has_buttonbar=false; |
52 | #endif | 52 | #endif |
53 | gui_textarea_clear(display); | 53 | gui_textarea_clear(display); |
54 | display->setfont(FONT_SYSFIXED); | ||
54 | display->getstringsize("M",&w,&h); | 55 | display->getstringsize("M",&w,&h); |
55 | /* Displays the icons */ | 56 | /* Displays the icons */ |
56 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], | 57 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastBackward], |
@@ -62,7 +63,6 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display) | |||
62 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], | 63 | display->mono_bitmap(bitmap_icons_7x8[Icon_FastForward], |
63 | display->width/2 + 8, | 64 | display->width/2 + 8, |
64 | display->height/2 - 4, 7, 8); | 65 | display->height/2 - 4, 7, 8); |
65 | display->setfont(FONT_SYSFIXED); | ||
66 | 66 | ||
67 | /* Displays the left's text */ | 67 | /* Displays the left's text */ |
68 | title=option_select_get_title(qs->left_option); | 68 | title=option_select_get_title(qs->left_option); |
@@ -90,7 +90,7 @@ void gui_quickscreen_draw(struct gui_quickscreen * qs, struct screen * display) | |||
90 | display->putsxy(display->width - w, display->height/2, option); | 90 | display->putsxy(display->width - w, display->height/2, option); |
91 | 91 | ||
92 | gui_textarea_update(display); | 92 | gui_textarea_update(display); |
93 | lcd_setfont(FONT_UI); | 93 | display->setfont(FONT_UI); |
94 | } | 94 | } |
95 | 95 | ||
96 | void gui_syncquickscreen_draw(struct gui_quickscreen * qs) | 96 | void gui_syncquickscreen_draw(struct gui_quickscreen * qs) |
@@ -102,6 +102,7 @@ void gui_syncquickscreen_draw(struct gui_quickscreen * qs) | |||
102 | 102 | ||
103 | bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button) | 103 | bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button) |
104 | { | 104 | { |
105 | |||
105 | switch(button) | 106 | switch(button) |
106 | { | 107 | { |
107 | case QUICKSCREEN_LEFT : | 108 | case QUICKSCREEN_LEFT : |
@@ -143,24 +144,32 @@ bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button) | |||
143 | return(false); | 144 | return(false); |
144 | } | 145 | } |
145 | 146 | ||
146 | bool gui_syncquickscreen_run(struct gui_quickscreen * qs) | 147 | bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter) |
147 | { | 148 | { |
148 | int key; | 149 | int key; |
150 | /* To quit we need either : | ||
151 | * - a second press on the button that made us enter | ||
152 | * - an action taken while pressing the enter button, | ||
153 | * then release the enter button*/ | ||
154 | bool can_quit=false; | ||
149 | gui_syncquickscreen_draw(qs); | 155 | gui_syncquickscreen_draw(qs); |
150 | while (true) { | 156 | while (true) { |
151 | key = button_get(true); | 157 | key = button_get(true); |
152 | if(default_event_handler(key) == SYS_USB_CONNECTED) | 158 | if(default_event_handler(key & ~button_enter) == SYS_USB_CONNECTED) |
153 | return(true); | 159 | return(true); |
154 | if(gui_quickscreen_do_button(qs, key)) | 160 | if(gui_quickscreen_do_button(qs, key & ~button_enter)) |
155 | { | 161 | { |
162 | can_quit=true; | ||
156 | if(qs->callback) | 163 | if(qs->callback) |
157 | qs->callback(qs); | 164 | qs->callback(qs); |
158 | gui_syncquickscreen_draw(qs); | 165 | gui_syncquickscreen_draw(qs); |
159 | } | 166 | } |
160 | else if(key==QUICKSCREEN_QUIT | 167 | else if(key==button_enter) |
168 | can_quit=true; | ||
169 | if(key==(button_enter | BUTTON_REL) && can_quit) | ||
170 | return(false); | ||
161 | #ifdef QUICKSCREEN_QUIT | 171 | #ifdef QUICKSCREEN_QUIT |
162 | || key==QUICKSCREEN_QUIT | 172 | if(key==QUICKSCREEN_QUIT |
163 | #endif | ||
164 | #ifdef QUICKSCREEN_QUIT2 | 173 | #ifdef QUICKSCREEN_QUIT2 |
165 | || key==QUICKSCREEN_QUIT2 | 174 | || key==QUICKSCREEN_QUIT2 |
166 | #endif | 175 | #endif |
@@ -168,9 +177,8 @@ bool gui_syncquickscreen_run(struct gui_quickscreen * qs) | |||
168 | || key==QUICKSCREEN_RC_QUIT | 177 | || key==QUICKSCREEN_RC_QUIT |
169 | #endif | 178 | #endif |
170 | ) | 179 | ) |
171 | { | ||
172 | return(false); | 180 | return(false); |
173 | } | 181 | #endif /* QUICKSCREEN_QUIT */ |
174 | gui_syncstatusbar_draw(&statusbars, false); | 182 | gui_syncstatusbar_draw(&statusbars, false); |
175 | } | 183 | } |
176 | } | 184 | } |
diff --git a/apps/gui/quickscreen.h b/apps/gui/quickscreen.h index 09a0390d93..fdbe4db386 100644 --- a/apps/gui/quickscreen.h +++ b/apps/gui/quickscreen.h | |||
@@ -34,10 +34,8 @@ | |||
34 | #define QUICKSCREEN_BOTTOM_INV BUTTON_UP | 34 | #define QUICKSCREEN_BOTTOM_INV BUTTON_UP |
35 | #define QUICKSCREEN_RIGHT BUTTON_RIGHT | 35 | #define QUICKSCREEN_RIGHT BUTTON_RIGHT |
36 | 36 | ||
37 | #if CONFIG_KEYPAD == RECORDER_PAD | 37 | |
38 | #define QUICKSCREEN_QUIT BUTTON_F2 | 38 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) |
39 | #define QUICKSCREEN_QUIT2 BUTTON_F3 | ||
40 | #elif (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) | ||
41 | #define QUICKSCREEN_QUIT BUTTON_MODE | 39 | #define QUICKSCREEN_QUIT BUTTON_MODE |
42 | #define QUICKSCREEN_QUIT2 BUTTON_OFF | 40 | #define QUICKSCREEN_QUIT2 BUTTON_OFF |
43 | #define QUICKSCREEN_RC_QUIT BUTTON_RC_MODE | 41 | #define QUICKSCREEN_RC_QUIT BUTTON_RC_MODE |
@@ -104,11 +102,12 @@ bool gui_quickscreen_do_button(struct gui_quickscreen * qs, int button); | |||
104 | void gui_syncquickscreen_draw(struct gui_quickscreen * qs); | 102 | void gui_syncquickscreen_draw(struct gui_quickscreen * qs); |
105 | 103 | ||
106 | /* | 104 | /* |
107 | * Runs the quickscreen on all available screens | 105 | * Runs the quickscreen on all available screens, if button_enter is released, quits |
108 | * - qs : the quickscreen | 106 | * - qs : the quickscreen |
107 | * - button_enter : button pressed at the same time the quickscreen is displayed | ||
109 | * returns : true if usb was connected, false otherwise | 108 | * returns : true if usb was connected, false otherwise |
110 | */ | 109 | */ |
111 | bool gui_syncquickscreen_run(struct gui_quickscreen * qs); | 110 | bool gui_syncquickscreen_run(struct gui_quickscreen * qs, int button_enter); |
112 | 111 | ||
113 | #endif /*_GUI_QUICK_SCREEN_H_*/ | 112 | #endif /*_GUI_QUICK_SCREEN_H_*/ |
114 | #endif /* CONFIG_KEYPAD */ | 113 | #endif /* CONFIG_KEYPAD */ |
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index eec031fa93..945013e4b9 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -40,27 +40,30 @@ | |||
40 | 40 | ||
41 | /* FIXME: should be removed from icon.h to avoid redefinition, | 41 | /* FIXME: should be removed from icon.h to avoid redefinition, |
42 | but still needed for compatibility with old system */ | 42 | but still needed for compatibility with old system */ |
43 | 43 | #define ICONS_SPACING 2 | |
44 | #define STATUSBAR_BATTERY_X_POS 0 | 44 | #define STATUSBAR_BATTERY_X_POS 0*ICONS_SPACING |
45 | #define STATUSBAR_BATTERY_WIDTH 18 | 45 | #define STATUSBAR_BATTERY_WIDTH 18 |
46 | #define STATUSBAR_PLUG_X_POS STATUSBAR_X_POS + \ | 46 | #define STATUSBAR_PLUG_X_POS STATUSBAR_X_POS + \ |
47 | STATUSBAR_BATTERY_WIDTH +2 | 47 | STATUSBAR_BATTERY_WIDTH + \ |
48 | ICONS_SPACING | ||
48 | #define STATUSBAR_PLUG_WIDTH 7 | 49 | #define STATUSBAR_PLUG_WIDTH 7 |
49 | #define STATUSBAR_VOLUME_X_POS STATUSBAR_X_POS + \ | 50 | #define STATUSBAR_VOLUME_X_POS STATUSBAR_X_POS + \ |
50 | STATUSBAR_BATTERY_WIDTH + \ | 51 | STATUSBAR_BATTERY_WIDTH + \ |
51 | STATUSBAR_PLUG_WIDTH +2+2 | 52 | STATUSBAR_PLUG_WIDTH + \ |
53 | 2*ICONS_SPACING | ||
52 | #define STATUSBAR_VOLUME_WIDTH 16 | 54 | #define STATUSBAR_VOLUME_WIDTH 16 |
53 | #define STATUSBAR_PLAY_STATE_X_POS STATUSBAR_X_POS + \ | 55 | #define STATUSBAR_PLAY_STATE_X_POS STATUSBAR_X_POS + \ |
54 | STATUSBAR_BATTERY_WIDTH + \ | 56 | STATUSBAR_BATTERY_WIDTH + \ |
55 | STATUSBAR_PLUG_WIDTH + \ | 57 | STATUSBAR_PLUG_WIDTH + \ |
56 | STATUSBAR_VOLUME_WIDTH+2+2+2 | 58 | STATUSBAR_VOLUME_WIDTH + \ |
59 | 3*ICONS_SPACING | ||
57 | #define STATUSBAR_PLAY_STATE_WIDTH 7 | 60 | #define STATUSBAR_PLAY_STATE_WIDTH 7 |
58 | #define STATUSBAR_PLAY_MODE_X_POS STATUSBAR_X_POS + \ | 61 | #define STATUSBAR_PLAY_MODE_X_POS STATUSBAR_X_POS + \ |
59 | STATUSBAR_BATTERY_WIDTH + \ | 62 | STATUSBAR_BATTERY_WIDTH + \ |
60 | STATUSBAR_PLUG_WIDTH + \ | 63 | STATUSBAR_PLUG_WIDTH + \ |
61 | STATUSBAR_VOLUME_WIDTH + \ | 64 | STATUSBAR_VOLUME_WIDTH + \ |
62 | STATUSBAR_PLAY_STATE_WIDTH + \ | 65 | STATUSBAR_PLAY_STATE_WIDTH + \ |
63 | 2+2+2+2 | 66 | 4*ICONS_SPACING |
64 | #define STATUSBAR_PLAY_MODE_WIDTH 7 | 67 | #define STATUSBAR_PLAY_MODE_WIDTH 7 |
65 | #define STATUSBAR_SHUFFLE_X_POS STATUSBAR_X_POS + \ | 68 | #define STATUSBAR_SHUFFLE_X_POS STATUSBAR_X_POS + \ |
66 | STATUSBAR_BATTERY_WIDTH + \ | 69 | STATUSBAR_BATTERY_WIDTH + \ |
@@ -68,17 +71,28 @@ | |||
68 | STATUSBAR_VOLUME_WIDTH + \ | 71 | STATUSBAR_VOLUME_WIDTH + \ |
69 | STATUSBAR_PLAY_STATE_WIDTH + \ | 72 | STATUSBAR_PLAY_STATE_WIDTH + \ |
70 | STATUSBAR_PLAY_MODE_WIDTH + \ | 73 | STATUSBAR_PLAY_MODE_WIDTH + \ |
71 | 2+2+2+2+2 | 74 | 5*ICONS_SPACING |
72 | #define STATUSBAR_SHUFFLE_WIDTH 7 | 75 | #define STATUSBAR_SHUFFLE_WIDTH 7 |
73 | #define STATUSBAR_LOCK_X_POS STATUSBAR_X_POS + \ | 76 | #define STATUSBAR_LOCKM_X_POS STATUSBAR_X_POS + \ |
77 | STATUSBAR_BATTERY_WIDTH + \ | ||
78 | STATUSBAR_PLUG_WIDTH + \ | ||
79 | STATUSBAR_VOLUME_WIDTH + \ | ||
80 | STATUSBAR_PLAY_STATE_WIDTH + \ | ||
81 | STATUSBAR_PLAY_MODE_WIDTH + \ | ||
82 | STATUSBAR_SHUFFLE_WIDTH + \ | ||
83 | 6*ICONS_SPACING | ||
84 | #define STATUSBAR_LOCKM_WIDTH 5 | ||
85 | #define STATUSBAR_LOCKR_X_POS STATUSBAR_X_POS + \ | ||
74 | STATUSBAR_BATTERY_WIDTH + \ | 86 | STATUSBAR_BATTERY_WIDTH + \ |
75 | STATUSBAR_PLUG_WIDTH + \ | 87 | STATUSBAR_PLUG_WIDTH + \ |
76 | STATUSBAR_VOLUME_WIDTH + \ | 88 | STATUSBAR_VOLUME_WIDTH + \ |
77 | STATUSBAR_PLAY_STATE_WIDTH + \ | 89 | STATUSBAR_PLAY_STATE_WIDTH + \ |
78 | STATUSBAR_PLAY_MODE_WIDTH + \ | 90 | STATUSBAR_PLAY_MODE_WIDTH + \ |
79 | STATUSBAR_SHUFFLE_WIDTH + \ | 91 | STATUSBAR_SHUFFLE_WIDTH + \ |
80 | 2+2+2+2+2+2 | 92 | STATUSBAR_LOCKM_WIDTH + \ |
81 | #define STATUSBAR_LOCK_WIDTH 5 | 93 | 7*ICONS_SPACING |
94 | #define STATUSBAR_LOCKR_WIDTH 5 | ||
95 | |||
82 | #define STATUSBAR_DISK_WIDTH 12 | 96 | #define STATUSBAR_DISK_WIDTH 12 |
83 | #define STATUSBAR_DISK_X_POS(statusbar_width) statusbar_width - \ | 97 | #define STATUSBAR_DISK_X_POS(statusbar_width) statusbar_width - \ |
84 | STATUSBAR_DISK_WIDTH | 98 | STATUSBAR_DISK_WIDTH |
@@ -98,7 +112,6 @@ void gui_statusbar_init(struct gui_statusbar * bar) | |||
98 | void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | 112 | void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) |
99 | { | 113 | { |
100 | struct screen * display = bar->display; | 114 | struct screen * display = bar->display; |
101 | |||
102 | #ifdef HAVE_RTC | 115 | #ifdef HAVE_RTC |
103 | struct tm* tm; /* For Time */ | 116 | struct tm* tm; /* For Time */ |
104 | #endif /* HAVE_RTC */ | 117 | #endif /* HAVE_RTC */ |
@@ -120,11 +133,14 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
120 | #endif /* HAVE_RTC */ | 133 | #endif /* HAVE_RTC */ |
121 | 134 | ||
122 | bar->info.shuffle = global_settings.playlist_shuffle; | 135 | bar->info.shuffle = global_settings.playlist_shuffle; |
123 | #if CONFIG_KEYPAD == IRIVER_H100_PAD | 136 | #ifdef HAS_BUTTON_HOLD |
124 | bar->info.keylock = button_hold(); | 137 | bar->info.keylock = button_hold(); |
125 | #else | 138 | #else |
126 | bar->info.keylock = keys_locked; | 139 | bar->info.keylock = keys_locked; |
127 | #endif /* CONFIG_KEYPAD == IRIVER_H100_PAD */ | 140 | #endif /* HAS_BUTTON_HOLD */ |
141 | #ifdef HAS_REMOTE_BUTTON_HOLD | ||
142 | bar->info.keylockremote = remote_button_hold(); | ||
143 | #endif | ||
128 | bar->info.repeat = global_settings.repeat_mode; | 144 | bar->info.repeat = global_settings.repeat_mode; |
129 | bar->info.playmode = current_playmode(); | 145 | bar->info.playmode = current_playmode(); |
130 | if(!display->has_disk_led) | 146 | if(!display->has_disk_led) |
@@ -235,6 +251,10 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
235 | gui_statusbar_icon_shuffle(display); | 251 | gui_statusbar_icon_shuffle(display); |
236 | if (bar->info.keylock) | 252 | if (bar->info.keylock) |
237 | gui_statusbar_icon_lock(display); | 253 | gui_statusbar_icon_lock(display); |
254 | #ifdef HAS_REMOTE_BUTTON_HOLD | ||
255 | if (bar->info.keylockremote) | ||
256 | gui_statusbar_icon_lock_remote(display); | ||
257 | #endif | ||
238 | #ifdef HAVE_RTC | 258 | #ifdef HAVE_RTC |
239 | gui_statusbar_time(display, bar->info.hour, bar->info.minute); | 259 | gui_statusbar_time(display, bar->info.hour, bar->info.minute); |
240 | #endif /* HAVE_RTC */ | 260 | #endif /* HAVE_RTC */ |
@@ -430,8 +450,19 @@ void gui_statusbar_icon_shuffle(struct screen * display) | |||
430 | */ | 450 | */ |
431 | void gui_statusbar_icon_lock(struct screen * display) | 451 | void gui_statusbar_icon_lock(struct screen * display) |
432 | { | 452 | { |
433 | display->mono_bitmap(bitmap_icons_5x8[Icon_Lock], STATUSBAR_LOCK_X_POS, | 453 | display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Main], |
434 | STATUSBAR_Y_POS, 5, 8); | 454 | STATUSBAR_LOCKM_X_POS, STATUSBAR_Y_POS, |
455 | STATUSBAR_LOCKM_WIDTH, STATUSBAR_HEIGHT); | ||
456 | } | ||
457 | |||
458 | /* | ||
459 | * Print remote lock when remote hold is enabled | ||
460 | */ | ||
461 | void gui_statusbar_icon_lock_remote(struct screen * display) | ||
462 | { | ||
463 | display->mono_bitmap(bitmap_icons_5x8[Icon_Lock_Remote], | ||
464 | STATUSBAR_LOCKR_X_POS, STATUSBAR_Y_POS, | ||
465 | STATUSBAR_LOCKR_WIDTH, STATUSBAR_HEIGHT); | ||
435 | } | 466 | } |
436 | 467 | ||
437 | /* | 468 | /* |
diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h index 816205e2b4..88dfd4c4a2 100644 --- a/apps/gui/statusbar.h +++ b/apps/gui/statusbar.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "config.h" | 23 | #include "config.h" |
24 | #include "status.h" | 24 | #include "status.h" |
25 | #include "screen_access.h" | 25 | #include "screen_access.h" |
26 | #include "button.h" | ||
26 | 27 | ||
27 | #define STATUSBAR_X_POS 0 | 28 | #define STATUSBAR_X_POS 0 |
28 | #define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */ | 29 | #define STATUSBAR_Y_POS 0 /* MUST be a multiple of 8 */ |
@@ -40,6 +41,9 @@ struct status_info { | |||
40 | bool inserted; | 41 | bool inserted; |
41 | bool shuffle; | 42 | bool shuffle; |
42 | bool keylock; | 43 | bool keylock; |
44 | #ifdef HAS_REMOTE_BUTTON_HOLD | ||
45 | bool keylockremote; | ||
46 | #endif | ||
43 | bool battery_safe; | 47 | bool battery_safe; |
44 | bool redraw_volume; /* true if the volume gauge needs updating */ | 48 | bool redraw_volume; /* true if the volume gauge needs updating */ |
45 | bool led; /* disk LED simulation in the status bar */ | 49 | bool led; /* disk LED simulation in the status bar */ |
@@ -101,6 +105,7 @@ void gui_statusbar_icon_play_state(struct screen * display, int state); | |||
101 | void gui_statusbar_icon_play_mode(struct screen * display, int mode); | 105 | void gui_statusbar_icon_play_mode(struct screen * display, int mode); |
102 | void gui_statusbar_icon_shuffle(struct screen * display); | 106 | void gui_statusbar_icon_shuffle(struct screen * display); |
103 | void gui_statusbar_icon_lock(struct screen * display); | 107 | void gui_statusbar_icon_lock(struct screen * display); |
108 | void gui_statusbar_icon_lock_remote(struct screen * display); | ||
104 | void gui_statusbar_led(struct screen * display); | 109 | void gui_statusbar_led(struct screen * display); |
105 | 110 | ||
106 | 111 | ||
diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index 1306a1d770..68985c2028 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c | |||
@@ -30,11 +30,11 @@ | |||
30 | 30 | ||
31 | const unsigned char bitmap_icons_5x8[][5] = | 31 | const unsigned char bitmap_icons_5x8[][5] = |
32 | { | 32 | { |
33 | /* Lock */ | 33 | [Icon_Lock_Main] ={0x78,0x7f,0x49,0x7f,0x78}, /* Lock Main */ |
34 | {0x78,0x7f,0x49,0x7f,0x78} | 34 | [Icon_Lock_Remote]={0x78,0x7f,0x49,0x7f,0x78} /* Lock Remote */ |
35 | }; | 35 | }; |
36 | 36 | ||
37 | const unsigned char bitmap_icons_6x8[LastIcon][6] = | 37 | const unsigned char bitmap_icons_6x8[][6] = |
38 | { | 38 | { |
39 | { 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */ | 39 | { 0x60, 0x7f, 0x03, 0x33, 0x3f, 0x00 }, /* Musical note */ |
40 | { 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */ | 40 | { 0x7e, 0x41, 0x41, 0x42, 0x7e, 0x00 }, /* Folder */ |
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h index c996fd92aa..a21b801cb9 100644 --- a/apps/recorder/icons.h +++ b/apps/recorder/icons.h | |||
@@ -29,7 +29,9 @@ | |||
29 | 29 | ||
30 | /* Symbolic names for icons */ | 30 | /* Symbolic names for icons */ |
31 | enum icons_5x8 { | 31 | enum icons_5x8 { |
32 | Icon_Lock | 32 | Icon_Lock_Main, |
33 | Icon_Lock_Remote, | ||
34 | Icon5x8Last | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | enum icons_6x8 { | 37 | enum icons_6x8 { |
@@ -46,7 +48,7 @@ enum icons_6x8 { | |||
46 | Icon_Bookmark, | 48 | Icon_Bookmark, |
47 | Icon_Queued, | 49 | Icon_Queued, |
48 | Icon_Moving, | 50 | Icon_Moving, |
49 | LastIcon | 51 | Icon6x8Last |
50 | }; | 52 | }; |
51 | 53 | ||
52 | enum icons_7x8 { | 54 | enum icons_7x8 { |
@@ -68,12 +70,12 @@ enum icons_7x8 { | |||
68 | Icon_DownArrow, | 70 | Icon_DownArrow, |
69 | Icon_UpArrow, | 71 | Icon_UpArrow, |
70 | Icon_RepeatAB, | 72 | Icon_RepeatAB, |
71 | Icon_Last | 73 | Icon7x8Last |
72 | }; | 74 | }; |
73 | 75 | ||
74 | extern const unsigned char bitmap_icons_5x8[1][5]; | 76 | extern const unsigned char bitmap_icons_5x8[Icon5x8Last][5]; |
75 | extern const unsigned char bitmap_icons_6x8[LastIcon][6]; | 77 | extern const unsigned char bitmap_icons_6x8[Icon6x8Last][6]; |
76 | extern const unsigned char bitmap_icons_7x8[Icon_Last][7]; | 78 | extern const unsigned char bitmap_icons_7x8[Icon7x8Last][7]; |
77 | extern const unsigned char bitmap_icon_disk[]; | 79 | extern const unsigned char bitmap_icon_disk[]; |
78 | 80 | ||
79 | #if LCD_WIDTH == 112 || LCD_WIDTH == 128 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_WIDTH == 128) | 81 | #if LCD_WIDTH == 112 || LCD_WIDTH == 128 || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_WIDTH == 128) |
diff --git a/apps/screens.c b/apps/screens.c index 9ff2e1b952..368a185073 100644 --- a/apps/screens.c +++ b/apps/screens.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | |||
19 | #include <stdbool.h> | 20 | #include <stdbool.h> |
20 | #include <string.h> | 21 | #include <string.h> |
21 | #include <stdio.h> | 22 | #include <stdio.h> |
@@ -51,6 +52,7 @@ | |||
51 | #include "statusbar.h" | 52 | #include "statusbar.h" |
52 | #include "screen_access.h" | 53 | #include "screen_access.h" |
53 | #include "quickscreen.h" | 54 | #include "quickscreen.h" |
55 | #include "logo.h" | ||
54 | 56 | ||
55 | #if defined(HAVE_LCD_BITMAP) | 57 | #if defined(HAVE_LCD_BITMAP) |
56 | #include "widgets.h" | 58 | #include "widgets.h" |
@@ -64,66 +66,8 @@ | |||
64 | 66 | ||
65 | #ifdef HAVE_LCD_BITMAP | 67 | #ifdef HAVE_LCD_BITMAP |
66 | #define SCROLLBAR_WIDTH 6 | 68 | #define SCROLLBAR_WIDTH 6 |
67 | |||
68 | #define BMPHEIGHT_usb_logo 32 | ||
69 | #define BMPWIDTH_usb_logo 100 | ||
70 | static const unsigned char usb_logo[] = { | ||
71 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
72 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
73 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x08, | ||
74 | 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, | ||
75 | 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x81, 0x81, 0x81, 0x81, | ||
76 | 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, | ||
77 | 0x01, 0x01, 0x01, 0x01, 0xf1, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, | ||
78 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0xc0, | ||
79 | 0x00, 0x00, 0xe0, 0x1c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
80 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
81 | 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x81, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, | ||
82 | 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x1c, | ||
83 | 0x0c, 0x0e, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, | ||
84 | 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, | ||
85 | 0x00, 0x00, 0xe0, 0x1f, 0x00, 0xf8, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, | ||
86 | 0x02, 0x02, 0x02, 0x82, 0x7e, 0x00, 0xc0, 0x3e, 0x01, | ||
87 | 0x70, 0x4f, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, | ||
88 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, | ||
89 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x07, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, | ||
90 | 0x0f, 0x07, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, 0x0f, | ||
91 | 0x1f, 0x3f, 0x7b, 0xf3, 0xe3, 0xc3, 0x83, 0x83, 0x83, 0x83, 0xe3, 0xe3, 0xe3, | ||
92 | 0xe3, 0xe3, 0xe3, 0x03, 0x03, 0x03, 0x3f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x02, | ||
93 | 0xc0, 0x3e, 0x01, 0xe0, 0x9f, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | ||
94 | 0x80, 0x80, 0xf0, 0x0f, 0x80, 0x78, 0x07, 0x00, 0x00, | ||
95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
97 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x10, 0x20, 0x40, 0x40, 0x80, 0x80, | ||
98 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, | ||
99 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, 0x81, 0x81, 0x81, 0x81, 0x87, 0x87, 0x87, | ||
100 | 0x87, 0x87, 0x87, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0, | ||
101 | 0x0f, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, | ||
102 | 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
103 | }; | ||
104 | #endif | 69 | #endif |
105 | 70 | ||
106 | void usb_display_info(struct screen * display) | ||
107 | { | ||
108 | display->clear_display(); | ||
109 | |||
110 | #ifdef HAVE_LCD_BITMAP | ||
111 | /* Center bitmap on screen */ | ||
112 | display->mono_bitmap(usb_logo, | ||
113 | display->width/2-BMPWIDTH_usb_logo/2, | ||
114 | display->height/2-BMPHEIGHT_usb_logo/2, | ||
115 | BMPWIDTH_usb_logo, | ||
116 | BMPHEIGHT_usb_logo); | ||
117 | display->update(); | ||
118 | #else | ||
119 | display->double_height(false); | ||
120 | display->puts(0, 0, "[USB Mode]"); | ||
121 | #ifdef SIMULATOR | ||
122 | display->update(); | ||
123 | #endif /* SIMULATOR */ | ||
124 | #endif /* HAVE_LCD_BITMAP */ | ||
125 | } | ||
126 | |||
127 | void usb_screen(void) | 71 | void usb_screen(void) |
128 | { | 72 | { |
129 | #ifdef USB_NONE | 73 | #ifdef USB_NONE |
@@ -132,7 +76,7 @@ void usb_screen(void) | |||
132 | int i; | 76 | int i; |
133 | FOR_NB_SCREENS(i) { | 77 | FOR_NB_SCREENS(i) { |
134 | screens[i].backlight_on(); | 78 | screens[i].backlight_on(); |
135 | usb_display_info(&screens[i]); | 79 | gui_logo_draw(&usb_logos[i], &screens[i]); |
136 | } | 80 | } |
137 | #ifdef HAVE_LCD_CHARCELLS | 81 | #ifdef HAVE_LCD_CHARCELLS |
138 | status_set_param(false); | 82 | status_set_param(false); |
@@ -542,7 +486,7 @@ void quick_screen_quick_apply(struct gui_quickscreen *qs) | |||
542 | global_settings.repeat_mode=option_select_get_selected(qs->right_option); | 486 | global_settings.repeat_mode=option_select_get_selected(qs->right_option); |
543 | } | 487 | } |
544 | 488 | ||
545 | bool quick_screen_quick(void) | 489 | bool quick_screen_quick(int button_enter) |
546 | { | 490 | { |
547 | bool res, oldrepeat; | 491 | bool res, oldrepeat; |
548 | struct option_select left_option; | 492 | struct option_select left_option; |
@@ -589,7 +533,7 @@ bool quick_screen_quick(void) | |||
589 | gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, | 533 | gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, |
590 | str(LANG_F2_MODE), &quick_screen_quick_apply); | 534 | str(LANG_F2_MODE), &quick_screen_quick_apply); |
591 | oldrepeat=global_settings.repeat_mode; | 535 | oldrepeat=global_settings.repeat_mode; |
592 | res=gui_syncquickscreen_run(&qs); | 536 | res=gui_syncquickscreen_run(&qs, button_enter); |
593 | if(!res) | 537 | if(!res) |
594 | { | 538 | { |
595 | if ( oldrepeat != global_settings.repeat_mode && | 539 | if ( oldrepeat != global_settings.repeat_mode && |
@@ -624,7 +568,7 @@ void quick_screen_f3_apply(struct gui_quickscreen *qs) | |||
624 | gui_syncstatusbar_draw(&statusbars, true); | 568 | gui_syncstatusbar_draw(&statusbars, true); |
625 | } | 569 | } |
626 | 570 | ||
627 | bool quick_screen_f3(void) | 571 | bool quick_screen_f3(int button_enter) |
628 | { | 572 | { |
629 | bool res; | 573 | bool res; |
630 | struct option_select left_option; | 574 | struct option_select left_option; |
@@ -658,7 +602,7 @@ bool quick_screen_f3(void) | |||
658 | 2); | 602 | 2); |
659 | gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, | 603 | gui_quickscreen_init(&qs, &left_option, &bottom_option, &right_option, |
660 | str(LANG_F3_BAR), &quick_screen_f3_apply); | 604 | str(LANG_F3_BAR), &quick_screen_f3_apply); |
661 | res=gui_syncquickscreen_run(&qs); | 605 | res=gui_syncquickscreen_run(&qs, button_enter); |
662 | if(!res) | 606 | if(!res) |
663 | settings_save(); | 607 | settings_save(); |
664 | return(res); | 608 | return(res); |
diff --git a/apps/screens.h b/apps/screens.h index 3de66582ee..f879da264c 100644 --- a/apps/screens.h +++ b/apps/screens.h | |||
@@ -35,9 +35,9 @@ int mmc_remove_request(void); | |||
35 | 35 | ||
36 | #if CONFIG_KEYPAD == RECORDER_PAD | 36 | #if CONFIG_KEYPAD == RECORDER_PAD |
37 | int pitch_screen(void); | 37 | int pitch_screen(void); |
38 | extern bool quick_screen_f3(void); | 38 | extern bool quick_screen_f3(int button_enter); |
39 | #endif | 39 | #endif |
40 | extern bool quick_screen_quick(void); | 40 | extern bool quick_screen_quick(int button_enter); |
41 | 41 | ||
42 | #ifdef HAVE_RTC | 42 | #ifdef HAVE_RTC |
43 | bool set_time_screen(const char* string, struct tm *tm); | 43 | bool set_time_screen(const char* string, struct tm *tm); |
diff --git a/apps/tree.c b/apps/tree.c index 33b482b3d7..1a419c74d2 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -718,7 +718,7 @@ static bool dirbrowse(void) | |||
718 | /* don't enter f2 from plugin browser */ | 718 | /* don't enter f2 from plugin browser */ |
719 | if (*tc.dirfilter < NUM_FILTER_MODES) | 719 | if (*tc.dirfilter < NUM_FILTER_MODES) |
720 | { | 720 | { |
721 | if (quick_screen_quick()) | 721 | if (quick_screen_quick(button)) |
722 | reload_dir = true; | 722 | reload_dir = true; |
723 | restore = true; | 723 | restore = true; |
724 | 724 | ||
@@ -733,7 +733,7 @@ static bool dirbrowse(void) | |||
733 | /* don't enter f3 from plugin browser */ | 733 | /* don't enter f3 from plugin browser */ |
734 | if (*tc.dirfilter < NUM_FILTER_MODES) | 734 | if (*tc.dirfilter < NUM_FILTER_MODES) |
735 | { | 735 | { |
736 | if (quick_screen_f3()) | 736 | if (quick_screen_f3(button)) |
737 | reload_dir = true; | 737 | reload_dir = true; |
738 | restore = true; | 738 | restore = true; |
739 | } | 739 | } |