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
This commit is contained in:
Bluezery 2012-12-10 06:37:00 +00:00 committed by Carsten Haitzler
parent 40c28df2a2
commit 614904c073
4 changed files with 26 additions and 6 deletions

View File

@ -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>

View File

@ -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.

View File

@ -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

View File

@ -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);
}