diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-08-24 00:22:54 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-08-24 00:22:54 +0000 |
commit | 97548f34d767f14de3fafc2333cfeac97ab36151 (patch) | |
tree | 826766d12ef25140bb6f8c0dbeda58a719444d81 /apps/menus/theme_menu.c | |
parent | 5850207d332f78d4fcf4a7ec22ae8b95b921a183 (diff) | |
download | rockbox-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
Diffstat (limited to 'apps/menus/theme_menu.c')
-rw-r--r-- | apps/menus/theme_menu.c | 67 |
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), | |||
138 | /* LCD MENU */ | 138 | /* LCD MENU */ |
139 | /***********************************/ | 139 | /***********************************/ |
140 | 140 | ||
141 | |||
142 | /************************************/ | ||
143 | /* BARS MENU */ | ||
144 | /* */ | ||
145 | |||
146 | |||
147 | #ifdef HAVE_LCD_BITMAP | ||
148 | static 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 | ||
170 | static 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 | ||
175 | static int statusbar_callback(int action,const struct menu_item_ex *this_item) | ||
176 | { | ||
177 | return statusbar_callback_ex(action, this_item, SCREEN_MAIN); | ||
178 | } | ||
179 | MENUITEM_SETTING(scrollbar_item, &global_settings.scrollbar, NULL); | ||
180 | MENUITEM_SETTING(scrollbar_width, &global_settings.scrollbar_width, NULL); | ||
181 | MENUITEM_SETTING(statusbar, &global_settings.statusbar, | ||
182 | statusbar_callback); | ||
183 | #ifdef HAVE_REMOTE_LCD | ||
184 | MENUITEM_SETTING(remote_statusbar, &global_settings.remote_statusbar, | ||
185 | statusbar_callback_remote); | ||
186 | #endif | ||
187 | #if CONFIG_KEYPAD == RECORDER_PAD | ||
188 | MENUITEM_SETTING(buttonbar, &global_settings.buttonbar, NULL); | ||
189 | #endif | ||
190 | MENUITEM_SETTING(volume_type, &global_settings.volume_type, NULL); | ||
191 | MENUITEM_SETTING(battery_display, &global_settings.battery_display, NULL); | ||
192 | MAKE_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 |
142 | static struct browse_folder_info fonts = {FONT_DIR, SHOW_FONT}; | 208 | static 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 |