summaryrefslogtreecommitdiffstats
path: root/apps/menus/theme_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/menus/theme_menu.c')
-rw-r--r--apps/menus/theme_menu.c67
1 files changed, 67 insertions, 0 deletions
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