summaryrefslogtreecommitdiffstats
path: root/apps/gui/statusbar-skinned.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-03-07 12:45:45 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-03-07 12:45:45 +0000
commit343001b5f86f61a48b8520c9a1eb2790f50a8b27 (patch)
treebc1cf0e7451adb10668e9c1cff90e76cbbf55e3d /apps/gui/statusbar-skinned.c
parent4cc2cc430c026ce59d089f76c678202d977bad37 (diff)
downloadrockbox-343001b5f86f61a48b8520c9a1eb2790f50a8b27.tar.gz
rockbox-343001b5f86f61a48b8520c9a1eb2790f50a8b27.tar.bz2
rockbox-343001b5f86f61a48b8520c9a1eb2790f50a8b27.zip
Merge a bunch of code which is 99% identical so it makes it easier to add more of these later
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29535 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r--apps/gui/statusbar-skinned.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index 887b0844d7..58f58e4890 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -87,7 +87,7 @@ int sb_postproccess(enum screen_type screen, struct wps_data *data)
/* hide the sb's default viewport because it has nasty effect with stuff
* not part of the statusbar,
* hence .sbs's without any other vps are unsupported*/
- struct skin_viewport *vp = find_viewport(VP_DEFAULT_LABEL, false, data);
+ struct skin_viewport *vp = skin_find_item(VP_DEFAULT_LABEL, SKIN_FIND_VP, data);
struct skin_element *next_vp = data->tree->next;
if (vp)
@@ -115,6 +115,7 @@ void sb_set_info_vp(enum screen_type screen, char *label)
struct viewport *sb_skin_get_info_vp(enum screen_type screen)
{
struct wps_data *data = skin_get_gwps(CUSTOM_STATUSBAR, screen)->data;
+ struct skin_viewport *vp = NULL;
if (oldinfovp_label[screen] &&
strcmp(oldinfovp_label[screen], infovp_label[screen]))
{
@@ -122,8 +123,9 @@ struct viewport *sb_skin_get_info_vp(enum screen_type screen)
oldinfovp_label[screen] = infovp_label[screen];
viewportmanager_theme_enable(screen, false, NULL);
viewportmanager_theme_undo(screen, true);
- }
- return &find_viewport(infovp_label[screen], true, data)->vp;
+ }
+ vp = skin_find_item(infovp_label[screen], SKIN_FIND_UIVP, data);
+ return &vp->vp;
}
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && LCD_REMOTE_DEPTH > 1)