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
This commit is contained in:
Thomas Martitz 2009-08-24 00:22:54 +00:00
parent 5850207d33
commit 97548f34d7
5 changed files with 104 additions and 97 deletions

View file

@ -305,67 +305,6 @@ MAKE_MENU(scroll_settings_menu, ID2P(LANG_SCROLL_MENU), 0, Icon_NOICON,
/* SCROLL 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 */
/***********************************/
/***********************************/
/* PEAK METER MENU */
@ -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

View file

@ -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

View file

@ -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

View file

@ -191,33 +191,6 @@
screen size will page up/down instead of simply changing lines. This can be
useful on slow displays.
\end{description}
%
\opt{lcd_bitmap}{
\item[Status/Scrollbar:]
Settings related to on screen status display and the scrollbar.
\begin{description}
\item[Scroll Bar:] Allows you to choose where the vertical scroll bar
should appear.
\item[Scroll Bar Width:] Allows you to choose the width of the
scroll bar (in pixels). Default value is 6.
\item[Status Bar:] Allows you to choose where to display the
statusbar\opt{remote}{ on the main display}.
\opt{remote}{
\item[Remote Status Bar:] Allows you to choose where to display the
statusbar on the remote display.
}
\opt{RECORDER_PAD}{
\item[Button Bar:] Enables or disables the button bar prompts for the
``F''-keys at the bottom of the screen.
}
\item[Volume Display:] Controls whether the volume is displayed as a
graphic or a numeric value on the Status Bar. If you select a numeric
display, volume is displayed in decibels. See \reference{ref:volume}
for more on the volume setting.
\item[Battery Display:] Controls whether the battery charge status is
displayed as a graphic or numerical percentage value on the Status Bar.
\end{description}
}
%
\opt{lcd_bitmap}{
\item[Peak Meter:]

View file

@ -83,8 +83,35 @@ customize the visual apperance of Rockbox.
Rockbox allows you to select bitmap pictures to use as backdrops,
see \reference{ref:LoadingBackdrops} for further information.
This option allows you to clear the backdrops that you set.
}%
}
%
\opt{lcd_bitmap}{
\item[Status/Scrollbar:]
Settings related to on screen status display and the scrollbar.
\begin{description}
\item[Scroll Bar:] Allows you to choose where the vertical scroll bar
should appear.
\item[Scroll Bar Width:] Allows you to choose the width of the
scroll bar (in pixels). Default value is 6.
\item[Status Bar:] Allows you to choose where to display the
statusbar\opt{remote}{ on the main display}.
\opt{remote}{
\item[Remote Status Bar:] Allows you to choose where to display the
statusbar on the remote display.
}
\opt{RECORDER_PAD}{
\item[Button Bar:] Enables or disables the button bar prompts for the
``F''-keys at the bottom of the screen.
}
\item[Volume Display:] Controls whether the volume is displayed as a
graphic or a numeric value on the Status Bar. If you select a numeric
display, volume is displayed in decibels. See \reference{ref:volume}
for more on the volume setting.
\item[Battery Display:] Controls whether the battery charge status is
displayed as a graphic or numerical percentage value on the Status Bar.
\end{description}
}
%
\opt{lcd_bitmap}{
\item[Line Selector Type.]
This option allows you to select which type of line selector to use.