aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/edje
diff options
context:
space:
mode:
authorBluezery <ohpowel@gmail.com>2012-12-10 06:37:00 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-12-10 06:37:00 +0000
commit614904c073a92628164e4f9843737650460a9fc4 (patch)
treeb1df4cf96567d5cbf74da24e6c8eb7663602e023 /legacy/edje
parentwhitespace-- (diff)
downloadefl-614904c073a92628164e4f9843737650460a9fc4.tar.gz
From: Bluezery <ohpowel@gmail.com>
Subject: [E-devel] [Patch][edje] Prevent duplicated inherition of "after" When inherting group, "after" of "program" section is also inherited. But duplicated name of "after" can be also inherited. I think that multiple "after" can be used but duplicated should be not. because this seems to be useless. Is there case that duplicated after usage is used? Duplicated "target" is prevented. I just copy those codes. SVN revision: 80565
Diffstat (limited to 'legacy/edje')
-rw-r--r--legacy/edje/AUTHORS1
-rw-r--r--legacy/edje/ChangeLog5
-rw-r--r--legacy/edje/NEWS1
-rw-r--r--legacy/edje/src/bin/edje_cc_handlers.c25
4 files changed, 26 insertions, 6 deletions
diff --git a/legacy/edje/AUTHORS b/legacy/edje/AUTHORS
index 96cc8ece45..e4b6e31889 100644
--- a/legacy/edje/AUTHORS
+++ b/legacy/edje/AUTHORS
@@ -33,3 +33,4 @@ Flavio Ceolin <flavio.ceolin@profusion.mobi>
Daniel Zaoui <daniel.zaoui@yahoo.com>
Daniel Willmann <d.willmann@samsung.com>
Robert David <robert.david.public@gmail.com>
+Bluezery <ohpowel@gmail.com>
diff --git a/legacy/edje/ChangeLog b/legacy/edje/ChangeLog
index 84f10e7365..5a8c7e68fa 100644
--- a/legacy/edje/ChangeLog
+++ b/legacy/edje/ChangeLog
@@ -691,3 +691,8 @@
2012-12-05 Robert David
* Fix Solaris 11 build.
+
+2012-12-05 Tae-Hwan Kim (Bluezery)
+
+ * Fix inheriting gorups with programs that have after programs where
+ after programs are duplicated in the list.
diff --git a/legacy/edje/NEWS b/legacy/edje/NEWS
index 50ef92dfe1..07f3fa62ba 100644
--- a/legacy/edje/NEWS
+++ b/legacy/edje/NEWS
@@ -30,6 +30,7 @@ Fixes:
* fix edje_text_class_set to update the text classes correctly.
* fix to not update map uv for proxy
* fix build on Solaris 11.
+ * fix duplicate after programs in group inheritance.
Edje 1.7.0
diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c
index 2ab0acd719..8cb1da8bb9 100644
--- a/legacy/edje/src/bin/edje_cc_handlers.c
+++ b/legacy/edje/src/bin/edje_cc_handlers.c
@@ -1208,9 +1208,11 @@ _edje_program_copy(Edje_Program *ep, Edje_Program *ep2)
EINA_LIST_FOREACH(ep2->after, l, pa2)
{
- pa = mem_alloc(SZ(Edje_Program_After));
+ name = (char*) (pa2 + 1);
+ pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
ep->after = eina_list_append(ep->after, pa);
-
+ copy = (char*) (pa + 1);
+ memcpy(copy, name, strlen(name) + 1);
data_queue_copied_program_lookup(pc, &(pa2->id), &(pa->id));
}
@@ -8461,9 +8463,7 @@ st_collections_group_programs_program_target(void)
et = mem_alloc(SZ(Edje_Program_Target) + strlen(name) + 1);
ep->targets = eina_list_append(ep->targets, et);
copy = (char*) (et + 1);
-
memcpy(copy, name, strlen(name) + 1);
-
switch (ep->action)
{
case EDJE_ACTION_TYPE_ACTION_STOP:
@@ -8520,14 +8520,27 @@ st_collections_group_programs_program_after(void)
ep = current_program;
{
Edje_Program_After *pa;
+ Edje_Program_After *pa2;
+ Eina_List *l;
char *name;
+ char *copy;
name = parse_str(0);
- pa = mem_alloc(SZ(Edje_Program_After));
+ EINA_LIST_FOREACH(ep->after, l, pa2)
+ {
+ if (!strcmp(name, (char*) (pa2 + 1)))
+ {
+ free(name);
+ return;
+ }
+ }
+
+ pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
pa->id = -1;
ep->after = eina_list_append(ep->after, pa);
-
+ copy = (char*)(pa + 1);
+ memcpy(copy, name, strlen(name) + 1);
data_queue_program_lookup(pc, name, &(pa->id));
free(name);
}