forked from enlightenment/efl
elementary : Removing duplicate codes when _content_unset.
SVN revision: 69894
This commit is contained in:
parent
a96e0201c4
commit
7b600cc59d
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue