From 58a0393154cfced92830fed1a78450761f30f3b9 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 19 Apr 2010 08:43:42 +0000 Subject: 2 quick fixes 1) fix %pv| where the | is for a conditional break and not for long form %pv 2) only draw bmp-bars if they are enabled (by a conditional or always on.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25677 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_parser.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'apps/gui/skin_engine/skin_parser.c') diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index cac3b381b7..93c5c73210 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1158,6 +1158,7 @@ static int parse_progressbar(const char *wps_bufptr, 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 @@ static int parse_progressbar(const char *wps_bufptr, 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; -- cgit v1.2.3