From: cedric Date: Wed, 25 Jan 2012 09:53:38 +0000 (+0000) Subject: edje: cast the right type. X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~413 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=038fcbd61fa238ba8a34a70d5413aa736818892a;p=profile%2Fivi%2Fedje.git edje: cast the right type. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@67527 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/edje_cc_handlers.c b/src/bin/edje_cc_handlers.c index c853053..9abd39f 100644 --- a/src/bin/edje_cc_handlers.c +++ b/src/bin/edje_cc_handlers.c @@ -833,6 +833,20 @@ _edje_part_description_fill(Edje_Part_Description_Spec_Fill *fill) fill->type = EDJE_FILL_TYPE_SCALE; } +static void +_edje_part_description_image_remove(Edje_Part_Description_Image *ed) +{ + unsigned int j; + + if (!ed) return; + + data_queue_image_remove(&(ed->image.id), &(ed->image.set)); + + for (j = 0; j < ed->image.tweens_count; ++j) + data_queue_image_remove(&(ed->image.tweens[j]->id), + &(ed->image.tweens[j]->set)); +} + static Edje_Part_Description_Common * _edje_part_description_alloc(unsigned char type, const char *collection, const char *part) { @@ -2173,13 +2187,14 @@ st_collections_group_name(void) if (pc->parts[i]->type != EDJE_PART_TYPE_IMAGE) continue ; - ed = (Edje_Part_Description_Image*) &pc->parts[i]; - - data_queue_image_remove(&(ed->image.id), &(ed->image.set)); + ed = (Edje_Part_Description_Image*) pc->parts[i]->default_desc; + _edje_part_description_image_remove(ed); - for (j = 0; j < ed->image.tweens_count; ++j) - data_queue_image_remove(&(ed->image.tweens[ed->image.tweens_count - 1]->id), - &(ed->image.tweens[ed->image.tweens_count - 1]->set)); + for (j = 0; j < pc->parts[i]->other.desc_count; j++) + { + ed = (Edje_Part_Description_Image*) pc->parts[i]->other.desc[j]; + _edje_part_description_image_remove(ed); + } } EINA_LIST_FOREACH(edje_collections, l, pc)