diff options
-rw-r--r-- | utils/skinupdater/skinupdater.c | 73 | ||||
-rw-r--r-- | utils/themeeditor/tag_table.c | 2 |
2 files changed, 73 insertions, 2 deletions
diff --git a/utils/skinupdater/skinupdater.c b/utils/skinupdater/skinupdater.c index 537c53ffbd..6577b77e6a 100644 --- a/utils/skinupdater/skinupdater.c +++ b/utils/skinupdater/skinupdater.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <stdlib.h> | 23 | #include <stdlib.h> |
24 | #include <stdbool.h> | 24 | #include <stdbool.h> |
25 | #include <string.h> | 25 | #include <string.h> |
26 | #include <ctype.h> | ||
26 | #include "tag_table.h" | 27 | #include "tag_table.h" |
27 | 28 | ||
28 | #define PUTCH(out, c) fprintf(out, "%c", c) | 29 | #define PUTCH(out, c) fprintf(out, "%c", c) |
@@ -191,8 +192,78 @@ int parse_tag(FILE* out, const char* start, bool in_conditional) | |||
191 | } | 192 | } |
192 | else if (MATCH("Cl")) | 193 | else if (MATCH("Cl")) |
193 | { | 194 | { |
195 | int read; | ||
196 | char xalign = '\0', yalign = '\0'; | ||
194 | PUTCH(out, '('); | 197 | PUTCH(out, '('); |
195 | len += 1+dump_arg(out, start+1, 4, true); | 198 | read = 1+dump_arg(out, start+1, 2, false); |
199 | len += read; | ||
200 | start += read; | ||
201 | switch (tolower(*start)) | ||
202 | { | ||
203 | case 'l': | ||
204 | case 'c': | ||
205 | case 'r': | ||
206 | case '+': | ||
207 | case '-': | ||
208 | xalign = *start; | ||
209 | len++; | ||
210 | start++; | ||
211 | break; | ||
212 | case 'd': | ||
213 | case 'D': | ||
214 | case 'i': | ||
215 | case 'I': | ||
216 | case 's': | ||
217 | case 'S': | ||
218 | len++; | ||
219 | start++; | ||
220 | break; | ||
221 | } | ||
222 | PUTCH(out,','); | ||
223 | read = dump_arg(out, start, 1, false); | ||
224 | len += read; | ||
225 | start += read; | ||
226 | switch (tolower(*start)) | ||
227 | { | ||
228 | case 't': | ||
229 | case 'c': | ||
230 | case 'b': | ||
231 | case '+': | ||
232 | case '-': | ||
233 | yalign = *start; | ||
234 | len++; | ||
235 | start++; | ||
236 | break; | ||
237 | case 'd': | ||
238 | case 'D': | ||
239 | case 'i': | ||
240 | case 'I': | ||
241 | case 's': | ||
242 | case 'S': | ||
243 | len++; | ||
244 | start++; | ||
245 | break; | ||
246 | } | ||
247 | PUTCH(out,','); | ||
248 | read = dump_arg(out, start, 1, false); | ||
249 | if (xalign) | ||
250 | { | ||
251 | if (xalign == '-') | ||
252 | xalign = 'l'; | ||
253 | if (xalign == '+') | ||
254 | xalign = 'r'; | ||
255 | fprintf(out, ",%c", xalign); | ||
256 | } | ||
257 | if (yalign) | ||
258 | { | ||
259 | if (yalign == '-') | ||
260 | yalign = 't'; | ||
261 | if (yalign == '+') | ||
262 | yalign = 'b'; | ||
263 | fprintf(out, ",%s%c", xalign?"":"-,", yalign); | ||
264 | } | ||
265 | PUTCH(out, ')'); | ||
266 | len += read; | ||
196 | } | 267 | } |
197 | else if (MATCH("Vd") || MATCH("VI")) | 268 | else if (MATCH("Vd") || MATCH("VI")) |
198 | { | 269 | { |
diff --git a/utils/themeeditor/tag_table.c b/utils/themeeditor/tag_table.c index 6ec33023c2..d128e5c0fa 100644 --- a/utils/themeeditor/tag_table.c +++ b/utils/themeeditor/tag_table.c | |||
@@ -172,7 +172,7 @@ struct tag_info legal_tags[] = | |||
172 | { SKIN_TOKEN_IMAGE_PRELOAD, "x", "SFII" }, | 172 | { SKIN_TOKEN_IMAGE_PRELOAD, "x", "SFII" }, |
173 | 173 | ||
174 | { SKIN_TOKEN_LOAD_FONT, "Fl" , "IF"}, | 174 | { SKIN_TOKEN_LOAD_FONT, "Fl" , "IF"}, |
175 | { SKIN_TOKEN_ALBUMART_LOAD, "Cl" , "IISS"}, | 175 | { SKIN_TOKEN_ALBUMART_LOAD, "Cl" , "IIII|ss"}, |
176 | { SKIN_TOKEN_ALBUMART_DISPLAY, "C" , ""}, | 176 | { SKIN_TOKEN_ALBUMART_DISPLAY, "C" , ""}, |
177 | 177 | ||
178 | { SKIN_TOKEN_VIEWPORT_ENABLE, "Vd" , "S"}, | 178 | { SKIN_TOKEN_VIEWPORT_ENABLE, "Vd" , "S"}, |