forked from enlightenment/efl
elementary/mapbuf - reset the mapbuf correctly when the content is removed(unset)
When the content is removed(or unset) the mapbuf didn't clean up the some stuff such as removing event callback for the content. So the unset content would be tracked still by mapbuf dangling callbacks.
This commit is contained in:
parent
2ec0b6556f
commit
e520c4f519
|
@ -1747,3 +1747,8 @@
|
|||
2013-11-05 Amitesh Singh (_ami_)
|
||||
|
||||
* hoversel: Added focus support on hoversel items.
|
||||
|
||||
2013-11-22 ChunEon Park (Hermet)
|
||||
|
||||
* mapbuf: reset the mapbuf internals correctly when the content is
|
||||
removed(unset)
|
||||
|
|
|
@ -309,6 +309,7 @@ Fixes:
|
|||
* ctxpopup: fix elm_object_content_unset didn't unpack content from box
|
||||
* scroller : fix the scroller to locate the current page correctly in case that the scroller is suddenly resized and then the drag couldn't capture the page location.
|
||||
* scroller: don't focus region show if the scroller is disabled.
|
||||
* mapbuf: reset the mapbuf internal states correclty when the content is removed(unset)
|
||||
|
||||
Removals:
|
||||
|
||||
|
|
|
@ -55,6 +55,24 @@ _changed_size_hints_cb(void *data,
|
|||
_sizing_eval(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_mapbuf_content_unset(Elm_Mapbuf_Smart_Data *sd, Evas_Object *obj,
|
||||
Evas_Object *content)
|
||||
{
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
|
||||
evas_object_data_del(content, "_elm_leaveme");
|
||||
evas_object_smart_member_del(content);
|
||||
evas_object_clip_unset(content);
|
||||
evas_object_color_set(wd->resize_obj, 0, 0, 0, 0);
|
||||
evas_object_event_callback_del_full
|
||||
(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb,
|
||||
obj);
|
||||
sd->content = NULL;
|
||||
_sizing_eval(obj);
|
||||
ELM_SAFE_FREE(sd->idler, ecore_idler_del);
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_mapbuf_smart_sub_object_del(Eo *obj, void *_pd, va_list *list)
|
||||
{
|
||||
|
@ -68,17 +86,7 @@ _elm_mapbuf_smart_sub_object_del(Eo *obj, void *_pd, va_list *list)
|
|||
if (!int_ret) return;
|
||||
|
||||
if (sobj == sd->content)
|
||||
{
|
||||
evas_object_data_del(sobj, "_elm_leaveme");
|
||||
evas_object_smart_member_del(sobj);
|
||||
evas_object_clip_unset(sobj);
|
||||
evas_object_event_callback_del_full
|
||||
(sobj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb,
|
||||
obj);
|
||||
sd->content = NULL;
|
||||
_sizing_eval(obj);
|
||||
}
|
||||
|
||||
_elm_mapbuf_content_unset(sd, (Evas_Object *)obj, sobj);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
|
||||
|
@ -249,19 +257,14 @@ _elm_mapbuf_smart_content_unset(Eo *obj, void *_pd, va_list *list)
|
|||
if (ret) *ret = NULL;
|
||||
|
||||
Elm_Mapbuf_Smart_Data *sd = _pd;
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
|
||||
if (part && strcmp(part, "default")) return;
|
||||
if (!sd->content) return;
|
||||
|
||||
content = sd->content;
|
||||
elm_widget_sub_object_del(obj, content);
|
||||
evas_object_smart_member_del(content);
|
||||
evas_object_data_del(content, "_elm_leaveme");
|
||||
evas_object_color_set(wd->resize_obj, 0, 0, 0, 0);
|
||||
sd->content = NULL;
|
||||
_elm_mapbuf_content_unset(sd, obj, content);
|
||||
if (ret) *ret = content;
|
||||
ELM_SAFE_FREE(sd->idler, ecore_idler_del);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue