summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorMykyta Biliavskyi <m.biliavskyi@samsung.com>2017-01-06 10:30:19 +0200
committerMykyta Biliavskyi <m.biliavskyi@samsung.com>2017-01-06 10:36:57 +0200
commita3426a38acbd4f81e9a56a5a74731e4172e00e7e (patch)
treea1c67f7f1d97203531d1b1c4d780e07d37743055 /src/lib/edje
parent8ee0c30eb0950b0e142d77f4cb0da745085b2054 (diff)
edje_edit: fix set the images set as image.normal value.
Added ability to set the images set by name into image part image.normal attribute. Add search the images set id for case when the image id doesn't find in image entries list. @fix
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_edit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 2be9842afe..85aec1308b 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -10251,6 +10251,7 @@ edje_edit_state_image_set(Evas_Object *obj, const char *part, const char *state,
10251{ 10251{
10252 Edje_Part_Description_Image *img; 10252 Edje_Part_Description_Image *img;
10253 int id; 10253 int id;
10254 Eina_Bool image_set = EINA_FALSE;
10254 10255
10255 if ((!obj) || (!part) || (!state) || (!image)) 10256 if ((!obj) || (!part) || (!state) || (!image))
10256 return EINA_FALSE; 10257 return EINA_FALSE;
@@ -10261,12 +10262,19 @@ edje_edit_state_image_set(Evas_Object *obj, const char *part, const char *state,
10261 if (rp->part->type != EDJE_PART_TYPE_IMAGE) 10262 if (rp->part->type != EDJE_PART_TYPE_IMAGE)
10262 return EINA_FALSE; 10263 return EINA_FALSE;
10263 10264
10264 id = _edje_image_id_find(eed, image);
10265 10265
10266 img = (Edje_Part_Description_Image *)pd; 10266 img = (Edje_Part_Description_Image *)pd;
10267 10267
10268 id = _edje_image_id_find(eed, image);
10269 if (id <= -1)
10270 {
10271 id = _edje_set_id_find(eed, image);
10272 image_set = EINA_TRUE;
10273 }
10274
10268 if (id > -1) img->image.id = id; 10275 if (id > -1) img->image.id = id;
10269 else return EINA_FALSE; 10276 else return EINA_FALSE;
10277 img->image.set = image_set;
10270 10278
10271 edje_object_calc_force(obj); 10279 edje_object_calc_force(obj);
10272 return EINA_TRUE; 10280 return EINA_TRUE;