diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/edje/src/bin/edje_cc_out.c | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/libraries/edje/src/bin/edje_cc_out.c b/libraries/edje/src/bin/edje_cc_out.c index 443a702..5050ad4 100644 --- a/libraries/edje/src/bin/edje_cc_out.c +++ b/libraries/edje/src/bin/edje_cc_out.c | |||
@@ -72,6 +72,7 @@ struct _Program_Lookup | |||
72 | struct _Group_Lookup | 72 | struct _Group_Lookup |
73 | { | 73 | { |
74 | char *name; | 74 | char *name; |
75 | Edje_Part *part; | ||
75 | }; | 76 | }; |
76 | 77 | ||
77 | struct _String_Lookup | 78 | struct _String_Lookup |
@@ -808,8 +809,8 @@ data_write_groups(Eet_File *ef, int *collection_num) | |||
808 | 809 | ||
809 | if (verbose) | 810 | if (verbose) |
810 | { | 811 | { |
811 | printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" collection entry\n", | 812 | printf("%s: Wrote %9i bytes (%4iKb) for \"%s\" aka \"%s\" collection entry\n", |
812 | progname, bytes, (bytes + 512) / 1024, buf); | 813 | progname, bytes, (bytes + 512) / 1024, buf, pc->part); |
813 | } | 814 | } |
814 | } | 815 | } |
815 | 816 | ||
@@ -1371,13 +1372,16 @@ reorder_parts(void) | |||
1371 | } | 1372 | } |
1372 | 1373 | ||
1373 | void | 1374 | void |
1374 | data_queue_group_lookup(char *name) | 1375 | data_queue_group_lookup(const char *name, Edje_Part *part) |
1375 | { | 1376 | { |
1376 | Group_Lookup *gl; | 1377 | Group_Lookup *gl; |
1377 | 1378 | ||
1379 | if (!name || !name[0]) return; | ||
1380 | |||
1378 | gl = mem_alloc(SZ(Group_Lookup)); | 1381 | gl = mem_alloc(SZ(Group_Lookup)); |
1379 | group_lookups = eina_list_append(group_lookups, gl); | 1382 | group_lookups = eina_list_append(group_lookups, gl); |
1380 | gl->name = mem_strdup(name); | 1383 | gl->name = mem_strdup(name); |
1384 | gl->part = part; | ||
1381 | } | 1385 | } |
1382 | 1386 | ||
1383 | void | 1387 | void |
@@ -1698,15 +1702,38 @@ data_process_lookups(void) | |||
1698 | { | 1702 | { |
1699 | Edje_Part_Collection_Directory_Entry *de; | 1703 | Edje_Part_Collection_Directory_Entry *de; |
1700 | 1704 | ||
1705 | if (group->part) | ||
1706 | { | ||
1707 | if (group->part->type != EDJE_PART_TYPE_GROUP | ||
1708 | && group->part->type != EDJE_PART_TYPE_TEXTBLOCK | ||
1709 | && group->part->type != EDJE_PART_TYPE_BOX | ||
1710 | && group->part->type != EDJE_PART_TYPE_TABLE) | ||
1711 | goto free_group; | ||
1712 | } | ||
1713 | |||
1701 | de = eina_hash_find(edje_file->collection, group->name); | 1714 | de = eina_hash_find(edje_file->collection, group->name); |
1702 | 1715 | ||
1703 | if (!de) | 1716 | if (!de) |
1717 | { | ||
1718 | Eina_Bool found = EINA_FALSE; | ||
1719 | |||
1720 | EINA_LIST_FOREACH(aliases, l, de) | ||
1721 | if (strcmp(de->entry, group->name) == 0) | ||
1722 | { | ||
1723 | found = EINA_TRUE; | ||
1724 | break; | ||
1725 | } | ||
1726 | if (!found) de = NULL; | ||
1727 | } | ||
1728 | |||
1729 | if (!de) | ||
1704 | { | 1730 | { |
1705 | ERR("%s: Error. Unable to find group name \"%s\".", | 1731 | ERR("%s: Error. Unable to find group name \"%s\".", |
1706 | progname, group->name); | 1732 | progname, group->name); |
1707 | exit(-1); | 1733 | exit(-1); |
1708 | } | 1734 | } |
1709 | 1735 | ||
1736 | free_group: | ||
1710 | free(group->name); | 1737 | free(group->name); |
1711 | free(group); | 1738 | free(group); |
1712 | } | 1739 | } |
@@ -1914,7 +1941,7 @@ _data_queue_program_lookup(Edje_Part_Collection *pc, char *name, char *ptr, int | |||
1914 | static void | 1941 | static void |
1915 | _data_queue_group_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr __UNUSED__, int len __UNUSED__) | 1942 | _data_queue_group_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr __UNUSED__, int len __UNUSED__) |
1916 | { | 1943 | { |
1917 | data_queue_group_lookup(name); | 1944 | data_queue_group_lookup(name, NULL); |
1918 | } | 1945 | } |
1919 | static void | 1946 | static void |
1920 | _data_queue_image_pc_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr, int len) | 1947 | _data_queue_image_pc_lookup(Edje_Part_Collection *pc __UNUSED__, char *name, char *ptr, int len) |