summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-02-26 03:45:41 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-02-26 03:45:41 +0000
commit466e5d9aa4fcdc3da6172eb9ae125fd4157be0b9 (patch)
tree660ff0f1991703cd87e77bab3cccca190d0f5e28 /apps/gui/skin_engine
parentca755f767c2d67fb2b52c292402b3b3d3be28244 (diff)
2 new tags for the base skin.
%Lt - the title text for the current list %Li - the icon number. Same order as the CustomIcons list, except the first icon is the "no icon" icon. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24917 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r--apps/gui/skin_engine/skin_parser.c2
-rw-r--r--apps/gui/skin_engine/skin_tokens.c8
-rw-r--r--apps/gui/skin_engine/skin_tokens.h2
3 files changed, 12 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 844fe5f120..7fbf63bfeb 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -366,6 +366,8 @@ static const struct wps_tag all_tags[] = {
parse_viewport_display },
#ifdef HAVE_LCD_BITMAP
{ WPS_VIEWPORT_CUSTOMLIST, "Vp", WPS_REFRESH_STATIC, parse_playlistview },
+ { WPS_TOKEN_LIST_TITLE_TEXT, "Lt", WPS_REFRESH_DYNAMIC, NULL },
+ { WPS_TOKEN_LIST_TITLE_ICON, "Li", WPS_REFRESH_DYNAMIC, NULL },
#endif
{ WPS_NO_TOKEN, "V", 0, parse_viewport },
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c
index 1189925ea0..a682bdf87a 100644
--- a/apps/gui/skin_engine/skin_tokens.c
+++ b/apps/gui/skin_engine/skin_tokens.c
@@ -416,6 +416,14 @@ const char *get_token_value(struct gui_wps *gwps,
case WPS_TOKEN_PLAYLIST_ENTRIES:
snprintf(buf, buf_size, "%d", playlist_amount());
return buf;
+
+ case WPS_TOKEN_LIST_TITLE_TEXT:
+ return (char*)token->value.data;
+ case WPS_TOKEN_LIST_TITLE_ICON:
+ if (intval)
+ *intval = token->value.i;
+ snprintf(buf, buf_size, "%d", token->value.i);
+ return buf;
case WPS_TOKEN_PLAYLIST_NAME:
return playlist_name(NULL, buf, buf_size);
diff --git a/apps/gui/skin_engine/skin_tokens.h b/apps/gui/skin_engine/skin_tokens.h
index 5778f95808..d0df058cf0 100644
--- a/apps/gui/skin_engine/skin_tokens.h
+++ b/apps/gui/skin_engine/skin_tokens.h
@@ -189,6 +189,8 @@ enum wps_token_type {
/* buttons */
TOKEN_MARKER_MISC,
+ WPS_TOKEN_LIST_TITLE_TEXT,
+ WPS_TOKEN_LIST_TITLE_ICON,
WPS_TOKEN_BUTTON_VOLUME,
WPS_TOKEN_LASTTOUCH,
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)