summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-11-04 07:14:02 +0000
committerThomas Martitz <kugel@rockbox.org>2009-11-04 07:14:02 +0000
commitc0635ba6c9abc22bbb87a6b426d61d4c915f7131 (patch)
treee5589565f013ed144dc0f7bed93831b46d684a04 /apps/gui
parent6750d65f791f19097ce740cfbe12a873a915a897 (diff)
Remove wps_data.remote_wps. It's redundant with the new global curr_screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23512 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/skin_engine/skin_parser.c19
-rw-r--r--apps/gui/skin_engine/wps_internals.h4
-rw-r--r--apps/gui/statusbar-skinned.c6
-rw-r--r--apps/gui/wps.c7
4 files changed, 3 insertions, 33 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 3585907182..d06494d908 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -696,12 +696,6 @@ static int parse_viewport(const char *wps_bufptr,
(void)token; /* Kill warnings */
const char *ptr = wps_bufptr;
- const int screen =
-#ifdef HAVE_REMOTE_LCD
- wps_data->remote_wps ? SCREEN_REMOTE :
-#endif
- SCREEN_MAIN;
-
struct skin_viewport *skin_vp = skin_buffer_alloc(sizeof(struct skin_viewport));
/* check for the optional letter to signify its a hideable viewport */
@@ -749,7 +743,7 @@ static int parse_viewport(const char *wps_bufptr,
struct viewport *vp = &skin_vp->vp;
/* format: %V|x|y|width|height|font|fg_pattern|bg_pattern| */
- if (!(ptr = viewport_parse_viewport(vp, screen, ptr, '|')))
+ if (!(ptr = viewport_parse_viewport(vp, curr_screen, ptr, '|')))
return WPS_ERROR_INVALID_PARAM;
vp->flags &= ~VP_FLAG_ALIGN_RIGHT; /* ignore right-to-left languages */
@@ -1732,7 +1726,6 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug)
* initial setup of wps_data; does reset everything
* except fields which need to survive, i.e.
*
- * wps_data->remote_wps
**/
void skin_data_reset(struct wps_data *wps_data)
{
@@ -1784,7 +1777,7 @@ static bool load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char
/* load the image */
int format;
#ifdef HAVE_REMOTE_LCD
- if (wps_data->remote_wps)
+ if (curr_screen == SCREEN_REMOTE)
format = FORMAT_ANY|FORMAT_REMOTE;
else
#endif
@@ -1839,16 +1832,10 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir)
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
if (bmp_names[BACKDROP_BMP])
{
- int screen = SCREEN_MAIN;
char img_path[MAX_PATH];
get_image_filename(bmp_names[BACKDROP_BMP], bmpdir,
img_path, sizeof(img_path));
-#if defined(HAVE_REMOTE_LCD)
- /* We only need to check LCD type if there is a remote LCD */
- if (wps_data->remote_wps)
- screen = SCREEN_REMOTE;
-#endif
- screens[screen].backdrop_load(BACKDROP_SKIN_WPS, img_path);
+ screens[curr_screen].backdrop_load(BACKDROP_SKIN_WPS, img_path);
}
#endif /* has backdrop support */
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h
index 8763ef9e3d..e975616f91 100644
--- a/apps/gui/skin_engine/wps_internals.h
+++ b/apps/gui/skin_engine/wps_internals.h
@@ -274,10 +274,6 @@ struct wps_data
bool full_line_progressbar;
#endif
bool wps_loaded;
-#ifdef HAVE_REMOTE_LCD
- /* this must not be reset on skin loading */
- bool remote_wps;
-#endif
};
/* wps_data end */
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index 11805c83a8..2bef616524 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -71,9 +71,6 @@ void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile)
if (!success)
remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update);
-#ifdef HAVE_REMOVE_LCD
- data->remote_wps = !(screen == SCREEN_MAIN);
-#endif
loaded_ok[screen] = success;
}
@@ -211,9 +208,6 @@ void sb_skin_init(void)
sb_skin_data[i].albumart = NULL;
sb_skin_data[i].playback_aa_slot = -1;
#endif
-#ifdef HAVE_REMOTE_LCD
- sb_skin_data[i].remote_wps = (i == SCREEN_REMOTE);
-#endif
sb_skin[i].data = &sb_skin_data[i];
sb_skin[i].display = &screens[i];
/* Currently no seperate wps_state needed/possible
diff --git a/apps/gui/wps.c b/apps/gui/wps.c
index 4f162f452a..e0e63ad822 100644
--- a/apps/gui/wps.c
+++ b/apps/gui/wps.c
@@ -153,10 +153,6 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile)
};
skin_data_load(screen, gui_wps[screen].data, skin_buf[screen], false);
}
-#ifdef HAVE_REMOVE_LCD
- gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN);
-
-#endif
}
void fade(bool fade_in, bool updatewps)
@@ -1280,9 +1276,6 @@ void gui_sync_wps_init(void)
wps_datas[i].albumart = NULL;
wps_datas[i].playback_aa_slot = -1;
#endif
-#ifdef HAVE_REMOTE_LCD
- wps_datas[i].remote_wps = (i == SCREEN_REMOTE);
-#endif
gui_wps[i].data = &wps_datas[i];
gui_wps[i].display = &screens[i];
/* Currently no seperate wps_state needed/possible