elementary/datetime - [E-devel] [Patch][elementary] datetime module, delete callback

Dear all, hello.

There is a case, in the _ctxpopup_parent_resize_cb() is called even
though the datetime is removed.
It makes a crash, so the callback should be deleted before removing
datetime. That's it.

Sincerely,
Shinwoo Kim.

Submitted-By-Off: Kim Shinwoo <kimcinoo.efl@gmail.com>



SVN revision: 71929
This commit is contained in:
ChunEon Park 2012-06-11 07:09:48 +00:00
parent e34eed9c11
commit 8829228d22
1 changed files with 10 additions and 0 deletions

View File

@ -218,6 +218,14 @@ _field_clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
evas_object_show(ctx_mod->ctxpopup);
}
static void
_del_pre_hook(Evas_Object *obj)
{
evas_object_event_callback_del(elm_widget_top_get(obj),
EVAS_CALLBACK_RESIZE,
_ctxpopup_parent_resize_cb);
}
// module fucns for the specific module type
EAPI void
field_value_display(Elm_Datetime_Module_Data *module_data, Evas_Object *obj)
@ -283,6 +291,8 @@ obj_hook(Evas_Object *obj)
evas_object_size_hint_align_set(ctx_mod->ctxpopup, EVAS_HINT_FILL, 0.5);
evas_object_smart_callback_add(ctx_mod->ctxpopup, "dismissed",
_ctxpopup_dismissed_cb, ctx_mod);
elm_widget_del_pre_hook_set(obj, _del_pre_hook);
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
_datetime_resize_cb, ctx_mod);
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,