summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>2014-08-14 00:08:06 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-08-14 00:08:07 +0900
commitd08dd13d3d344ba1d1c3ee458618497585b6f25c (patch)
treeb93b089d6484e07ce448bda245973fa844be8d0a /src/bin/edje
parentc8976fb21edb15ad8fc5e34e0406c3a830088d1d (diff)
edje_pick: fix a copied aliases
Summary: @fix Reviewers: raster, Hermet, seoz, cedric Subscribers: cedric, seoz, Sachiel Differential Revision: https://phab.enlightenment.org/D1305
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_pick.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c
index fa270783f0..e4609ecc46 100644
--- a/src/bin/edje/edje_pick.c
+++ b/src/bin/edje/edje_pick.c
@@ -568,10 +568,9 @@ _edje_pick_header_make(Edje_File *out_file , Edje_File *edf, Eina_List *ifs)
568 static int current_group_id = 0; 568 static int current_group_id = 0;
569 Edje_Part_Collection_Directory_Entry *ce; 569 Edje_Part_Collection_Directory_Entry *ce;
570 Eina_Bool status = EDJE_PICK_NO_ERROR; 570 Eina_Bool status = EDJE_PICK_NO_ERROR;
571 Eina_List *l; 571 Eina_List *l, *alist = NULL;
572 char *name1 = NULL; 572 char *name1 = NULL;
573 573
574
575 /* Build file header */ 574 /* Build file header */
576 if (context.current_file->append) 575 if (context.current_file->append)
577 { 576 {
@@ -592,10 +591,10 @@ _edje_pick_header_make(Edje_File *out_file , Edje_File *edf, Eina_List *ifs)
592 ce = eina_hash_find(edf->collection, name1); 591 ce = eina_hash_find(edf->collection, name1);
593 ce_out = malloc(sizeof(*ce_out)); 592 ce_out = malloc(sizeof(*ce_out));
594 memcpy(ce_out, ce, sizeof(*ce_out)); 593 memcpy(ce_out, ce, sizeof(*ce_out));
594 if (ce_out->group_alias)
595 alist = eina_list_append(alist, eina_stringshare_add(name1));
595 596
596 ce_out->id = current_group_id; 597 ce_out->id = current_group_id;
597 EINA_LOG_INFO("Changing ID of group <%d> to <%d>\n",
598 ce->id, ce_out->id);
599 current_group_id++; 598 current_group_id++;
600 599
601 eina_hash_direct_add(out_file->collection, ce_out->entry, ce_out); 600 eina_hash_direct_add(out_file->collection, ce_out->entry, ce_out);
@@ -606,6 +605,24 @@ _edje_pick_header_make(Edje_File *out_file , Edje_File *edf, Eina_List *ifs)
606 } 605 }
607 606
608 eina_iterator_free(i); 607 eina_iterator_free(i);
608 EINA_LIST_FOREACH(alist, l, name1)
609 {
610 Edje_Part_Collection_Directory_Entry *ce_cor;
611
612 ce = eina_hash_find(edf->collection, name1);
613 i = eina_hash_iterator_data_new(edf->collection);
614 EINA_ITERATOR_FOREACH(i, ce_cor)
615 {
616 if ((ce->id == ce_cor->id) && (!ce_cor->group_alias))
617 break;
618 }
619 ce = eina_hash_find(out_file->collection, ce_cor->entry);
620 ce_cor = eina_hash_find(out_file->collection, name1);
621 ce_cor->id = ce->id;
622 }
623 eina_iterator_free(i);
624 EINA_LIST_FREE(alist, name1)
625 eina_stringshare_del(name1);
609 } 626 }
610 else 627 else
611 { 628 {