From 46cce7eabba0004b3488475814975ddd393caa17 Mon Sep 17 00:00:00 2001 From: cedric Date: Mon, 6 Jun 2011 17:29:07 +0000 Subject: [PATCH] edje: set parent earlier. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@59996 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/edje_load.c | 8 +++----- src/lib/edje_private.h | 2 +- src/lib/edje_smart.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/lib/edje_load.c b/src/lib/edje_load.c index 898ee7e..9aeee1c 100644 --- a/src/lib/edje_load.c +++ b/src/lib/edje_load.c @@ -255,7 +255,7 @@ _edje_programs_patterns_init(Edje *ed) } int -_edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Eina_List *group_path) +_edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, const char *parent, Eina_List *group_path) { Edje *ed; unsigned int n; @@ -283,6 +283,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g if (ed->group) eina_stringshare_del(ed->group); ed->path = eina_stringshare_add(file); ed->group = eina_stringshare_add(group); + ed->parent = eina_stringshare_add(parent); ed->load_error = EDJE_LOAD_ERROR_NONE; _edje_file_add(ed); @@ -666,7 +667,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g { Eina_List *l; Evas_Object *child_obj; - Edje *child_ed; const char *group_path_entry = eina_stringshare_add(source); const char *data; @@ -704,7 +704,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g _edje_real_part_swallow(rp, child_obj); } - if (!_edje_object_file_set_internal(child_obj, file, source, group_path)) + if (!_edje_object_file_set_internal(child_obj, file, source, rp->part->name, group_path)) { _edje_thaw(ed); _edje_unblock(ed); @@ -724,8 +724,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g evas_event_thaw_eval(tev); return 0; } - child_ed = _edje_fetch(child_obj); - child_ed->parent = eina_stringshare_add(rp->part->name); group_path = eina_list_remove(group_path, group_path_entry); eina_stringshare_del(group_path_entry); diff --git a/src/lib/edje_private.h b/src/lib/edje_private.h index 65c52e7..77381e2 100644 --- a/src/lib/edje_private.h +++ b/src/lib/edje_private.h @@ -1481,7 +1481,7 @@ void _edje_callbacks_focus_del(Evas_Object *obj, Edje *ed); void _edje_edd_init(void); void _edje_edd_shutdown(void); -int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Eina_List *group_path); +int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, const char *parent, Eina_List *group_path); void _edje_file_add(Edje *ed); void _edje_file_del(Edje *ed); diff --git a/src/lib/edje_smart.c b/src/lib/edje_smart.c index e208dd2..2b847e2 100644 --- a/src/lib/edje_smart.c +++ b/src/lib/edje_smart.c @@ -290,5 +290,5 @@ _edje_smart_calculate(Evas_Object *obj) static Eina_Bool _edje_smart_file_set(Evas_Object *obj, const char *file, const char *group) { - return _edje_object_file_set_internal(obj, file, group, NULL); + return _edje_object_file_set_internal(obj, file, group, NULL, NULL); } -- 2.7.4