summaryrefslogtreecommitdiff
path: root/apps/gui/list.c
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2005-11-16 17:23:49 +0000
committerKevin Ferrare <kevin@rockbox.org>2005-11-16 17:23:49 +0000
commit15046f99b3840c07bdd9d52e7014c6e775267c55 (patch)
treea34131db64c53b7bb9353e870cd5266d0dbc9e2d /apps/gui/list.c
parent2a7546ab752dd10901aa7df10d93cd286a68d4bf (diff)
downloadrockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.tar.gz
rockbox-15046f99b3840c07bdd9d52e7014c6e775267c55.zip
show/hide icons now works properly in playlist viewer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7911 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r--apps/gui/list.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index df398eaa58..ac084984eb 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -40,12 +40,11 @@
40 40
41 41
42void gui_list_init(struct gui_list * gui_list, 42void gui_list_init(struct gui_list * gui_list,
43 list_get_icon callback_get_item_icon,
44 list_get_name callback_get_item_name, 43 list_get_name callback_get_item_name,
45 void * data 44 void * data
46 ) 45 )
47{ 46{
48 gui_list->callback_get_item_icon = callback_get_item_icon; 47 gui_list->callback_get_item_icon = NULL;
49 gui_list->callback_get_item_name = callback_get_item_name; 48 gui_list->callback_get_item_name = callback_get_item_name;
50 gui_list->display = NULL; 49 gui_list->display = NULL;
51 gui_list_set_nb_items(gui_list, 0); 50 gui_list_set_nb_items(gui_list, 0);
@@ -126,8 +125,7 @@ void gui_list_draw(struct gui_list * gui_list)
126 int cursor_pos = 0; 125 int cursor_pos = 0;
127 int icon_pos = 1; 126 int icon_pos = 1;
128 int text_pos; 127 int text_pos;
129 bool draw_icons = (gui_list->callback_get_item_icon != NULL && 128 bool draw_icons = (gui_list->callback_get_item_icon != NULL ) ;
130 global_settings.show_icons) ;
131 bool draw_cursor; 129 bool draw_cursor;
132 int i; 130 int i;
133 131
@@ -363,7 +361,6 @@ void gui_list_del_item(struct gui_list * gui_list)
363 */ 361 */
364void gui_synclist_init( 362void gui_synclist_init(
365 struct gui_synclist * lists, 363 struct gui_synclist * lists,
366 list_get_icon callback_get_item_icon,
367 list_get_name callback_get_item_name, 364 list_get_name callback_get_item_name,
368 void * data 365 void * data
369 ) 366 )
@@ -372,7 +369,6 @@ void gui_synclist_init(
372 FOR_NB_SCREENS(i) 369 FOR_NB_SCREENS(i)
373 { 370 {
374 gui_list_init(&(lists->gui_list[i]), 371 gui_list_init(&(lists->gui_list[i]),
375 callback_get_item_icon,
376 callback_get_item_name, 372 callback_get_item_name,
377 data); 373 data);
378 gui_list_set_display(&(lists->gui_list[i]), &(screens[i])); 374 gui_list_set_display(&(lists->gui_list[i]), &(screens[i]));
@@ -387,6 +383,14 @@ void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
387 gui_list_set_nb_items(&(lists->gui_list[i]), nb_items); 383 gui_list_set_nb_items(&(lists->gui_list[i]), nb_items);
388 } 384 }
389} 385}
386void gui_synclist_set_icon_callback(struct gui_synclist * lists, list_get_icon icon_callback)
387{
388 int i;
389 FOR_NB_SCREENS(i)
390 {
391 gui_list_set_icon_callback(&(lists->gui_list[i]), icon_callback);
392 }
393}
390 394
391void gui_synclist_draw(struct gui_synclist * lists) 395void gui_synclist_draw(struct gui_synclist * lists)
392{ 396{