summaryrefslogtreecommitdiff
path: root/src/edje_externals/elm.c
diff options
context:
space:
mode:
authorJee-Yong Um <conr2d@gmail.com>2016-02-05 08:13:11 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-02-05 08:45:19 +0100
commitfe4a4693bd1a15f0dca048e295fa68ca3d407175 (patch)
treef4c62a9e69d5d3d0e1c63bfa2d51d73a092ebd9f /src/edje_externals/elm.c
parentb7bdec74f753ffb6fc54328c6adf58401f562842 (diff)
elm: add Elm.Layout as edje externals' contents instead of Edje.Object
Summary: When edje external parts add its content, edje object is added, but it breaks elementary widget hierarchy. In Elementary, edje external can use Elm.Layout to add its content. Reviewers: cedric Reviewed By: cedric Subscribers: woohyun Differential Revision: https://phab.enlightenment.org/D3655 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/edje_externals/elm.c')
-rw-r--r--src/edje_externals/elm.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/edje_externals/elm.c b/src/edje_externals/elm.c
index 9f6b87284..744d2891c 100644
--- a/src/edje_externals/elm.c
+++ b/src/edje_externals/elm.c
@@ -270,8 +270,8 @@ external_common_icon_param_parse(Evas_Object **icon, Evas_Object *obj,
270} 270}
271 271
272Evas_Object * 272Evas_Object *
273external_common_param_edje_object_get(Evas_Object *obj, 273external_common_param_elm_layout_get(Evas_Object *obj,
274 const Edje_External_Param *p) 274 const Edje_External_Param *p)
275{ 275{
276 Evas_Object *edje, *parent_widget, *ret; 276 Evas_Object *edje, *parent_widget, *ret;
277 const char *file; 277 const char *file;
@@ -283,14 +283,18 @@ external_common_param_edje_object_get(Evas_Object *obj,
283 edje_object_file_get(edje, &file, NULL); 283 edje_object_file_get(edje, &file, NULL);
284 284
285 parent_widget = elm_widget_parent_widget_get(obj); 285 parent_widget = elm_widget_parent_widget_get(obj);
286 if (!parent_widget) 286 if (parent_widget)
287 parent_widget = edje; 287 {
288 288 ret = elm_layout_add(parent_widget);
289 ret = edje_object_add(evas_object_evas_get(parent_widget)); 289 if (elm_layout_file_set(ret, file, p->s))
290 290 return ret;
291 if (edje_object_file_set(ret, file, p->s)) 291 }
292 return ret; 292 else
293 293 {
294 ret = edje_object_add(evas_object_evas_get(edje));
295 if (edje_object_file_set(ret, file, p->s))
296 return ret;
297 }
294 evas_object_del(ret); 298 evas_object_del(ret);
295 return NULL; 299 return NULL;
296} 300}