summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-03-24 15:06:19 -0400
committerMike Blumenkrantz <zmike@samsung.com>2014-03-24 15:06:19 -0400
commitee7755e21bbb040ba8ca24ed2ee7b98d3328b25a (patch)
tree5210ac4a8f6deec795d12ad22bd609b8af54ca32 /src
parentcea92fa2fc3654cd8092280e7acf3727b3feb8bb (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_cc_handlers.c43
1 files changed, 23 insertions, 20 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 8ccaf9c..cd1080b 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -1128,25 +1128,27 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
1128 1128
1129 memcpy(copy, name, strlen(name) + 1); 1129 memcpy(copy, name, strlen(name) + 1);
1130 1130
1131 if (ep2->action == EDJE_ACTION_TYPE_STATE_SET) 1131 switch (ep2->action)
1132 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1133 else if (ep2->action == EDJE_ACTION_TYPE_ACTION_STOP)
1134 data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
1135 else if (ep2->action == EDJE_ACTION_TYPE_SCRIPT)
1136 data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
1137 else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_SET)
1138 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1139 else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_STEP)
1140 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1141 else if (ep2->action == EDJE_ACTION_TYPE_DRAG_VAL_PAGE)
1142 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1143 else if (ep2->action == EDJE_ACTION_TYPE_FOCUS_SET)
1144
1145 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1146 else if (ep2->action == EDJE_ACTION_TYPE_FOCUS_OBJECT)
1147 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1148 else
1149 { 1132 {
1133 case EDJE_ACTION_TYPE_STATE_SET:
1134 case EDJE_ACTION_TYPE_DRAG_VAL_SET:
1135 case EDJE_ACTION_TYPE_DRAG_VAL_STEP:
1136 case EDJE_ACTION_TYPE_DRAG_VAL_PAGE:
1137 case EDJE_ACTION_TYPE_FOCUS_SET:
1138 case EDJE_ACTION_TYPE_FOCUS_OBJECT:
1139 if (current_group_inherit)
1140 data_queue_part_lookup(pc, name, &et->id);
1141 else
1142 data_queue_copied_part_lookup(pc, &(et2->id), &(et->id));
1143 break;
1144 case EDJE_ACTION_TYPE_ACTION_STOP:
1145 case EDJE_ACTION_TYPE_SCRIPT:
1146 if (current_group_inherit)
1147 data_queue_program_lookup(pc, name, &et->id);
1148 else
1149 data_queue_copied_program_lookup(pc, &(et2->id), &(et->id));
1150 break;
1151 default:
1150 ERR("parse error %s:%i. target may only be used after action", 1152 ERR("parse error %s:%i. target may only be used after action",
1151 file_in, line - 1); 1153 file_in, line - 1);
1152 exit(-1); 1154 exit(-1);
@@ -2757,7 +2759,7 @@ st_collections_group_inherit(void)
2757 Edje_List_Foreach_Data fdata; 2759 Edje_List_Foreach_Data fdata;
2758 Eina_List *l; 2760 Eina_List *l;
2759 char *parent_name; 2761 char *parent_name;
2760 unsigned int i, j; 2762 unsigned int i, j, offset;
2761 2763
2762 check_arg_count(1); 2764 check_arg_count(1);
2763 2765
@@ -2851,11 +2853,12 @@ st_collections_group_inherit(void)
2851 2853
2852 // FIXME: Handle limits dup 2854 // FIXME: Handle limits dup
2853 2855
2856 offset = pc->parts_count;
2854 for (i = 0 ; i < pc2->parts_count ; i++) 2857 for (i = 0 ; i < pc2->parts_count ; i++)
2855 { 2858 {
2856 // copy the part 2859 // copy the part
2857 edje_cc_handlers_part_make(-1); 2860 edje_cc_handlers_part_make(-1);
2858 ep = pc->parts[i]; 2861 ep = pc->parts[i + offset];
2859 ep2 = pc2->parts[i]; 2862 ep2 = pc2->parts[i];
2860 _part_copy(ep, ep2); 2863 _part_copy(ep, ep2);
2861 } 2864 }