aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/edje
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-06-21 19:15:47 +0900
committerHermet Park <hermetpark@gmail.com>2018-06-21 19:33:41 +0900
commit2663dceaf11b6a51b7fec6dd3f368a018b6975e9 (patch)
treeba713e3e5aff4b02a3269e2d6bfb03ca30877e80 /src/bin/edje
parentRevert "edje: fix a regression error by 7fb47fc064b8f429242b4d5cdf57071475087... (diff)
downloadefl-2663dceaf11b6a51b7fec6dd3f368a018b6975e9.tar.gz
Revert "edje: code refactoring for readibility."
This reverts commit 7fb47fc064b8f429242b4d5cdf57071475087821. subsequential revert for previous one. 90a89d1ab2b5d23b29ad0f2680b77b5ba7f56b42.
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_cc_handlers.c24
-rw-r--r--src/bin/edje/edje_cc_out.c46
-rw-r--r--src/bin/edje/edje_cc_script.c2
-rw-r--r--src/bin/edje/edje_pick.c2
4 files changed, 37 insertions, 37 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 8f4a94ef8c..6d987edb8f 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -1589,7 +1589,7 @@ New_Object_Handler object_handlers[] =
{"collections.group.physics.world", NULL},
#endif
PROGRAM_OBJECTS("collections.group.parts.part.description")
- PROGRAM_OBJECTS("collections.group.parts.name")
+ PROGRAM_OBJECTS("collections.group.parts.part")
PROGRAM_OBJECTS("collections.group.parts")
PROGRAM_OBJECTS("collections.group")
};
@@ -4473,7 +4473,7 @@ _group_name(char *name)
goto double_named_group;
current_de->entry = name;
- current_pc->name = current_de->entry;
+ current_pc->part = current_de->entry;
older = eina_hash_find(edje_file->collection, current_de->entry);
if (older) eina_hash_del(edje_file->collection, current_de->entry, older);
@@ -4487,7 +4487,7 @@ _group_name(char *name)
pc = eina_list_nth(edje_collections, older->id);
INF("overriding alias ('%s' => '%s') by group '%s'",
- alias->entry, pc->name,
+ alias->entry, pc->part,
current_de->entry);
aliases = eina_list_remove_list(aliases, l);
free(alias);
@@ -5074,7 +5074,7 @@ st_collections_group_inherit(void)
{
free(parent_name);
pc2 = eina_list_nth(edje_collections, alias->id);
- parent_name = strdup(pc2->name);
+ parent_name = strdup(pc2->part);
break;
}
}
@@ -5083,7 +5083,7 @@ st_collections_group_inherit(void)
{
EINA_LIST_FOREACH(edje_collections, l, pc2)
{
- if (!strcmp(parent_name, pc2->name))
+ if (!strcmp(parent_name, pc2->part))
break;
}
}
@@ -5293,7 +5293,7 @@ st_collections_group_inherit(void)
Code_Program *cp, *cp2;
Edje_Part_Collection_Directory_Entry *de;
- de = eina_hash_find(edje_file->collection, pc2->name);
+ de = eina_hash_find(edje_file->collection, pc2->part);
cd2 = eina_list_nth(codes, de->id);
cd = eina_list_data_get(eina_list_last(codes));
@@ -5306,7 +5306,7 @@ st_collections_group_inherit(void)
if (cd->shared)
{
WRN("%s:%i. script block in group \"%s\" will be overwritten by inheriting "
- "from group \"%s\".", file_in, line - 1, pc->name, pc2->name);
+ "from group \"%s\".", file_in, line - 1, pc->part, pc2->part);
free(cd->shared);
}
if (cd->original)
@@ -5417,7 +5417,7 @@ st_collections_group_alias(void)
pc = eina_list_nth(edje_collections, tmp->id);
INF("overriding alias ('%s' => '%s') to ('%s' => '%s')",
- tmp->entry, pc->name,
+ tmp->entry, pc->part,
alias->entry, current_de->entry);
aliases = eina_list_remove_list(aliases, l);
free(tmp);
@@ -6487,7 +6487,7 @@ _part_type_set(unsigned int type)
dummy->type = ep->type + 2;
if (previous)
{
- new = _edje_part_description_alloc(type, pc->name, ep->name);
+ new = _edje_part_description_alloc(type, pc->part, ep->name);
eina_hash_add(desc_hash, &new, ep);
eina_hash_set(desc_hash, &previous, dummy);
parent_desc = previous;
@@ -6504,7 +6504,7 @@ _part_type_set(unsigned int type)
for (i = 0; i < ep->other.desc_count; i++)
{
previous = ep->other.desc[i];
- new = _edje_part_description_alloc(type, pc->name, ep->name);
+ new = _edje_part_description_alloc(type, pc->part, ep->name);
eina_hash_add(desc_hash, &new, ep);
eina_hash_set(desc_hash, &previous, dummy);
parent_desc = previous;
@@ -8513,7 +8513,7 @@ ob_collections_group_parts_part_description(void)
pc = eina_list_data_get(eina_list_last(edje_collections));
ep = current_part;
- ed = _edje_part_description_alloc(ep->type, pc->name, ep->name);
+ ed = _edje_part_description_alloc(ep->type, pc->part, ep->name);
eina_hash_add(desc_hash, &ed, ep);
ed->rel1.id_x = -1;
@@ -9599,7 +9599,7 @@ st_collections_group_parts_part_description_color3(void)
&& current_part->type != EDJE_PART_TYPE_TEXTBLOCK)
{
ERR("Setting color3 in part %s from %s not of type TEXT or TEXTBLOCK.",
- current_part->name, pc->name);
+ current_part->name, pc->part);
exit(-1);
}
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 32dc3cfcc6..4d21668368 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -415,7 +415,7 @@ check_image_part_desc(Edje_Part_Collection *pc, Edje_Part *ep,
if (epd->image.id == -1 && epd->common.visible)
WRN("Collection %s(%i): image attributes missing for "
"part \"%s\", description \"%s\" %f",
- pc->name, pc->id, ep->name, epd->common.state.name, epd->common.state.value);
+ pc->part, pc->id, ep->name, epd->common.state.name, epd->common.state.value);
for (i = 0; i < epd->image.tweens_count; ++i)
{
@@ -434,7 +434,7 @@ _source_group_find(const char *source)
if (!source) return NULL;
EINA_LIST_FOREACH(edje_collections, l, pc2)
{
- if (!strcmp(pc2->name, source))
+ if (!strcmp(pc2->part, source))
return pc2;
}
return NULL;
@@ -481,9 +481,9 @@ check_text_part_desc(Edje_Part_Collection *pc, Edje_Part *ep,
return;
}
- error_and_abort(ef, "Group \"%s\" Part \"%s\" Description \"%s\" [%.3f]: "
+ error_and_abort(ef, "Collection \"%s\" Part \"%s\" Description \"%s\" [%.3f]: "
"text.source point to a non TEXT part \"%s\"!",
- pc->name, ep->name, epd->common.state.name,
+ pc->part, ep->name, epd->common.state.name,
epd->common.state.value, pc->parts[epd->text.id_source]->name);
}
@@ -501,9 +501,9 @@ check_text_part_desc(Edje_Part_Collection *pc, Edje_Part *ep,
return;
}
- error_and_abort(ef, "Group \"%s\" Part \"%s\" Description \"%s\" [%.3f]: "
+ error_and_abort(ef, "Collection \"%s\" Part \"%s\" Description \"%s\" [%.3f]: "
"text.text_source point to a non TEXT part \"%s\"!",
- pc->name, ep->name, epd->common.state.name,
+ pc->part, ep->name, epd->common.state.name,
epd->common.state.value, pc->parts[epd->text.id_text_source]->name);
}
}
@@ -525,7 +525,7 @@ check_source_links(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef, Eina_L
EINA_LIST_FOREACH(edje_collections, l, pc_source)
{
/* Find sourced group */
- if (ep->source && pc_source->name && strcmp(ep->source, pc_source->name) == 0)
+ if (ep->source && pc_source->part && strcmp(ep->source, pc_source->part) == 0)
{
/* Go through every part to find parts with type GROUP */
for (i = 0; i < pc_source->parts_count; ++i)
@@ -542,7 +542,7 @@ check_source_links(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef, Eina_L
"already included inside "
"part '%s' of group '%s'",
data, pc_source->parts[i]->name,
- pc->name);
+ pc->part);
}
}
group_path = eina_list_append(group_path, ep->source);
@@ -610,7 +610,7 @@ _part_namespace_verify(Edje_Part_Collection *pc, Edje_Part *ep, Eet_File *ef EIN
/* this is from a group used as a source, either GROUP or TEXTBLOCK
* namespacing not required
*/
- if (eina_hash_find(groups_sourced, pc->name)) return;
+ if (eina_hash_find(groups_sourced, pc->part)) return;
de = eina_hash_find(edje_collections_lookup, &pc->id);
@@ -697,7 +697,7 @@ _program_signal_namespace_verify(Edje_Part_Collection *pc, Eet_File *ef EINA_UNU
/* this is from a group used as a source, either GROUP or TEXTBLOCK
* namespacing not required
*/
- if (eina_hash_find(groups_sourced, pc->name)) return;
+ if (eina_hash_find(groups_sourced, pc->part)) return;
/* ignore propagation to GROUP parts */
if (strchr(sig, ':')) return;
@@ -2936,7 +2936,7 @@ reorder_parts(void)
ep = (Edje_Part_Parser *)pc->parts[i];
if (ep->reorder.insert_before && ep->reorder.insert_after)
error_and_abort(NULL, "In group \"%s\": Unable to use together insert_before and insert_after in part \"%s\".",
- pc->name, pc->parts[i]->name);
+ pc->part, pc->parts[i]->name);
if (ep->reorder.done)
{
@@ -2953,10 +2953,10 @@ reorder_parts(void)
ep2 = (Edje_Part_Parser *)pc->parts[j];
if (ep2->reorder.after)
error_and_abort(NULL, "In group \"%s\": The part \"%s\" is ambiguous ordered part.",
- pc->name, pc->parts[i]->name);
+ pc->part, pc->parts[i]->name);
if (ep2->reorder.linked_prev)
error_and_abort(NULL, "In group \"%s\": Unable to insert two or more parts in same part \"%s\".",
- pc->name, pc->parts[j]->name);
+ pc->part, pc->parts[j]->name);
/* Need it to be able to insert an element before the first */
if (j == 0) k = 0;
else k = j - 1;
@@ -2976,10 +2976,10 @@ reorder_parts(void)
ep2 = (Edje_Part_Parser *)pc->parts[j];
if (ep2->reorder.before)
error_and_abort(NULL, "In group \"%s\": The part \"%s\" is ambiguous ordered part.",
- pc->name, pc->parts[i]->name);
+ pc->part, pc->parts[i]->name);
if (ep2->reorder.linked_next)
error_and_abort(NULL, "In group \"%s\": Unable to insert two or more parts in same part \"%s\".",
- pc->name, pc->parts[j]->name);
+ pc->part, pc->parts[j]->name);
k = j;
found = EINA_TRUE;
ep2->reorder.linked_next += ep->reorder.linked_next + 1;
@@ -2998,7 +2998,7 @@ reorder_parts(void)
if (((i > k) && ((i - ep->reorder.linked_prev) <= k))
|| ((i < k) && ((i + ep->reorder.linked_next) >= k)))
- error_and_abort(NULL, "In group \"%s\": The part order is wrong. It has circular dependency.", pc->name);
+ error_and_abort(NULL, "In group \"%s\": The part order is wrong. It has circular dependency.", pc->part);
amount = ep->reorder.linked_prev + ep->reorder.linked_next + 1;
linked = i - ep->reorder.linked_prev;
@@ -3042,10 +3042,10 @@ reorder_parts(void)
{
if (ep->reorder.insert_before)
error_and_abort(NULL, "In group \"%s\": Unable to find part \"%s\" for insert_before in part \"%s\".",
- pc->name, ep->reorder.insert_before, pc->parts[i]->name);
+ pc->part, ep->reorder.insert_before, pc->parts[i]->name);
else
error_and_abort(NULL, "In group \"%s\": Unable to find part \"%s\" for insert_after in part \"%s\".",
- pc->name, ep->reorder.insert_after, pc->parts[i]->name);
+ pc->part, ep->reorder.insert_after, pc->parts[i]->name);
}
}
}
@@ -3296,7 +3296,7 @@ copied_program_anonymous_lookup_delete(Edje_Part_Collection *pc, int *dest)
Edje_Part_Collection_Directory_Entry *de;
Eina_List *l2, *ll2;
- de = eina_hash_find(edje_file->collection, pl->pc->name);
+ de = eina_hash_find(edje_file->collection, pl->pc->part);
cd = eina_list_nth(codes, de->id);
EINA_LIST_FOREACH_SAFE(cd->programs, l2, ll2, cp)
@@ -3804,13 +3804,13 @@ data_process_lookups(void)
unsigned int id = 0;
unsigned int i;
- if (!pc->name)
+ if (!pc->part)
{
ERR("A collection without a name was detected, that's not allowed.");
exit(-1);
}
- find = eina_hash_find(edje_file->collection, pc->name);
+ find = eina_hash_find(edje_file->collection, pc->part);
if (find && find->id == pc->id)
{
if (((Edje_Part_Collection_Parser *)pc)->inherit_only)
@@ -3844,7 +3844,7 @@ data_process_lookups(void)
if (pc->id == alias->id)
alias->id = id;
- find = eina_hash_find(edje_file->collection, pc->name);
+ find = eina_hash_find(edje_file->collection, pc->part);
if (pc->id != find->id) find = NULL;
de = eina_hash_find(edje_collections_lookup, &pc->id);
@@ -3920,7 +3920,7 @@ data_process_lookups(void)
if ((i == part->key.pc->parts_count) && (!((Edje_Part_Collection_Parser *)part->key.pc)->inherit_only))
{
ERR("Unable to find part name \"%s\" needed in group '%s'.",
- alias, part->key.pc->name);
+ alias, part->key.pc->part);
exit(-1);
}
}
diff --git a/src/bin/edje/edje_cc_script.c b/src/bin/edje/edje_cc_script.c
index 35d4fe9072..2e52ac1c2f 100644
--- a/src/bin/edje/edje_cc_script.c
+++ b/src/bin/edje/edje_cc_script.c
@@ -347,7 +347,7 @@ _push_symbol(Eina_List **total, Code_Symbol *sym, Edje_Part_Collection *pc)
if (!strcmp(sym2->name, sym->name))
{
WRN("Symbols in group \"%s\" have same name \"%s\". Latter defined "
- "will shadow former one.", pc->name, sym->name);
+ "will shadow former one.", pc->part, sym->name);
list = eina_list_remove(list, sym2);
break;
}
diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c
index a4ec7b5cd0..2079d92cee 100644
--- a/src/bin/edje/edje_pick.c
+++ b/src/bin/edje/edje_pick.c
@@ -1589,7 +1589,7 @@ _edje_pick_collection_process(Edje_Part_Collection *edc, Edje_File *edf, Edje_Fi
/* Update all IDs, NAMES in current collection */
Edje_Part_Collection_Directory_Entry *ce;
- ce = eina_hash_find(o->collection, edc->name);
+ ce = eina_hash_find(o->collection, edc->part);
edc->id = ce->id;
_edje_pick_resources_process(edc, edf, o);