elementary : Removing duplicate codes when _content_unset.
authorwoohyun <woohyun@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 3 Apr 2012 11:40:06 +0000 (11:40 +0000)
committerwoohyun <woohyun@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 3 Apr 2012 11:40:06 +0000 (11:40 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69894 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elc_dayselector.c
src/lib/elm_check.c
src/lib/elm_flip.c
src/lib/elm_frame.c
src/lib/elm_hover.c
src/lib/elm_mapbuf.c
src/lib/elm_notify.c

index 681eb6f..68f351b 100644 (file)
@@ -368,6 +368,7 @@ _content_unset_hook(Evas_Object *obj, const char *item)
           {
              content = VIEW(it);
              wd->items = eina_list_remove(wd->items, it);
+             elm_widget_sub_object_del(obj, VIEW(it));
              evas_object_smart_callback_del(VIEW(it), "changed", _item_clicked_cb);
              evas_object_event_callback_del(VIEW(it), EVAS_CALLBACK_DEL, _item_del_cb);
              edje_object_part_unswallow(wd->base, VIEW(it));
index 9349c04..e74447f 100644 (file)
@@ -283,11 +283,7 @@ _content_unset_hook(Evas_Object *obj, const char *part)
    if (!wd->icon) return NULL;
    Evas_Object *icon = wd->icon;
    elm_widget_sub_object_del(obj, wd->icon);
-   evas_object_event_callback_del_full(wd->icon,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-   edje_object_part_unswallow(wd->chk, wd->icon);
-   wd->icon = NULL;
+   edje_object_part_unswallow(wd->chk, icon);
    return icon;
 }
 
index 57ccf9b..48f6f17 100644 (file)
@@ -1625,11 +1625,7 @@ _content_front_unset(Evas_Object *obj)
    Evas_Object *content = wd->front.content;
    evas_object_clip_unset(content);
    elm_widget_sub_object_del(obj, content);
-   evas_object_event_callback_del_full(content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
    evas_object_smart_member_del(content);
-   wd->front.content = NULL;
    return content;
 }
 
@@ -1642,11 +1638,7 @@ _content_back_unset(Evas_Object *obj)
    Evas_Object *content = wd->back.content;
    evas_object_clip_unset(content);
    elm_widget_sub_object_del(obj, content);
-   evas_object_event_callback_del_full(content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
    evas_object_smart_member_del(content);
-   wd->back.content = NULL;
    return content;
 }
 
index 2f8c093..61b323a 100644 (file)
@@ -188,11 +188,7 @@ _content_unset_hook(Evas_Object *obj, const char *part)
    if (!wd || !wd->content) return NULL;
    content = wd->content;
    elm_widget_sub_object_del(obj, wd->content);
-   evas_object_event_callback_del_full(wd->content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-   edje_object_part_unswallow(wd->frm, wd->content);
-   wd->content = NULL;
+   edje_object_part_unswallow(wd->frm, content);
    return content;
 }
 
index b3aea0d..ec92a9c 100644 (file)
@@ -681,16 +681,18 @@ static void
 _elm_hover_sub_obj_unparent(Evas_Object *obj)
 {
    Widget_Data *wd;
+   Evas_Object *smt_sub;
 
    wd = elm_widget_data_get(obj);
+   if (!wd) return;
 
+   smt_sub = wd->smt_sub;
    elm_widget_sub_object_del(obj, wd->smt_sub);
-   evas_object_event_callback_del_full(wd->smt_sub,
+   evas_object_event_callback_del_full(smt_sub,
                                        EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                        _elm_hover_sub_obj_placement_eval_cb,
                                        obj);
-   edje_object_part_unswallow(wd->cov, wd->smt_sub);
-   wd->smt_sub = NULL;
+   edje_object_part_unswallow(wd->cov, smt_sub);
 }
 
 EAPI const char *
@@ -841,9 +843,7 @@ _content_unset_hook(Evas_Object *obj, const char *swallow)
              if (!wd->subs[i].obj) return NULL;
              Evas_Object *content = wd->subs[i].obj;
              elm_widget_sub_object_del(obj, wd->subs[i].obj);
-             edje_object_part_unswallow(wd->cov, wd->subs[i].obj);
-             wd->subs[i].obj = NULL;
-
+             edje_object_part_unswallow(wd->cov, content);
              return content;
           }
      }
index d2fdce4..44b1f36 100644 (file)
@@ -198,14 +198,10 @@ _content_unset_hook(Evas_Object *obj, const char *part)
    if (!wd->content) return NULL;
    content = wd->content;
    elm_widget_sub_object_del(obj, content);
-   evas_object_event_callback_add(content,
-                                  EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                  _changed_size_hints, obj);
    evas_object_smart_member_del(content);
    evas_object_color_set(wd->clip, 0, 0, 0, 0);
    evas_object_clip_unset(content);
    evas_object_data_del(content, "_elm_leaveme");
-   wd->content = NULL;
    return content;
 }
 
index c27b17f..1b68390 100644 (file)
@@ -459,13 +459,7 @@ _content_unset_hook(Evas_Object *obj, const char *part)
    if (!wd->content) return NULL;
    content = wd->content;
    elm_widget_sub_object_del(obj, wd->content);
-   evas_object_event_callback_del_full(wd->content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-   evas_object_event_callback_del_full(wd->content, EVAS_CALLBACK_RESIZE,
-                                       _content_resize, obj);
-   edje_object_part_unswallow(wd->notify, wd->content);
-   wd->content = NULL;
+   edje_object_part_unswallow(wd->notify, content);
    return content;
 }