summaryrefslogtreecommitdiff
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
parent40c28df2a23e625e902193264945a72b8433e93e (diff)
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>
33Daniel Zaoui <daniel.zaoui@yahoo.com> 33Daniel Zaoui <daniel.zaoui@yahoo.com>
34Daniel Willmann <d.willmann@samsung.com> 34Daniel Willmann <d.willmann@samsung.com>
35Robert David <robert.david.public@gmail.com> 35Robert David <robert.david.public@gmail.com>
36Bluezery <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 @@
6912012-12-05 Robert David 6912012-12-05 Robert David
692 692
693 * Fix Solaris 11 build. 693 * Fix Solaris 11 build.
694
6952012-12-05 Tae-Hwan Kim (Bluezery)
696
697 * Fix inheriting gorups with programs that have after programs where
698 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:
30 * fix edje_text_class_set to update the text classes correctly. 30 * fix edje_text_class_set to update the text classes correctly.
31 * fix to not update map uv for proxy 31 * fix to not update map uv for proxy
32 * fix build on Solaris 11. 32 * fix build on Solaris 11.
33 * fix duplicate after programs in group inheritance.
33 34
34Edje 1.7.0 35Edje 1.7.0
35 36
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)
1208 1208
1209 EINA_LIST_FOREACH(ep2->after, l, pa2) 1209 EINA_LIST_FOREACH(ep2->after, l, pa2)
1210 { 1210 {
1211 pa = mem_alloc(SZ(Edje_Program_After)); 1211 name = (char*) (pa2 + 1);
1212 pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
1212 ep->after = eina_list_append(ep->after, pa); 1213 ep->after = eina_list_append(ep->after, pa);
1213 1214 copy = (char*) (pa + 1);
1215 memcpy(copy, name, strlen(name) + 1);
1214 data_queue_copied_program_lookup(pc, &(pa2->id), &(pa->id)); 1216 data_queue_copied_program_lookup(pc, &(pa2->id), &(pa->id));
1215 } 1217 }
1216 1218
@@ -8461,9 +8463,7 @@ st_collections_group_programs_program_target(void)
8461 et = mem_alloc(SZ(Edje_Program_Target) + strlen(name) + 1); 8463 et = mem_alloc(SZ(Edje_Program_Target) + strlen(name) + 1);
8462 ep->targets = eina_list_append(ep->targets, et); 8464 ep->targets = eina_list_append(ep->targets, et);
8463 copy = (char*) (et + 1); 8465 copy = (char*) (et + 1);
8464
8465 memcpy(copy, name, strlen(name) + 1); 8466 memcpy(copy, name, strlen(name) + 1);
8466
8467 switch (ep->action) 8467 switch (ep->action)
8468 { 8468 {
8469 case EDJE_ACTION_TYPE_ACTION_STOP: 8469 case EDJE_ACTION_TYPE_ACTION_STOP:
@@ -8520,14 +8520,27 @@ st_collections_group_programs_program_after(void)
8520 ep = current_program; 8520 ep = current_program;
8521 { 8521 {
8522 Edje_Program_After *pa; 8522 Edje_Program_After *pa;
8523 Edje_Program_After *pa2;
8524 Eina_List *l;
8523 char *name; 8525 char *name;
8526 char *copy;
8524 8527
8525 name = parse_str(0); 8528 name = parse_str(0);
8526 8529
8527 pa = mem_alloc(SZ(Edje_Program_After)); 8530 EINA_LIST_FOREACH(ep->after, l, pa2)
8531 {
8532 if (!strcmp(name, (char*) (pa2 + 1)))
8533 {
8534 free(name);
8535 return;
8536 }
8537 }
8538
8539 pa = mem_alloc(SZ(Edje_Program_After) + strlen(name) + 1);
8528 pa->id = -1; 8540 pa->id = -1;
8529 ep->after = eina_list_append(ep->after, pa); 8541 ep->after = eina_list_append(ep->after, pa);
8530 8542 copy = (char*)(pa + 1);
8543 memcpy(copy, name, strlen(name) + 1);
8531 data_queue_program_lookup(pc, name, &(pa->id)); 8544 data_queue_program_lookup(pc, name, &(pa->id));
8532 free(name); 8545 free(name);
8533 } 8546 }