summaryrefslogtreecommitdiff
path: root/apps
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 /apps
parent5850207d332f78d4fcf4a7ec22ae8b95b921a183 (diff)
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
Diffstat (limited to 'apps')
-rw-r--r--apps/menus/display_menu.c63
-rw-r--r--apps/menus/theme_menu.c67
-rw-r--r--apps/settings_list.c13
3 files changed, 75 insertions, 68 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,
/***********************************/
/***********************************/
-/* BARS MENU */
-#ifdef HAVE_LCD_BITMAP
-static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item,
- enum screen_type screen)
-{
- (void)this_item;
- /* we save the old statusbar value here, so the old statusbars can get
- * removed and cleared from the display properly on exiting
- * (in gui_statusbar_changed() ) */
- static enum statusbar_values old_bar[NB_SCREENS];
- switch (action)
- {
- case ACTION_ENTER_MENUITEM:
- old_bar[screen] = statusbar_position(screen);
- case ACTION_EXIT_MENUITEM:
- gui_statusbar_changed(screen, old_bar[screen]);
- send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL);
- send_event(GUI_EVENT_ACTIONUPDATE, (void*)true);
- break;
- }
- return action;
-}
-
-#ifdef HAVE_REMOTE_LCD
-static int statusbar_callback_remote(int action,const struct menu_item_ex *this_item)
-{
- return statusbar_callback_ex(action, this_item, SCREEN_REMOTE);
-}
-#endif
-static int statusbar_callback(int action,const struct menu_item_ex *this_item)
-{
- return statusbar_callback_ex(action, this_item, SCREEN_MAIN);
-}
-MENUITEM_SETTING(scrollbar_item, &global_settings.scrollbar, NULL);
-MENUITEM_SETTING(scrollbar_width, &global_settings.scrollbar_width, NULL);
-MENUITEM_SETTING(statusbar, &global_settings.statusbar,
- statusbar_callback);
-#ifdef HAVE_REMOTE_LCD
-MENUITEM_SETTING(remote_statusbar, &global_settings.remote_statusbar,
- statusbar_callback_remote);
-#endif
-#if CONFIG_KEYPAD == RECORDER_PAD
-MENUITEM_SETTING(buttonbar, &global_settings.buttonbar, NULL);
-#endif
-MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL);
-MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL);
-MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
- &scrollbar_item, &scrollbar_width, &statusbar,
-#ifdef HAVE_REMOTE_LCD
- &remote_statusbar,
-#endif
-#if CONFIG_KEYPAD == RECORDER_PAD
- &buttonbar,
-#endif
- &volume_type, &battery_display);
-#endif /* HAVE_LCD_BITMAP */
-/* BARS MENU */
-/***********************************/
-
-
-/***********************************/
/* PEAK METER MENU */
#ifdef HAVE_LCD_BITMAP
@@ -563,7 +502,7 @@ MAKE_MENU(display_menu, ID2P(LANG_DISPLAY),
#endif
&scroll_settings_menu,
#ifdef HAVE_LCD_BITMAP
- &bars_menu, &peak_meter_menu,
+ &peak_meter_menu,
#endif
&codepage_setting,
#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),
/* LCD MENU */
/***********************************/
+
+/************************************/
+/* BARS MENU */
+/* */
+
+
+#ifdef HAVE_LCD_BITMAP
+static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item,
+ enum screen_type screen)
+{
+ (void)this_item;
+ /* we save the old statusbar value here, so the old statusbars can get
+ * removed and cleared from the display properly on exiting
+ * (in gui_statusbar_changed() ) */
+ static enum statusbar_values old_bar[NB_SCREENS];
+ switch (action)
+ {
+ case ACTION_ENTER_MENUITEM:
+ old_bar[screen] = statusbar_position(screen);
+ case ACTION_EXIT_MENUITEM:
+ gui_statusbar_changed(screen, old_bar[screen]);
+ send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL);
+ send_event(GUI_EVENT_ACTIONUPDATE, (void*)true);
+ break;
+ }
+ return action;
+}
+
+#ifdef HAVE_REMOTE_LCD
+static int statusbar_callback_remote(int action,const struct menu_item_ex *this_item)
+{
+ return statusbar_callback_ex(action, this_item, SCREEN_REMOTE);
+}
+#endif
+static int statusbar_callback(int action,const struct menu_item_ex *this_item)
+{
+ return statusbar_callback_ex(action, this_item, SCREEN_MAIN);
+}
+MENUITEM_SETTING(scrollbar_item, &global_settings.scrollbar, NULL);
+MENUITEM_SETTING(scrollbar_width, &global_settings.scrollbar_width, NULL);
+MENUITEM_SETTING(statusbar, &global_settings.statusbar,
+ statusbar_callback);
+#ifdef HAVE_REMOTE_LCD
+MENUITEM_SETTING(remote_statusbar, &global_settings.remote_statusbar,
+ statusbar_callback_remote);
+#endif
+#if CONFIG_KEYPAD == RECORDER_PAD
+MENUITEM_SETTING(buttonbar, &global_settings.buttonbar, NULL);
+#endif
+MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL);
+MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL);
+MAKE_MENU(bars_menu, ID2P(LANG_BARS_MENU), 0, Icon_NOICON,
+ &scrollbar_item, &scrollbar_width, &statusbar,
+#ifdef HAVE_REMOTE_LCD
+ &remote_statusbar,
+#endif
+#if CONFIG_KEYPAD == RECORDER_PAD
+ &buttonbar,
+#endif
+ &volume_type, &battery_display);
+#endif /* HAVE_LCD_BITMAP */
+
+/* */
+/* BARS MENU */
+/************************************/
+
#ifdef HAVE_LCD_BITMAP
static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT};
#endif
@@ -191,6 +257,7 @@ MAKE_MENU(theme_menu, ID2P(LANG_THEME_MENU),
&clear_main_bd,
#endif
#ifdef HAVE_LCD_BITMAP
+ &bars_menu,
&cursor_style,
#endif
#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[] = {
NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP),
ID2P(LANG_STATUSBAR_BOTTOM)),
#endif
- CHOICE_SETTING(F_TEMPVAR, scrollbar,
+ CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar,
LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right",
NULL, 3, ID2P(LANG_OFF), ID2P(LANG_LEFT), ID2P(LANG_RIGHT)),
- INT_SETTING(0, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6, "scrollbar width",
- UNIT_INT, 3, LCD_WIDTH/10, 1, NULL, NULL, NULL),
+ INT_SETTING(F_THEMESETTING, scrollbar_width, LANG_SCROLLBAR_WIDTH, 6,
+ "scrollbar width",UNIT_INT, 3, MAX(LCD_WIDTH/10,25), 1,
+ NULL, NULL, NULL),
#if CONFIG_KEYPAD == RECORDER_PAD
- OFFON_SETTING(0,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
+ OFFON_SETTING(F_THEMESETTING,buttonbar, LANG_BUTTON_BAR ,true,"buttonbar", NULL),
#endif
- CHOICE_SETTING(0, volume_type, LANG_VOLUME_DISPLAY, 0,
+ CHOICE_SETTING(F_THEMESETTING, volume_type, LANG_VOLUME_DISPLAY, 0,
"volume display", graphic_numeric, NULL, 2,
ID2P(LANG_DISPLAY_GRAPHIC),
ID2P(LANG_DISPLAY_NUMERIC)),
- CHOICE_SETTING(0, battery_display, LANG_BATTERY_DISPLAY, 0,
+ CHOICE_SETTING(F_THEMESETTING, battery_display, LANG_BATTERY_DISPLAY, 0,
"battery display", graphic_numeric, NULL, 2,
ID2P(LANG_DISPLAY_GRAPHIC), ID2P(LANG_DISPLAY_NUMERIC)),
#if CONFIG_RTC