summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/skinupdater/skinupdater.c18
-rw-r--r--utils/themeeditor/skin_parser.c6
-rw-r--r--utils/themeeditor/tag_table.c8
-rw-r--r--utils/themeeditor/tag_table.h1
4 files changed, 26 insertions, 7 deletions
diff --git a/utils/skinupdater/skinupdater.c b/utils/skinupdater/skinupdater.c
index 0bb305fb5e..fe7edbb81b 100644
--- a/utils/skinupdater/skinupdater.c
+++ b/utils/skinupdater/skinupdater.c
@@ -130,10 +130,26 @@ int parse_tag(FILE* out, const char* start, bool in_conditional)
130 { 130 {
131 if (*start == '|') 131 if (*start == '|')
132 { 132 {
133 int i=0;
134 char filename[128];
133 len++; start++; 135 len++; start++;
134 PUTCH(out, '('); 136 PUTCH(out, '(');
137 /* |file|x|y|width|height| -> (x,y,width,height,file) */
138 while (start[i] != '|')
139 {
140 filename[i] = start[i];
141 i++;
142 }
143 filename[i] = '\0';
144 len +=i+1;
145 start += i+1;
135 /* TODO: need to verify that we are actually using the long form... */ 146 /* TODO: need to verify that we are actually using the long form... */
136 len += dump_arg(out, start, 5, true); 147 len += dump_arg(out, start, 4, false);
148 if (i>0)
149 {
150 fprintf(out, ",%s", filename);
151 }
152 PUTCH(out, ')');
137 } 153 }
138 } 154 }
139 else if (MATCH("d") || MATCH("D") || MATCH("mv") || MATCH("pS") || MATCH("pE") || MATCH("t") || MATCH("Tl")) 155 else if (MATCH("d") || MATCH("D") || MATCH("mv") || MATCH("pS") || MATCH("pE") || MATCH("t") || MATCH("Tl"))
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c
index 707fffd87a..401181cc3d 100644
--- a/utils/themeeditor/skin_parser.c
+++ b/utils/themeeditor/skin_parser.c
@@ -543,7 +543,8 @@ int skin_parse_tag(struct skin_element* element, char** document)
543 element->params[i].type = NUMERIC; 543 element->params[i].type = NUMERIC;
544 element->params[i].data.numeric = scan_int(&cursor); 544 element->params[i].data.numeric = scan_int(&cursor);
545 } 545 }
546 else if(tolower(*tag_args) == 's' || tolower(*tag_args) == 'f') 546 else if(tolower(*tag_args) == 'n' ||
547 tolower(*tag_args) == 's' || tolower(*tag_args) == 'f')
547 { 548 {
548 /* Scanning a string argument */ 549 /* Scanning a string argument */
549 element->params[i].type = STRING; 550 element->params[i].type = STRING;
@@ -576,7 +577,8 @@ int skin_parse_tag(struct skin_element* element, char** document)
576 cursor++; 577 cursor++;
577 } 578 }
578 579
579 tag_args++; 580 if (*tag_args != 'N')
581 tag_args++;
580 582
581 /* Checking for the optional bar */ 583 /* Checking for the optional bar */
582 if(*tag_args == '|') 584 if(*tag_args == '|')
diff --git a/utils/themeeditor/tag_table.c b/utils/themeeditor/tag_table.c
index bf35c9bf71..d03f2444dd 100644
--- a/utils/themeeditor/tag_table.c
+++ b/utils/themeeditor/tag_table.c
@@ -22,7 +22,7 @@
22#include "tag_table.h" 22#include "tag_table.h"
23 23
24#include <string.h> 24#include <string.h>
25 25#define BAR_PARAMS "*|IIIIN"
26/* The tag definition table */ 26/* The tag definition table */
27struct tag_info legal_tags[] = 27struct tag_info legal_tags[] =
28{ 28{
@@ -33,7 +33,7 @@ struct tag_info legal_tags[] =
33 { SKIN_TOKEN_ALIGN_RIGHT_RTL, "aR", "" }, 33 { SKIN_TOKEN_ALIGN_RIGHT_RTL, "aR", "" },
34 { SKIN_TOKEN_ALIGN_LANGDIRECTION, "ax", "" }, 34 { SKIN_TOKEN_ALIGN_LANGDIRECTION, "ax", "" },
35 35
36 { SKIN_TOKEN_BATTERY_PERCENT, "bl" , "*fIIII" }, 36 { SKIN_TOKEN_BATTERY_PERCENT, "bl" , BAR_PARAMS },
37 { SKIN_TOKEN_BATTERY_VOLTS, "bv", "" }, 37 { SKIN_TOKEN_BATTERY_VOLTS, "bv", "" },
38 { SKIN_TOKEN_BATTERY_TIME, "bt", "" }, 38 { SKIN_TOKEN_BATTERY_TIME, "bt", "" },
39 { SKIN_TOKEN_BATTERY_SLEEPTIME, "bs", "" }, 39 { SKIN_TOKEN_BATTERY_SLEEPTIME, "bs", "" },
@@ -124,8 +124,8 @@ struct tag_info legal_tags[] =
124 124
125 { SKIN_TOKEN_PEAKMETER, "pm", "" }, 125 { SKIN_TOKEN_PEAKMETER, "pm", "" },
126 { SKIN_TOKEN_PLAYER_PROGRESSBAR, "pf", "" }, 126 { SKIN_TOKEN_PLAYER_PROGRESSBAR, "pf", "" },
127 { SKIN_TOKEN_PROGRESSBAR, "pb" , "*fIIII" }, 127 { SKIN_TOKEN_PROGRESSBAR, "pb" , BAR_PARAMS },
128 { SKIN_TOKEN_VOLUME, "pv" , "*fIIII" }, 128 { SKIN_TOKEN_VOLUME, "pv" , BAR_PARAMS },
129 129
130 { SKIN_TOKEN_TRACK_ELAPSED_PERCENT, "px", "" }, 130 { SKIN_TOKEN_TRACK_ELAPSED_PERCENT, "px", "" },
131 { SKIN_TOKEN_TRACK_TIME_ELAPSED, "pc", "" }, 131 { SKIN_TOKEN_TRACK_TIME_ELAPSED, "pc", "" },
diff --git a/utils/themeeditor/tag_table.h b/utils/themeeditor/tag_table.h
index 760c9f5f61..ec9a1021ab 100644
--- a/utils/themeeditor/tag_table.h
+++ b/utils/themeeditor/tag_table.h
@@ -263,6 +263,7 @@ enum skin_token_type {
263 * F - Required file name 263 * F - Required file name
264 * f - Nullable file name 264 * f - Nullable file name
265 * C - Required skin code 265 * C - Required skin code
266 * N - any amount of strings.. must be the last param in the list
266 * Any nullable parameter may be replaced in the WPS file 267 * Any nullable parameter may be replaced in the WPS file
267 * with a '-'. To specify that parameters may be left off 268 * with a '-'. To specify that parameters may be left off
268 * altogether, place a '|' in the parameter string. For 269 * altogether, place a '|' in the parameter string. For