edje: set parent earlier.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 6 Jun 2011 17:29:07 +0000 (17:29 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 6 Jun 2011 17:29:07 +0000 (17:29 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@59996 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_load.c
src/lib/edje_private.h
src/lib/edje_smart.c

index 898ee7e..9aeee1c 100644 (file)
@@ -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);
index 65c52e7..77381e2 100644 (file)
@@ -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);
index e208dd2..2b847e2 100644 (file)
@@ -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);
 }