summaryrefslogtreecommitdiffstats
path: root/apps/gui/statusbar-skinned.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-11-21 10:02:23 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-11-21 10:02:23 +0000
commit0ca4b38b1b04e6b7d6f5ad1f3654f8f361d8933f (patch)
treec17fc93ca3814537e12521c4bebfb560739c8ea9 /apps/gui/statusbar-skinned.c
parent814ffffdbe5a5ea420ddc6475512a75cba7a8583 (diff)
downloadrockbox-0ca4b38b1b04e6b7d6f5ad1f3654f8f361d8933f.tar.gz
rockbox-0ca4b38b1b04e6b7d6f5ad1f3654f8f361d8933f.tar.bz2
rockbox-0ca4b38b1b04e6b7d6f5ad1f3654f8f361d8933f.zip
skinengine: Rework skin loading so skins can be un/loaded individually. This also means that loading a .cfg which doesnt change themes shouldnt have them reloaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31037 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r--apps/gui/statusbar-skinned.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index 960cf67d4d..fc9735da21 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -50,6 +50,7 @@ static int update_delay = DEFAULT_UPDATE_DELAY;
static bool sbs_has_title[NB_SCREENS];
static char* sbs_title[NB_SCREENS];
static enum themable_icons sbs_icon[NB_SCREENS];
+static bool sbs_loaded[NB_SCREENS] = { false };
bool sb_set_title_text(char* title, enum themable_icons icon, enum screen_type screen)
{
@@ -76,6 +77,7 @@ enum themable_icons sb_get_icon(enum screen_type screen)
int sb_preproccess(enum screen_type screen, struct wps_data *data)
{
(void)data;
+ sbs_loaded[screen] = false;
sbs_has_title[screen] = false;
viewportmanager_theme_enable(screen, false, NULL);
return 1;
@@ -101,6 +103,7 @@ int sb_postproccess(enum screen_type screen, struct wps_data *data)
vp->hidden_flags = VP_NEVER_VISIBLE;
}
sb_set_info_vp(screen, VP_DEFAULT_LABEL);
+ sbs_loaded[screen] = true;
}
viewportmanager_theme_undo(screen, false);
return 1;
@@ -115,6 +118,8 @@ void sb_set_info_vp(enum screen_type screen, OFFSETTYPE(char*) label)
struct viewport *sb_skin_get_info_vp(enum screen_type screen)
{
+ if (sbs_loaded[screen] == false)
+ return NULL;
struct wps_data *data = skin_get_gwps(CUSTOM_STATUSBAR, screen)->data;
struct skin_viewport *vp = NULL;
char *label;