summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVitalii Vorobiov <vi.vorobiov@samsung.com>2016-09-19 18:09:13 +0300
committerVitalii Vorobiov <vi.vorobiov@samsung.com>2016-09-19 18:15:18 +0300
commitb324b754f3390e2ba7404bcc27e59d43514c5a0f (patch)
tree459a4f1bdbe2fd4f2dc8c49e62192e9cf0a6d7b9 /src
parent541b72dcb2aa7a0a09c6b57603da2800d8caac01 (diff)
edje_edit: make tweens able to work with image sets
it's important because some tweens of loaded edje group might use image sets instead of images, so now making edje_edit API to work with them correctly @fix
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_edit.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 1ef59abbd9..edbe5cd37c 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -10263,6 +10263,7 @@ edje_edit_state_tween_add(Evas_Object *obj, const char *part, const char *state,
10263 Edje_Part_Image_Id **tmp; 10263 Edje_Part_Image_Id **tmp;
10264 Edje_Part_Image_Id *i; 10264 Edje_Part_Image_Id *i;
10265 int id; 10265 int id;
10266 Eina_Bool set = EINA_FALSE;
10266 10267
10267 GET_PD_OR_RETURN(EINA_FALSE); 10268 GET_PD_OR_RETURN(EINA_FALSE);
10268 10269
@@ -10270,12 +10271,19 @@ edje_edit_state_tween_add(Evas_Object *obj, const char *part, const char *state,
10270 return EINA_FALSE; 10271 return EINA_FALSE;
10271 10272
10272 id = _edje_image_id_find(eed, tween); 10273 id = _edje_image_id_find(eed, tween);
10274 if (id < EINA_FALSE)
10275 {
10276 set = EINA_TRUE;
10277 id = _edje_set_id_find(eed, tween);
10278 }
10279
10273 if (id < EINA_FALSE) return 0; 10280 if (id < EINA_FALSE) return 0;
10274 10281
10275 /* alloc Edje_Part_Image_Id */ 10282 /* alloc Edje_Part_Image_Id */
10276 i = _alloc(sizeof(Edje_Part_Image_Id)); 10283 i = _alloc(sizeof(Edje_Part_Image_Id));
10277 if (!i) return EINA_FALSE; 10284 if (!i) return EINA_FALSE;
10278 i->id = id; 10285 i->id = id;
10286 i->set = set;
10279 10287
10280 img = (Edje_Part_Description_Image *)pd; 10288 img = (Edje_Part_Description_Image *)pd;
10281 10289
@@ -10361,7 +10369,10 @@ edje_edit_state_tween_del(Evas_Object *obj, const char *part, const char *state,
10361 10369
10362 if (!img->image.tweens_count) return EINA_FALSE; 10370 if (!img->image.tweens_count) return EINA_FALSE;
10363 10371
10364 search = _edje_image_id_find(eed, tween); 10372 search = _edje_set_id_find(eed, tween);
10373 if (search < 0)
10374 search = _edje_image_id_find(eed, tween);
10375
10365 if (search < 0) return EINA_FALSE; 10376 if (search < 0) return EINA_FALSE;
10366 10377
10367 for (i = 0; i < img->image.tweens_count; ++i) 10378 for (i = 0; i < img->image.tweens_count; ++i)