summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/list.c10
-rw-r--r--apps/gui/list.h8
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c
index 72f27ce..f450bd5 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;
}
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 84673d8..38d7e95 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -213,10 +213,14 @@ struct simplelist_info {
/* action_callback notes:
action == the action pressed by the user
_after_ gui_synclist_do_button returns.
- lists == the lists sturct so the callack can get selection and count etc. */
+ lists == the lists struct so the callback can get selection and count etc. */
+ enum themable_icons title_icon;
list_get_icon *get_icon; /* can be NULL */
list_get_name *get_name; /* NULL if you're using simplelist_addline() */
list_speak_item *get_talk; /* can be NULL to not speak */
+#ifdef HAVE_LCD_COLOR
+ list_get_color *get_color;
+#endif
void *callback_data; /* data for callbacks */
};
@@ -242,9 +246,11 @@ void simplelist_addline(int line_number, const char *fmt, ...);
info.hide_selection = false;
info.scroll_all = false;
info.action_callback = NULL;
+ info.title_icon = Icon_NOICON;
info.get_icon = NULL;
info.get_name = NULL;
info.get_voice = NULL;
+ info.get_color = NULL;
info.timeout = HZ/10;
info.selection = 0;
*/