From 6cf7cb9822782295091fb083eab1f2862500b53b Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 27 Nov 2011 10:10:26 +0000 Subject: 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 --- apps/gui/icon.c | 55 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/icon.c b/apps/gui/icon.c index a9075b1b0f..e1f4ec31a6 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -236,36 +236,39 @@ void icons_init(void) } } - load_icons(global_settings.icon_file, Iconset_user, SCREEN_MAIN); - - if (global_settings.viewers_icon_file[0] && - global_settings.viewers_icon_file[0] != '-') - { - load_icons(global_settings.viewers_icon_file, - Iconset_viewers, SCREEN_MAIN); - read_viewer_theme_file(); - } - else + if (global_settings.show_icons) { - load_icons(DEFAULT_VIEWER_BMP, Iconset_viewers, SCREEN_MAIN); - } + load_icons(global_settings.icon_file, Iconset_user, SCREEN_MAIN); + + if (global_settings.viewers_icon_file[0] && + global_settings.viewers_icon_file[0] != '-') + { + load_icons(global_settings.viewers_icon_file, + Iconset_viewers, SCREEN_MAIN); + read_viewer_theme_file(); + } + else + { + load_icons(DEFAULT_VIEWER_BMP, Iconset_viewers, SCREEN_MAIN); + } #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) - load_icons(global_settings.remote_icon_file, - Iconset_user, SCREEN_REMOTE); - - if (global_settings.remote_viewers_icon_file[0] && - global_settings.remote_viewers_icon_file[0] != '-') - { - load_icons(global_settings.remote_viewers_icon_file, - Iconset_viewers, SCREEN_REMOTE); - } - else - { - load_icons(DEFAULT_REMOTE_VIEWER_BMP, - Iconset_viewers, SCREEN_REMOTE); - } + load_icons(global_settings.remote_icon_file, + Iconset_user, SCREEN_REMOTE); + + if (global_settings.remote_viewers_icon_file[0] && + global_settings.remote_viewers_icon_file[0] != '-') + { + load_icons(global_settings.remote_viewers_icon_file, + Iconset_viewers, SCREEN_REMOTE); + } + else + { + load_icons(DEFAULT_REMOTE_VIEWER_BMP, + Iconset_viewers, SCREEN_REMOTE); + } #endif + } } int get_icon_width(enum screen_type screen_type) -- cgit v1.2.3