From: cedric Date: Mon, 6 Jun 2011 17:29:07 +0000 (+0000) Subject: edje: set parent earlier. X-Git-Tag: submit/trunk/20120815.180907~617 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b836fc5cd185e66917aec834c4d5cff107a8807e;p=profile%2Fivi%2Fedje.git edje: set parent earlier. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@59996 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- 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); }