summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2009-12-16 08:36:46 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2009-12-16 08:36:46 +0000
commite425371e10c5c18a1996fe7adfb4184a09ebbd8a (patch)
tree80bee7b66110bd31734897a96fe336ea50336923 /apps
parentb9aabcb1a40aa2705d720e332bef7c390fb0587a (diff)
downloadrockbox-e425371e10c5c18a1996fe7adfb4184a09ebbd8a.tar.gz
rockbox-e425371e10c5c18a1996fe7adfb4184a09ebbd8a.tar.bz2
rockbox-e425371e10c5c18a1996fe7adfb4184a09ebbd8a.zip
Fix FS#10289 - screens showing a list need to check the show_icons setting before setting the callback. the List will now always draw icons if a callback is set (like its always done for voice)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24022 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/filetypes.c2
-rw-r--r--apps/gui/bitmap/list.c3
-rw-r--r--apps/menu.c2
-rw-r--r--apps/menus/recording_menu.c2
-rw-r--r--apps/plugins/disktidy.c2
-rw-r--r--apps/tree.c6
6 files changed, 8 insertions, 9 deletions
diff --git a/apps/filetypes.c b/apps/filetypes.c
index 593085cbd4..1bf83c3316 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -505,7 +505,7 @@ int filetype_list_viewers(const char* current_file)
simplelist_info_init(&info, str(LANG_ONPLAY_OPEN_WITH), count, &data);
info.action_callback = openwith_action_callback;
info.get_name = openwith_get_name;
- info.get_icon = openwith_get_icon;
+ info.get_icon = global_settings.show_icons?openwith_get_icon:NULL;
return simplelist_show_list(&info);
}
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c
index 66e93fd302..dd4d41f95f 100644
--- a/apps/gui/bitmap/list.c
+++ b/apps/gui/bitmap/list.c
@@ -173,8 +173,7 @@ void list_draw(struct screen *display, struct gui_synclist *list)
/* setup icon placement */
list_icons = *list_text_vp;
- int icon_count = global_settings.show_icons &&
- (list->callback_get_item_icon != NULL) ? 1 : 0;
+ int icon_count = (list->callback_get_item_icon != NULL) ? 1 : 0;
if (show_cursor)
icon_count++;
if (icon_count)
diff --git a/apps/menu.c b/apps/menu.c
index 536b14b7d1..fe5764b29c 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -209,7 +209,7 @@ static void init_menu_lists(const struct menu_item_ex *menu,
else
icon = menu->callback_and_desc->icon_id;
gui_synclist_set_title(lists, P2STR(menu->callback_and_desc->desc), icon);
- gui_synclist_set_icon_callback(lists, menu_get_icon);
+ gui_synclist_set_icon_callback(lists, global_settings.show_icons?menu_get_icon:NULL);
#else
(void)icon;
gui_synclist_set_icon_callback(lists, NULL);
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c
index 7b99b48a2d..4bbc4b163c 100644
--- a/apps/menus/recording_menu.c
+++ b/apps/menus/recording_menu.c
@@ -527,7 +527,7 @@ int rectrigger(void)
}
gui_synclist_init(&lists, trigger_get_name, settings, false, 2, vp);
gui_synclist_set_nb_items(&lists, TRIG_OPTION_COUNT*2);
- gui_synclist_set_icon_callback(&lists, trigger_get_icon);
+ gui_synclist_set_icon_callback(&lists, global_settings.show_icons?trigger_get_icon:NULL);
/* restart trigger with new values */
settings_apply_trigger();
peak_meter_trigger (global_settings.rec_trigger_mode != TRIG_MODE_OFF);
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c
index 84cc220891..ee39972f0b 100644
--- a/apps/plugins/disktidy.c
+++ b/apps/plugins/disktidy.c
@@ -458,8 +458,6 @@ enum tidy_return tidy_lcd_menu(void)
{
bool show_icons = rb->global_settings->show_icons;
struct simplelist_info list;
- /* force the icons so its readable */
- rb->global_settings->show_icons = true;
rb->simplelist_info_init(&list, "Files to Clean",
tidy_type_count, NULL);
list.get_icon = get_icon;
diff --git a/apps/tree.c b/apps/tree.c
index 55d3baca00..5a8445cacf 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -295,7 +295,8 @@ void tree_gui_init(void)
#endif
gui_synclist_init(&tree_lists, &tree_get_filename, &tc, false, 1, NULL);
gui_synclist_set_voice_callback(&tree_lists, tree_voice_cb);
- gui_synclist_set_icon_callback(&tree_lists, &tree_get_fileicon);
+ gui_synclist_set_icon_callback(&tree_lists,
+ global_settings.show_icons?&tree_get_fileicon:NULL);
#ifdef HAVE_LCD_COLOR
gui_synclist_set_color_callback(&tree_lists, &tree_get_filecolor);
#endif
@@ -456,7 +457,8 @@ static int update_dir(void)
}
gui_synclist_set_nb_items(&tree_lists, tc.filesindir);
- gui_synclist_set_icon_callback(&tree_lists, tree_get_fileicon);
+ gui_synclist_set_icon_callback(&tree_lists,
+ global_settings.show_icons?tree_get_fileicon:NULL);
if( tc.selected_item >= tc.filesindir)
tc.selected_item=tc.filesindir-1;