summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r--apps/gui/skin_engine/skin_parser.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 70ffe0b516..73702cbf09 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -322,7 +322,8 @@ static const struct wps_tag all_tags[] = {
322 { WPS_TOKEN_PROGRESSBAR, "pb", WPS_REFRESH_PLAYER_PROGRESS, 322 { WPS_TOKEN_PROGRESSBAR, "pb", WPS_REFRESH_PLAYER_PROGRESS,
323 parse_progressbar }, 323 parse_progressbar },
324 324
325 { WPS_TOKEN_VOLUME, "pv", WPS_REFRESH_DYNAMIC, NULL }, 325 { WPS_TOKEN_VOLUME, "pv", WPS_REFRESH_DYNAMIC,
326 parse_progressbar },
326 327
327 { WPS_TOKEN_TRACK_ELAPSED_PERCENT, "px", WPS_REFRESH_DYNAMIC, NULL }, 328 { WPS_TOKEN_TRACK_ELAPSED_PERCENT, "px", WPS_REFRESH_DYNAMIC, NULL },
328 { WPS_TOKEN_TRACK_TIME_ELAPSED, "pc", WPS_REFRESH_DYNAMIC, NULL }, 329 { WPS_TOKEN_TRACK_TIME_ELAPSED, "pc", WPS_REFRESH_DYNAMIC, NULL },
@@ -900,7 +901,6 @@ static int parse_viewport(const char *wps_bufptr,
900 /* %Vl|<label>|<rest of tags>| */ 901 /* %Vl|<label>|<rest of tags>| */
901 skin_vp->hidden_flags = 0; 902 skin_vp->hidden_flags = 0;
902 skin_vp->label = VP_NO_LABEL; 903 skin_vp->label = VP_NO_LABEL;
903 skin_vp->pb = NULL;
904 skin_vp->lines = NULL; 904 skin_vp->lines = NULL;
905 if (curr_line) 905 if (curr_line)
906 { 906 {
@@ -1118,7 +1118,7 @@ static int parse_timeout(const char *wps_bufptr,
1118 1118
1119 return skip; 1119 return skip;
1120} 1120}
1121 1121
1122static int parse_progressbar(const char *wps_bufptr, 1122static int parse_progressbar(const char *wps_bufptr,
1123 struct wps_token *token, 1123 struct wps_token *token,
1124 struct wps_data *wps_data) 1124 struct wps_data *wps_data)
@@ -1153,6 +1153,7 @@ static int parse_progressbar(const char *wps_bufptr,
1153 line_num++; 1153 line_num++;
1154 line = line->next; 1154 line = line->next;
1155 } 1155 }
1156 pb->vp = vp;
1156 pb->have_bitmap_pb = false; 1157 pb->have_bitmap_pb = false;
1157 pb->bm.data = NULL; /* no bitmap specified */ 1158 pb->bm.data = NULL; /* no bitmap specified */
1158 pb->follow_lang_direction = follow_lang_direction > 0; 1159 pb->follow_lang_direction = follow_lang_direction > 0;
@@ -1163,8 +1164,8 @@ static int parse_progressbar(const char *wps_bufptr,
1163 pb->width = vp->width; 1164 pb->width = vp->width;
1164 pb->height = SYSFONT_HEIGHT-2; 1165 pb->height = SYSFONT_HEIGHT-2;
1165 pb->y = -line_num - 1; /* Will be computed during the rendering */ 1166 pb->y = -line_num - 1; /* Will be computed during the rendering */
1166 1167 if (token->type == WPS_TOKEN_VOLUME)
1167 curr_vp->pb = pb; 1168 return 0; /* dont add it, let the regular token handling do the work */
1168 add_to_ll_chain(&wps_data->progressbars, item); 1169 add_to_ll_chain(&wps_data->progressbars, item);
1169 return 0; 1170 return 0;
1170 } 1171 }
@@ -1220,19 +1221,20 @@ static int parse_progressbar(const char *wps_bufptr,
1220 else 1221 else
1221 pb->y = -line_num - 1; /* Will be computed during the rendering */ 1222 pb->y = -line_num - 1; /* Will be computed during the rendering */
1222 1223
1223 curr_vp->pb = pb;
1224 add_to_ll_chain(&wps_data->progressbars, item); 1224 add_to_ll_chain(&wps_data->progressbars, item);
1225 1225 if (token->type == WPS_TOKEN_VOLUME)
1226 token->type = WPS_TOKEN_VOLUMEBAR;
1227 pb->type = token->type;
1226 /* Skip the rest of the line */ 1228 /* Skip the rest of the line */
1227 return skip_end_of_line(wps_bufptr)-1; 1229 return skip_end_of_line(wps_bufptr)-1;
1228#else 1230#else
1229 (void)token; 1231 (void)token;
1230 1232
1231 if (*(wps_bufptr-1) == 'f') 1233 if (token->type != WPS_TOKEN_VOLUME)
1232 wps_data->full_line_progressbar = true; 1234 {
1233 else 1235 wps_data->full_line_progressbar =
1234 wps_data->full_line_progressbar = false; 1236 token->type == WPS_TOKEN_PLAYER_PROGRESSBAR;
1235 1237 }
1236 return 0; 1238 return 0;
1237 1239
1238#endif 1240#endif
@@ -2205,7 +2207,6 @@ bool skin_data_load(enum screen_type screen, struct wps_data *wps_data,
2205 2207
2206 /* Initialise the first (default) viewport */ 2208 /* Initialise the first (default) viewport */
2207 curr_vp->label = VP_DEFAULT_LABEL; 2209 curr_vp->label = VP_DEFAULT_LABEL;
2208 curr_vp->pb = NULL;
2209 curr_vp->hidden_flags = 0; 2210 curr_vp->hidden_flags = 0;
2210 curr_vp->lines = NULL; 2211 curr_vp->lines = NULL;
2211 2212