Index: apps/gui/bitmap/list.c
===================================================================
--- apps/gui/bitmap/list.c (revision 24916)
+++ apps/gui/bitmap/list.c (working copy)
-40,6 +40,7 @@
#include "sound.h"
#include "misc.h"
#include "viewport.h"
+#include "statusbar-skinned.h"
#define ICON_PADDING 1
-82,6 +83,8 @@
int style = STYLE_DEFAULT;
struct viewport *title_text_vp = &title_text[screen];
+ if (sb_set_title_text(list->title, list->title_icon, screen))
+ return false; /* the sbs is handling the title */
display->scroll_stop(title_text_vp);
if (!list_display_title(list, screen))
return false;
Index: apps/gui/statusbar-skinned.c
===================================================================
--- apps/gui/statusbar-skinned.c (revision 24916)
+++ apps/gui/statusbar-skinned.c (working copy)
-33,6 +33,7 @@
#include "statusbar-skinned.h"
#include "debug.h"
#include "font.h"
+#include "icon.h"
/* currently only one wps_state is needed */
-44,6 +45,25 @@
/* initial setup of wps_data */
static int update_delay = DEFAULT_UPDATE_DELAY;
+bool sb_set_title_text(char* title, enum themable_icons icon, enum screen_type screen)
+{
+ int i;
+ bool retval = false;
+ for(i=0; i<sb_skin_data[screen].num_tokens; i++)
+ {
+ if (sb_skin_data[screen].tokens[i].type == WPS_TOKEN_LIST_TITLE_TEXT)
+ {
+ sb_skin_data[screen].tokens[i].value.data = title;
+ retval = true;
+ }
+ else if (sb_skin_data[screen].tokens[i].type == WPS_TOKEN_LIST_TITLE_ICON)
+ {
+ sb_skin_data[screen].tokens[i].value.i = icon;
+ }
+ }
+ return retval;
+}
+
void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile)
{
Index: apps/gui/statusbar-skinned.h
===================================================================
--- apps/gui/statusbar-skinned.h (revision 24916)
+++ apps/gui/statusbar-skinned.h (working copy)
-29,6 +29,7 @@
#include <string.h>
#include <stdlib.h>
#include "config.h"
+#include "icon.h"
void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile);
-39,6 +40,7 @@
void sb_skin_update(enum screen_type screen, bool force);
void sb_skin_set_update_delay(int delay);
+bool sb_set_title_text(char* title, enum themable_icons icon, enum screen_type screen);
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)
char* sb_get_backdrop(enum screen_type screen);
Index: apps/gui/skin_engine/skin_parser.c
===================================================================
--- apps/gui/skin_engine/skin_parser.c (revision 24916)
+++ apps/gui/skin_engine/skin_parser.c (working copy)
-366,6 +366,8 @@
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 },
Index: apps/gui/skin_engine/skin_tokens.c
===================================================================
--- apps/gui/skin_engine/skin_tokens.c (revision 24916)
+++ apps/gui/skin_engine/skin_tokens.c (working copy)
-416,6 +416,14 @@
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);
Index: apps/gui/skin_engine/skin_tokens.h
===================================================================
--- apps/gui/skin_engine/skin_tokens.h (revision 24916)
+++ apps/gui/skin_engine/skin_tokens.h (working copy)
-189,6 +189,8 @@
/* 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)
Index: apps/gui/list.c
===================================================================
--- apps/gui/list.c (revision 24916)
+++ apps/gui/list.c (working copy)
-39,6 +39,7 @@
#include "talk.h"
#include "viewport.h"
#include "appevents.h"
+#include "statusbar-skinned.h"
/* The minimum number of pending button events in queue before starting
* to limit list drawing interval.
-397,8 +398,12 @@
void gui_synclist_set_title(struct gui_synclist * gui_list,
char * title, enum themable_icons icon)
{
+ int i;
gui_list->title = title;
gui_list->title_icon = icon;
+ FOR_NB_SCREENS(i)
+ sb_set_title_text(title, icon, i);
+ send_event(GUI_EVENT_ACTIONUPDATE, (void*)1);
}
void gui_synclist_set_nb_items(struct gui_synclist * lists, int nb_items)
-550,7 +555,6 @@
#else
static int next_item_modifier = 1;
static int last_accel_tick = 0;
-
if (global_settings.list_accel_start_delay)
{
int start_delay = global_settings.list_accel_start_delay * (HZ/2);
Index: apps/menu.c
===================================================================
--- apps/menu.c (revision 24916)
+++ apps/menu.c (working copy)
-28,6 +28,7 @@
#include "config.h"
#include "system.h"
+#include "appevents.h"
#include "lcd.h"
#include "font.h"
#include "file.h"
-364,7 +365,7 @@
/* if hide_theme is true, assume parent has been fixed before passed into
* this function, e.g. with viewport_set_defaults(parent, screen) */
- init_menu_lists(menu, &lists, selected, true, parent);
+ init_menu_lists(menu, &lists, selected, true, parent);
vps = *(lists.parent);
in_stringlist = ((menu->flags&MENU_TYPE_MASK) == MT_RETURN_ID);
/* load the callback, and only reload it if menu changes */
-604,6 +605,7 @@
case MT_SETTING_W_TEXT:
{
do_setting_from_menu(temp, vps);
+ send_event(GUI_EVENT_ACTIONUPDATE, (void*)1); /* force a redraw */
break;
}
case MT_RETURN_ID: