From 5ffef1e853f63005c4e50fd4d83d063fbca15daa Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 31 Mar 2014 15:30:48 -0400 Subject: [PATCH] edje_cc no longer allows buggy/unexpected behavior when inheriting parts previously we allowed users to not specify the state names for non-default description states. this guaranteed crazy behavior during inheritance since it was impossible to properly reference such states. --- src/bin/edje/edje_cc_handlers.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index f483ed3a86..a1a20dda89 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -2755,6 +2755,8 @@ _part_copy(Edje_Part *ep, Edje_Part *ep2) The child group has the same property as parent group. If you specify the type again in an inherited part, it will cause an error (unless you plan to fix that). + @warning When inheriting any parts, descriptions without state names are NOT + allowed. @endproperty @since 1.1.0 */ @@ -3589,6 +3591,8 @@ _part_free(Edje_Part *ep) @effect Copies all attributes except part name from referenced part into current part. ALL existing attributes, except part name, are overwritten. + @warning When inheriting any parts, descriptions without state names are NOT + allowed. @endproperty @since 1.10 */ @@ -10377,6 +10381,19 @@ edje_cc_handlers_hierarchy_pop(void) { /* Remove part from hierarchy stack when finished parsing it */ Edje_Cc_Handlers_Hierarchy_Info *info = eina_array_pop(part_hierarchy); + if (current_part) + { + unsigned int i; + + for (i = 0; i < current_part->other.desc_count; i++) + if (!current_part->other.desc[i]->state.name) + { + ERR("syntax error near %s:%i. Non-default parts are required to have state names for all descriptions (Group '%s', part '%s' has missing description state names)", + file_in, line - 1, current_de->entry, current_part->name); + exit(-1); + } + } + if (info) { current_de = info->current_de;