summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-01-12 15:54:22 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-01-12 15:55:17 +0900
commit0cb33a46758bd1f66653e97d7ad027a9529b1279 (patch)
tree5e30b842661a5e7578fd4832dc499eed0630f258 /src/bin/edje
parent8002cabf359d1a7537e04b0bf4c333fd0e574419 (diff)
edje - edje_cc - fix wrong state lists where default is not the first
this fixes T1926 @fix
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_cc_handlers.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index aebb9533cf..dfb8ed48de 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -6478,12 +6478,37 @@ st_collections_group_parts_part_description_state(void)
6478 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1]; 6478 if (ep->other.desc_count) ed = ep->other.desc[ep->other.desc_count - 1];
6479 6479
6480 s = parse_str(0); 6480 s = parse_str(0);
6481 if (!strcmp (s, "custom")) 6481 if (!strcmp(s, "default"))
6482 {
6483 double v;
6484
6485 if (get_arg_count() == 1) v = 0.0;
6486 else v = parse_float_range(1, 0.0, 1.0);
6487 if (v == 0.0)
6488 {
6489 if (ed != ep->default_desc)
6490 {
6491 ERR("parse error %s:%i. description state '%s' %1.2f is not the first state listed",
6492 file_in, line - 1, s, v);
6493 exit(-1);
6494 }
6495 }
6496 }
6497 if (!strcmp(s, "custom"))
6482 { 6498 {
6483 ERR("parse error %s:%i. invalid state name: '%s'.", 6499 ERR("parse error %s:%i. invalid state name: '%s'.",
6484 file_in, line - 1, s); 6500 file_in, line - 1, s);
6485 exit(-1); 6501 exit(-1);
6486 } 6502 }
6503 if (ed == ep->default_desc)
6504 {
6505 if (strcmp(s, "default"))
6506 {
6507 ERR("parse error %s:%i. first state is not 'default'",
6508 file_in, line - 1);
6509 exit(-1);
6510 }
6511 }
6487 6512
6488 free((void *)ed->state.name); 6513 free((void *)ed->state.name);
6489 ed->state.name = s; 6514 ed->state.name = s;