summaryrefslogtreecommitdiffstats
path: root/apps/gui/list.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-09-03 13:24:56 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-09-03 13:24:56 +0000
commit573f2206c1934e925b35565f472613d4917552d3 (patch)
treeba795d7ab27f2070117bc29f2f54c8772a51098c /apps/gui/list.c
parent29f04cc9860a032a9182e77d02679c4faa6ec148 (diff)
downloadrockbox-573f2206c1934e925b35565f472613d4917552d3.tar.gz
rockbox-573f2206c1934e925b35565f472613d4917552d3.zip
Add the list colour callback and a proper title icon to the simplelist api
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30419 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r--apps/gui/list.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 72f27ce527..f450bd579f 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -823,11 +823,15 @@ bool simplelist_show_list(struct simplelist_info *info)
info->scroll_all, info->selection_size, NULL);
if (info->title)
- gui_synclist_set_title(&lists, info->title, NOICON);
+ gui_synclist_set_title(&lists, info->title, info->title_icon);
if (info->get_icon)
gui_synclist_set_icon_callback(&lists, info->get_icon);
if (info->get_talk)
gui_synclist_set_voice_callback(&lists, info->get_talk);
+#ifdef HAVE_LCD_COLOR
+ if (info->get_color)
+ gui_synclist_set_color_callback(&lists, info->get_color);
+#endif
if (info->hide_selection)
{
@@ -909,9 +913,13 @@ void simplelist_info_init(struct simplelist_info *info, char* title,
info->timeout = HZ/10;
info->selection = 0;
info->action_callback = NULL;
+ info->title_icon = Icon_NOICON;
info->get_icon = NULL;
info->get_name = NULL;
info->get_talk = NULL;
+#ifdef HAVE_LCD_COLOR
+ info->get_color = NULL;
+#endif
info->callback_data = data;
simplelist_line_count = 0;
}