diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-11-27 10:10:26 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-11-27 10:10:26 +0000 |
commit | 6cf7cb9822782295091fb083eab1f2862500b53b (patch) | |
tree | 22e08ce8165d541471a98bd705064f6cf9fa9b6d /apps/menus/theme_menu.c | |
parent | 47452dcd5c2fcb05b3db738b3a684d0ee713f928 (diff) | |
download | rockbox-6cf7cb9822782295091fb083eab1f2862500b53b.tar.gz rockbox-6cf7cb9822782295091fb083eab1f2862500b53b.zip |
Don't load the icons unless show_icons is actually enabled. And respect that setting in the shortcuts menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31069 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/theme_menu.c')
-rw-r--r-- | apps/menus/theme_menu.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c index f5af1c7b78..e1077a5efd 100644 --- a/apps/menus/theme_menu.c +++ b/apps/menus/theme_menu.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "viewport.h" | 39 | #include "viewport.h" |
40 | #include "statusbar-skinned.h" | 40 | #include "statusbar-skinned.h" |
41 | #include "skin_engine/skin_engine.h" | 41 | #include "skin_engine/skin_engine.h" |
42 | #include "icons.h" | ||
42 | 43 | ||
43 | #ifdef HAVE_BACKDROP_IMAGE | 44 | #ifdef HAVE_BACKDROP_IMAGE |
44 | /** | 45 | /** |
@@ -356,7 +357,25 @@ MENUITEM_FUNCTION(browse_rfms, MENU_FUNC_USEPARAM, | |||
356 | #endif | 357 | #endif |
357 | #endif | 358 | #endif |
358 | 359 | ||
359 | MENUITEM_SETTING(show_icons, &global_settings.show_icons, NULL); | 360 | |
361 | static int showicons_callback(int action, const struct menu_item_ex *this_item) | ||
362 | { | ||
363 | (void)this_item; | ||
364 | static bool old_icons; | ||
365 | switch (action) | ||
366 | { | ||
367 | case ACTION_ENTER_MENUITEM: | ||
368 | old_icons = global_settings.show_icons; | ||
369 | break; | ||
370 | case ACTION_EXIT_MENUITEM: | ||
371 | if (old_icons != global_settings.show_icons) | ||
372 | icons_init(); | ||
373 | break; | ||
374 | } | ||
375 | return ACTION_REDRAW; | ||
376 | } | ||
377 | |||
378 | MENUITEM_SETTING(show_icons, &global_settings.show_icons, showicons_callback); | ||
360 | MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM, | 379 | MENUITEM_FUNCTION(browse_themes, MENU_FUNC_USEPARAM, |
361 | ID2P(LANG_CUSTOM_THEME), | 380 | ID2P(LANG_CUSTOM_THEME), |
362 | browse_folder, (void*)&themes, NULL, Icon_Config); | 381 | browse_folder, (void*)&themes, NULL, Icon_Config); |