summaryrefslogtreecommitdiff
path: root/src/modules/datetime_input_ctxpopup
diff options
context:
space:
mode:
authorWooHyun Jung <woohyun0705@gmail.com>2012-06-12 01:52:31 +0000
committerWooHyun Jung <woohyun0705@gmail.com>2012-06-12 01:52:31 +0000
commit038aea15e4d7cb31d8df8b1d95fa96a5ce35d90e (patch)
treed8fe742f5f031d3e02ccf63e60d8747acfb9f941 /src/modules/datetime_input_ctxpopup
parent6979e6af9bcd8639c1a79beb0011700f41cc4bca (diff)
elementary/module : Modified 71929 with better way. Thanks ShinWoo.
But I recommend to remove all callbacks with elm_widget_top_get(obj). SVN revision: 71975
Diffstat (limited to 'src/modules/datetime_input_ctxpopup')
-rw-r--r--src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
index bdbcc83b3..27f5c4b6d 100644
--- a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
+++ b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
@@ -218,14 +218,6 @@ _field_clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
218 evas_object_show(ctx_mod->ctxpopup); 218 evas_object_show(ctx_mod->ctxpopup);
219} 219}
220 220
221static void
222_del_pre_hook(Evas_Object *obj)
223{
224 evas_object_event_callback_del(elm_widget_top_get(obj),
225 EVAS_CALLBACK_RESIZE,
226 _ctxpopup_parent_resize_cb);
227}
228
229// module fucns for the specific module type 221// module fucns for the specific module type
230EAPI void 222EAPI void
231field_value_display(Elm_Datetime_Module_Data *module_data, Evas_Object *obj) 223field_value_display(Elm_Datetime_Module_Data *module_data, Evas_Object *obj)
@@ -291,7 +283,6 @@ obj_hook(Evas_Object *obj)
291 evas_object_size_hint_align_set(ctx_mod->ctxpopup, EVAS_HINT_FILL, 0.5); 283 evas_object_size_hint_align_set(ctx_mod->ctxpopup, EVAS_HINT_FILL, 0.5);
292 evas_object_smart_callback_add(ctx_mod->ctxpopup, "dismissed", 284 evas_object_smart_callback_add(ctx_mod->ctxpopup, "dismissed",
293 _ctxpopup_dismissed_cb, ctx_mod); 285 _ctxpopup_dismissed_cb, ctx_mod);
294 elm_widget_del_pre_hook_set(obj, _del_pre_hook);
295 286
296 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, 287 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
297 _datetime_resize_cb, ctx_mod); 288 _datetime_resize_cb, ctx_mod);
@@ -311,6 +302,9 @@ obj_unhook(Elm_Datetime_Module_Data *module_data)
311 ctx_mod = (Ctxpopup_Module_Data *)module_data; 302 ctx_mod = (Ctxpopup_Module_Data *)module_data;
312 if (!ctx_mod) return; 303 if (!ctx_mod) return;
313 304
305 evas_object_event_callback_del_full(elm_widget_top_get(module_data->base),
306 EVAS_CALLBACK_RESIZE,
307 _ctxpopup_parent_resize_cb, ctx_mod);
314 if (ctx_mod->ctxpopup) 308 if (ctx_mod->ctxpopup)
315 evas_object_del(ctx_mod->ctxpopup); 309 evas_object_del(ctx_mod->ctxpopup);
316 310