Index: apps/gui/skin_engine/skin_parser.c
===================================================================
--- apps/gui/skin_engine/skin_parser.c (revision 25663)
+++ apps/gui/skin_engine/skin_parser.c (working copy)
@@ -1158,6 +1158,7 @@
pb->have_bitmap_pb = false;
pb->bm.data = NULL; /* no bitmap specified */
pb->follow_lang_direction = follow_lang_direction > 0;
+ pb->draw = false;
if (*wps_bufptr != '|') /* regular old style */
{
@@ -1174,7 +1175,14 @@
if (!(ptr = parse_list("sdddd", &set, '|', ptr, &filename,
&x, &y, &width, &height)))
+ {
+ /* if we are in a conditional then we probably don't want to fail
+ * if the above doesnt work. so ASSume the | is breaking the conditional
+ * and move on. the next token will fail if this is incorrect */
+ if (level > 0)
+ return 0;
return WPS_ERROR_INVALID_PARAM;
+ }
if (LIST_VALUE_PARSED(set, PB_FILENAME)) /* filename */
pb->bm.data = (char*)filename;
Index: apps/gui/skin_engine/skin_display.c
===================================================================
--- apps/gui/skin_engine/skin_display.c (revision 25661)
+++ apps/gui/skin_engine/skin_display.c (working copy)
@@ -609,6 +609,12 @@
/* clear all pictures in the conditional and nested ones */
if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY)
clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, data));
+ else if (data->tokens[i].type == WPS_TOKEN_VOLUMEBAR ||
+ data->tokens[i].type == WPS_TOKEN_PROGRESSBAR)
+ {
+ struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data;
+ bar->draw = false;
+ }
#endif
#ifdef HAVE_ALBUMART
if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY)
@@ -671,6 +677,13 @@
break;
#ifdef HAVE_LCD_BITMAP
+ case WPS_TOKEN_VOLUMEBAR:
+ case WPS_TOKEN_PROGRESSBAR:
+ {
+ struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data;
+ bar->draw = true;
+ }
+ break;
case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY:
{
char n = data->tokens[i].value.i & 0xFF;
@@ -1256,7 +1269,7 @@
while (bar)
{
struct progressbar *thisbar = (struct progressbar*)bar->token->value.data;
- if (thisbar->vp == &skin_viewport->vp)
+ if (thisbar->vp == &skin_viewport->vp && thisbar->draw)
{
draw_progressbar(gwps, thisbar);
}
Index: apps/gui/skin_engine/wps_internals.h
===================================================================
--- apps/gui/skin_engine/wps_internals.h (revision 25659)
+++ apps/gui/skin_engine/wps_internals.h (working copy)
@@ -105,6 +105,8 @@
/*progressbar image*/
struct bitmap bm;
bool have_bitmap_pb;
+
+ bool draw;
};
#endif