From beba26d9c88541a35db802017aecfd55d621bcaa Mon Sep 17 00:00:00 2001 From: tiago Date: Wed, 11 Aug 2010 12:51:41 +0000 Subject: [PATCH] Code generation for data block git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@50995 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_edit.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 0581621..999e94c 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -5904,25 +5904,26 @@ _edje_generate_source_of_group(Edje *ed, Edje_Part_Collection_Directory_Entry *p BUF_APPENDF(I2"max: %d %d;\n", w, h); /* Data */ - if ((ll = edje_edit_group_data_list_get(obj))) + if (pce->ref->data) { - BUF_APPEND(I2"data {\n"); + Eina_Iterator *it; + Eina_Hash_Tuple *tuple; + BUF_APPEND(I2"data {\n"); - EINA_LIST_FOREACH(ll, l, data) - { - const char *value = edje_edit_group_data_value_get(obj, data); - ret &= !!value; - BUF_APPENDF(I3"item: \"%s\" \"%s\";\n", data, value); - } + it = eina_hash_iterator_tuple_new(pce->ref->data); - BUF_APPEND(I2"}\n\n"); - edje_edit_string_list_free(ll); - } + if (!it) + { + ERR("Generating EDC for Group[%s] data.", group); + return EINA_FALSE; + } - if (!ret) - { - ERR("Generating EDC for Group[%s] data.", group); - return EINA_FALSE; + EINA_ITERATOR_FOREACH(it, tuple) + BUF_APPENDF(I3"item: \"%s\" \"%s\";\n", (char *)tuple->key, + (char *)tuple->data); + + eina_iterator_free(it); + BUF_APPEND(I2"}\n\n"); } //TODO Support script -- 2.7.4