summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-08-24 00:22:54 +0000
committerThomas Martitz <kugel@rockbox.org>2009-08-24 00:22:54 +0000
commit97548f34d767f14de3fafc2333cfeac97ab36151 (patch)
tree826766d12ef25140bb6f8c0dbeda58a719444d81
parent5850207d332f78d4fcf4a7ec22ae8b95b921a183 (diff)
downloadrockbox-97548f34d767f14de3fafc2333cfeac97ab36151.tar.gz
rockbox-97548f34d767f14de3fafc2333cfeac97ab36151.zip
Move the "Status/Scrollbar" menu to Theme Settings, and add the F_THEMESETTING flag to the settings it was missing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22486 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/menus/display_menu.c63
-rw-r--r--apps/menus/theme_menu.c67
-rw-r--r--apps/settings_list.c13
-rw-r--r--manual/configure_rockbox/display_options.tex27
-rw-r--r--manual/configure_rockbox/theme_settings.tex31
5 files changed, 104 insertions, 97 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 04360d8251..5559ecebe7 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -306,67 +306,6 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON,
306/***********************************/ 306/***********************************/
307 307
308/***********************************/ 308/***********************************/
309/* BARS MENU */
310#ifdef HAVE_LCD_BITMAP
311static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item,
312 enum screen_type screen)
313{
314 (void)this_item;
315 /* we save the old statusbar value here, so the old statusbars can get
316 * removed and cleared from the display properly on exiting
317 * (in gui_statusbar_changed() ) */
318 static enum statusbar_values old_bar[NB_SCREENS];
319 switch (action)
320 {
321 case ACTION_ENTER_MENUITEM:
322 old_bar[screen] = statusbar_position(screen);
323 case ACTION_EXIT_MENUITEM:
324 gui_statusbar_changed(screen, old_bar[screen]);
325 send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL);
326 send_event(GUI_EVENT_ACTIONUPDATE, (void*)true);
327 break;
328 }
329 return action;
330}
331
332#ifdef HAVE_REMOTE_LCD
333static int statusbar_callback_remote(int action,const struct menu_item_ex *this_item)
334{
335 return statusbar_callback_ex(action, this_item, SCREEN_REMOTE);
336}
337#endif
338static int statusbar_callback(int action,const struct menu_item_ex *this_item)
339{
340 return statusbar_callback_ex(action, this_item, SCREEN_MAIN);
341}
342MENUITEM_SETTING(scrollbar_item, &global_settings.scrollbar, NULL);
343MENUITEM_SETTING(scrollbar_width, &global_settings.scrollbar_width, NULL);
344MENUITEM_SETTING(statusbar, &global_settings.statusbar,
345 statusbar_callback);
346#ifdef HAVE_REMOTE_LCD
347MENUITEM_SETTING(remote_statusbar, &global_settings.remote_statusbar,
348 statusbar_callback_remote);
349#endif
350#if CONFIG_KEYPAD == RECORDER_PAD
351MENUITEM_SETTING(buttonbar, &global_settings.buttonbar, NULL);
352#endif
353MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL);
354MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL);
355MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
356 &scrollbar_item, &scrollbar_width, &statusbar,
357#ifdef HAVE_REMOTE_LCD
358 &remote_statusbar,
359#endif
360#if CONFIG_KEYPAD == RECORDER_PAD
361 &buttonbar,
362#endif
363 &volume_type, &battery_display);
364#endif /* HAVE_LCD_BITMAP */
365/* BARS MENU */
366/***********************************/
367
368
369/***********************************/
370/* PEAK METER MENU */ 309/* PEAK METER MENU */
371 310
372#ifdef HAVE_LCD_BITMAP 311#ifdef HAVE_LCD_BITMAP
@@ -563,7 +502,7 @@ MAKE_MENU(display_menu, ID2P(LANG_DISPLAY),
563#endif 502#endif
564 &scroll_settings_menu, 503 &scroll_settings_menu,
565#ifdef HAVE_LCD_BITMAP 504#ifdef HAVE_LCD_BITMAP
566 &bars_menu, &peak_meter_menu, 505 &peak_meter_menu,
567#endif 506#endif
568 &codepage_setting, 507 &codepage_setting,
569#ifdef HAVE_TOUCHSCREEN 508#ifdef HAVE_TOUCHSCREEN
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c
index 233d673da1..f2e4579864 100644
--- a/apps/menus/theme_menu.c
+++ b/apps/menus/theme_menu.c
@@ -138,6 +138,72 @@ MAKE_MENU(colors_settings, ID2P(LANG_COLORS_MENU),
138/* LCD MENU */ 138/* LCD MENU */
139/***********************************/ 139/***********************************/
140 140
141
142/************************************/
143/* BARS MENU */
144/* */
145
146
147#ifdef HAVE_LCD_BITMAP
148static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item,
149 enum screen_type screen)
150{
151 (void)this_item;
152 /* we save the old statusbar value here, so the old statusbars can get
153 * removed and cleared from the display properly on exiting
154 * (in gui_statusbar_changed() ) */
155 static enum statusbar_values old_bar[NB_SCREENS];
156 switch (action)
157 {
158 case ACTION_ENTER_MENUITEM:
159 old_bar[screen] = statusbar_position(screen);
160 case ACTION_EXIT_MENUITEM:
161 gui_statusbar_changed(screen, old_bar[screen]);
162 send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL);
163 send_event(GUI_EVENT_ACTIONUPDATE, (void*)true);
164 break;
165 }
166 return action;
167}
168
169#ifdef HAVE_REMOTE_LCD
170static int statusbar_callback_remote(int action,const struct menu_item_ex *this_item)
171{
172 return statusbar_callback_ex(action, this_item, SCREEN_REMOTE);
173}
174#endif
175static int statusbar_callback(int action,const struct menu_item_ex *this_item)
176{
177 return statusbar_callback_ex(action, this_item, SCREEN_MAIN);
178}
179MENUITEM_SETTING(scrollbar_item, &global_settings.scrollbar, NULL);
180MENUITEM_SETTING(scrollbar_width, &global_settings.scrollbar_width, NULL);
181MENUITEM_SETTING(statusbar, &global_settings.statusbar,
182 statusbar_callback);
183#ifdef HAVE_REMOTE_LCD
184MENUITEM_SETTING(remote_statusbar, &global_settings.remote_statusbar,
185 statusbar_callback_remote);
186#endif
187#if CONFIG_KEYPAD == RECORDER_PAD
188MENUITEM_SETTING(buttonbar, &global_settings.buttonbar, NULL);
189#endif
190MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL);
191MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL);
192MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
193 &scrollbar_item, &scrollbar_width, &statusbar,
194#ifdef HAVE_REMOTE_LCD
195 &remote_statusbar,
196#endif
197#if CONFIG_KEYPAD == RECORDER_PAD
198 &buttonbar,
199#endif
200 &volume_type, &battery_display);
201#endif /* HAVE_LCD_BITMAP */
202
203/* */
204/* BARS MENU */
205/************************************/
206
141#ifdef HAVE_LCD_BITMAP 207#ifdef HAVE_LCD_BITMAP
142static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT}; 208static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT};
143#endif 209#endif
@@ -191,6 +257,7 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU),
191 &clear_main_bd, 257 &clear_main_bd,
192#endif 258#endif
193#ifdef HAVE_LCD_BITMAP 259#ifdef HAVE_LCD_BITMAP
260 &bars_menu,
194 &cursor_style, 261 &cursor_style,
195#endif 262#endif
196#ifdef HAVE_LCD_COLOR 263#ifdef HAVE_LCD_COLOR
diff --git a/apps/settings_list.c b/apps/settings_list.c
index 23424f94cc..23f07cb24c 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -612,19 +612,20 @@ const struct settings_list settings[] = {
612 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP), 612 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP),
613 ID2P(LANG_STATUSBAR_BOTTOM)), 613 ID2P(LANG_STATUSBAR_BOTTOM)),
614#endif 614#endif
615 CHOICE_SETTING(F_TEMPVAR, scrollbar, 615 CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar,
616 LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right", 616 LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right",
617 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_LEFT), ID2P(LANG_RIGHT)), 617 NULL, 3, ID2P(LANG_OFF), ID2P(LANG_LEFT), ID2P(LANG_RIGHT)),
618 INT_SETTING(0, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6, "scrollbar width", 618 INT_SETTING(F_THEMESETTING, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6,
619 UNIT_INT, 3, LCD_WIDTH/10, 1, NULL, NULL, NULL), 619 "scrollbar width",UNIT_INT, 3, MAX(LCD_WIDTH/10,25), 1,
620 NULL, NULL, NULL),
620#if CONFIG_KEYPAD == RECORDER_PAD 621#if CONFIG_KEYPAD == RECORDER_PAD
621 OFFON_SETTING(0,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL), 622 OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
622#endif 623#endif
623 CHOICE_SETTING(0, volume_type, LANG_VOLUME_DISPLAY, 0, 624 CHOICE_SETTING(F_THEMESETTING, volume_type, LANG_VOLUME_DISPLAY, 0,
624 "volume display", graphic_numeric, NULL, 2, 625 "volume display", graphic_numeric, NULL, 2,
625 ID2P(LANG_DISPLAY_GRAPHIC), 626 ID2P(LANG_DISPLAY_GRAPHIC),
626 ID2P(LANG_DISPLAY_NUMERIC)), 627 ID2P(LANG_DISPLAY_NUMERIC)),
627 CHOICE_SETTING(0, battery_display, LANG_BATTERY_DISPLAY, 0, 628 CHOICE_SETTING(F_THEMESETTING, battery_display, LANG_BATTERY_DISPLAY, 0,
628 "battery display", graphic_numeric, NULL, 2, 629 "battery display", graphic_numeric, NULL, 2,
629 ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)), 630 ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
630#if CONFIG_RTC 631#if CONFIG_RTC
diff --git a/manual/configure_rockbox/display_options.tex b/manual/configure_rockbox/display_options.tex
index 7468025ee2..9ea7e4713c 100644
--- a/manual/configure_rockbox/display_options.tex
+++ b/manual/configure_rockbox/display_options.tex
@@ -193,33 +193,6 @@
193 \end{description} 193 \end{description}
194% 194%
195 \opt{lcd_bitmap}{ 195 \opt{lcd_bitmap}{
196 \item[Status/Scrollbar:]
197 Settings related to on screen status display and the scrollbar.
198 \begin{description}
199 \item[Scroll Bar:] Allows you to choose where the vertical scroll bar
200 should appear.
201 \item[Scroll Bar Width:] Allows you to choose the width of the
202 scroll bar (in pixels). Default value is 6.
203 \item[Status Bar:] Allows you to choose where to display the
204 statusbar\opt{remote}{ on the main display}.
205 \opt{remote}{
206 \item[Remote Status Bar:] Allows you to choose where to display the
207 statusbar on the remote display.
208 }
209 \opt{RECORDER_PAD}{
210 \item[Button Bar:] Enables or disables the button bar prompts for the
211 ``F''-keys at the bottom of the screen.
212 }
213 \item[Volume Display:] Controls whether the volume is displayed as a
214 graphic or a numeric value on the Status Bar. If you select a numeric
215 display, volume is displayed in decibels. See \reference{ref:volume}
216 for more on the volume setting.
217 \item[Battery Display:] Controls whether the battery charge status is
218 displayed as a graphic or numerical percentage value on the Status Bar.
219 \end{description}
220 }
221%
222 \opt{lcd_bitmap}{
223 \item[Peak Meter:] 196 \item[Peak Meter:]
224 The peak meter can be configured with a number of parameters. 197 The peak meter can be configured with a number of parameters.
225 \begin{description} 198 \begin{description}
diff --git a/manual/configure_rockbox/theme_settings.tex b/manual/configure_rockbox/theme_settings.tex
index d87a201488..b87c0f8583 100644
--- a/manual/configure_rockbox/theme_settings.tex
+++ b/manual/configure_rockbox/theme_settings.tex
@@ -83,8 +83,35 @@ customize the visual apperance of Rockbox.
83 Rockbox allows you to select bitmap pictures to use as backdrops, 83 Rockbox allows you to select bitmap pictures to use as backdrops,
84 see \reference{ref:LoadingBackdrops} for further information. 84 see \reference{ref:LoadingBackdrops} for further information.
85 This option allows you to clear the backdrops that you set. 85 This option allows you to clear the backdrops that you set.
86}% 86}
87 87%
88 \opt{lcd_bitmap}{
89 \item[Status/Scrollbar:]
90 Settings related to on screen status display and the scrollbar.
91 \begin{description}
92 \item[Scroll Bar:] Allows you to choose where the vertical scroll bar
93 should appear.
94 \item[Scroll Bar Width:] Allows you to choose the width of the
95 scroll bar (in pixels). Default value is 6.
96 \item[Status Bar:] Allows you to choose where to display the
97 statusbar\opt{remote}{ on the main display}.
98 \opt{remote}{
99 \item[Remote Status Bar:] Allows you to choose where to display the
100 statusbar on the remote display.
101 }
102 \opt{RECORDER_PAD}{
103 \item[Button Bar:] Enables or disables the button bar prompts for the
104 ``F''-keys at the bottom of the screen.
105 }
106 \item[Volume Display:] Controls whether the volume is displayed as a
107 graphic or a numeric value on the Status Bar. If you select a numeric
108 display, volume is displayed in decibels. See \reference{ref:volume}
109 for more on the volume setting.
110 \item[Battery Display:] Controls whether the battery charge status is
111 displayed as a graphic or numerical percentage value on the Status Bar.
112 \end{description}
113 }
114%
88\opt{lcd_bitmap}{ 115\opt{lcd_bitmap}{
89\item[Line Selector Type.] 116\item[Line Selector Type.]
90 This option allows you to select which type of line selector to use. 117 This option allows you to select which type of line selector to use.