/* copy aliases into collection directory */
EINA_LIST_FREE(aliases, ce)
{
+ Edje_Part_Collection_Directory_Entry *sce;
+ Eina_Iterator *it;
+
if (!ce->entry)
error_and_abort(ef, "Collection %i: name missing.\n", ce->id);
+
+ it = eina_hash_iterator_data_new(new_edje_file->collection);
+
+ EINA_ITERATOR_FOREACH(it, sce)
+ if (ce->id == sce->id)
+ {
+ memcpy(&ce->count, &sce->count, sizeof (ce->count));
+ break;
+ }
+
+ if (!sce)
+ error_and_abort(ef, "Collection %s (%i) can't find an correct alias.\n", ce->entry, ce->id);
+
+ eina_iterator_free(it);
+
eina_hash_direct_add(new_edje_file->collection, ce->entry, ce);
}
}
Edje_Program *pg;
Old_Edje_Data *di;
Eina_List *l;
+ char *buffer;
unsigned int k;
oedc->part = ce->entry;
}
ce->count.part = eina_list_count(oedc->parts);
-#define CONVERT_EMN(Tp, Sz, Ce) \
- Ce->mp.Tp = eina_mempool_add("one_big", #Tp, NULL, sizeof (Sz), Ce->count.Tp);
+#define CONVERT_EMN(Tp, Sz, Ce) \
+ buffer = alloca(strlen(ce->entry) + strlen(#Tp) + 2); \
+ sprintf(buffer, "%s/%s", ce->entry, #Tp); \
+ Ce->mp.Tp = eina_mempool_add("one_big", buffer, NULL, sizeof (Sz), Ce->count.Tp);
CONVERT_EMN(RECTANGLE, Edje_Part_Description_Common, ce);
CONVERT_EMN(TEXT, Edje_Part_Description_Text, ce);
int id = -1, size = 0;
Eina_List *l;
char buf[256];
+ char *buffer;
void *data;
ce = eina_hash_find(edf->collection, coll);
id = ce->id;
if (id < 0) return NULL;
-#define INIT_EMP(Tp, Sz, Ce) \
- Ce->mp.Tp = eina_mempool_add("one_big", #Tp, NULL, sizeof (Sz), Ce->count.Tp); \
+#define INIT_EMP(Tp, Sz, Ce) \
+ buffer = alloca(strlen(ce->entry) + strlen(#Tp) + 2); \
+ sprintf(buffer, "%s/%s", ce->entry, #Tp); \
+ Ce->mp.Tp = eina_mempool_add("one_big", buffer, NULL, sizeof (Sz), Ce->count.Tp); \
_emp_##Tp = Ce->mp.Tp;
INIT_EMP(RECTANGLE, Edje_Part_Description_Common, ce);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "entry", entry, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "id", id, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.RECTANGLE", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXT", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.IMAGE", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.SWALLOW", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXTBLOCK", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.GROUP", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.BOX", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TABLE", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.EXTERNAL", count.RECTANGLE, EET_T_INT);
- EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.part", count.RECTANGLE, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXT", count.TEXT, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.IMAGE", count.IMAGE, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.SWALLOW", count.SWALLOW, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TEXTBLOCK", count.TEXTBLOCK, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.GROUP", count.GROUP, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.BOX", count.BOX, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.TABLE", count.TABLE, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.EXTERNAL", count.EXTERNAL, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.part", count.part, EET_T_INT);
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Style_Tag);
_edje_edd_edje_style_tag =
free(edf->image_dir);
}
+ if (edf->external_dir)
+ {
+ if (edf->external_dir->entries) free(edf->external_dir->entries);
+ free(edf->external_dir);
+ }
+
EINA_LIST_FREE(edf->color_classes, ecc)
{
if (edf->free_strings && ecc->name) eina_stringshare_del(ecc->name);
free(ec->parts);
ec->parts = NULL;
- if (ec->data) eina_hash_free(ec->data);
+ if (ec->data)
+ {
+ Eina_Iterator *it;
+ Edje_String *es;
+
+ it = eina_hash_iterator_data_new(ec->data);
+ EINA_ITERATOR_FOREACH(it, es)
+ free(es);
+ eina_iterator_free(it);
+
+ eina_hash_free(ec->data);
+ }
#ifdef EDJE_PROGRAM_CACHE
if (ec->prog_cache.no_matches) eina_hash_free(ec->prog_cache.no_matches);
if (ec->prog_cache.matches)