edje_cc now correctly handles group inheriting when the inherit is after a part/program

this is technically @fix, but it's also new-ish behavior so I'm not going to backport it; 1.10 can be the edje_cc release
This commit is contained in:
Mike Blumenkrantz 2014-03-24 15:06:19 -04:00
parent cea92fa2fc
commit ee7755e21b
1 changed files with 23 additions and 20 deletions

View File

@ -1128,25 +1128,27 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
memcpy(copy, name, strlen(name) + 1); memcpy(copy, name, strlen(name) + 1);
if (ep2->action == EDJE_ACTION_TYPE_STATE_SET) switch (ep2->action)
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
else if (ep2->action == EDJE_ACTION_TYPE_ACTION_STOP)
data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
else if (ep2->action == EDJE_ACTION_TYPE_SCRIPT)
data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
else if (ep2->action == EDJE_ACTION_TYPE_FOCUS_SET)
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
else if (ep2->action == EDJE_ACTION_TYPE_FOCUS_OBJECT)
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
else
{ {
case EDJE_ACTION_TYPE_STATE_SET:
case EDJE_ACTION_TYPE_DRAG_VAL_SET:
case EDJE_ACTION_TYPE_DRAG_VAL_STEP:
case EDJE_ACTION_TYPE_DRAG_VAL_PAGE:
case EDJE_ACTION_TYPE_FOCUS_SET:
case EDJE_ACTION_TYPE_FOCUS_OBJECT:
if (current_group_inherit)
data_queue_part_lookup(pc, name, &et->id);
else
data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
break;
case EDJE_ACTION_TYPE_ACTION_STOP:
case EDJE_ACTION_TYPE_SCRIPT:
if (current_group_inherit)
data_queue_program_lookup(pc, name, &et->id);
else
data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
break;
default:
ERR("parse error %s:%i. target may only be used after action", ERR("parse error %s:%i. target may only be used after action",
file_in, line - 1); file_in, line - 1);
exit(-1); exit(-1);
@ -2757,7 +2759,7 @@ st_collections_group_inherit(void)
Edje_List_Foreach_Data fdata; Edje_List_Foreach_Data fdata;
Eina_List *l; Eina_List *l;
char *parent_name; char *parent_name;
unsigned int i, j; unsigned int i, j, offset;
check_arg_count(1); check_arg_count(1);
@ -2851,11 +2853,12 @@ st_collections_group_inherit(void)
// FIXME: Handle limits dup // FIXME: Handle limits dup
offset = pc->parts_count;
for (i = 0 ; i < pc2->parts_count ; i++) for (i = 0 ; i < pc2->parts_count ; i++)
{ {
// copy the part // copy the part
edje_cc_handlers_part_make(-1); edje_cc_handlers_part_make(-1);
ep = pc->parts[i]; ep = pc->parts[i + offset];
ep2 = pc2->parts[i]; ep2 = pc2->parts[i];
_part_copy(ep, ep2); _part_copy(ep, ep2);
} }