summaryrefslogtreecommitdiff
path: root/src/modules/datetime_input_ctxpopup
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-06-20 06:10:31 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-06-20 06:10:31 +0000
commit8a707341e1373eba55a7725500026a30bf2d8842 (patch)
tree282072a278cf0de83f0dc054a7590179f4e322ef /src/modules/datetime_input_ctxpopup
parent8ed5ee747435908753c8082796a223f81dd8bf06 (diff)
Elm:
The datetime module has unnecessary lines. The datetime resets ctxpopup parent in ctxpopup parent resize callback. But ctxpopup has its own callback for the parent resize. In this callback, ctxpopup hides itself. then, ctxpopup recalculates its parent size when ctxpopup shows itself. So the parent resize callback in the datetime is not necessary. Then, please review the patch and give some feedbacks. Thanks. Patch by Shinwoo Kim. SVN revision: 72518
Diffstat (limited to 'src/modules/datetime_input_ctxpopup')
-rw-r--r--src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
index 27f5c4b6d..59b42a35f 100644
--- a/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
+++ b/src/modules/datetime_input_ctxpopup/datetime_input_ctxpopup.c
@@ -53,17 +53,6 @@ _datetime_resize_cb(void *data, Evas *e __UNUSED__,Evas_Object *obj __UNUSED__,
53} 53}
54 54
55static void 55static void
56_ctxpopup_parent_resize_cb(void *data, Evas *e __UNUSED__,Evas_Object *obj __UNUSED__,
57 void *event_info __UNUSED__)
58{
59 Ctxpopup_Module_Data *ctx_mod;
60
61 ctx_mod = (Ctxpopup_Module_Data *)data;
62 if (!ctx_mod) return;
63 elm_ctxpopup_hover_parent_set(ctx_mod->ctxpopup, elm_widget_top_get(ctx_mod->mod_data.base));
64}
65
66static void
67_datetime_move_cb(void *data, Evas *e __UNUSED__,Evas_Object *obj __UNUSED__, 56_datetime_move_cb(void *data, Evas *e __UNUSED__,Evas_Object *obj __UNUSED__,
68 void *event_info __UNUSED__) 57 void *event_info __UNUSED__)
69{ 58{
@@ -288,8 +277,6 @@ obj_hook(Evas_Object *obj)
288 _datetime_resize_cb, ctx_mod); 277 _datetime_resize_cb, ctx_mod);
289 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE, 278 evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,
290 _datetime_move_cb, ctx_mod); 279 _datetime_move_cb, ctx_mod);
291 evas_object_event_callback_add(elm_widget_top_get(obj), EVAS_CALLBACK_RESIZE,
292 _ctxpopup_parent_resize_cb, ctx_mod);
293 280
294 return ((Elm_Datetime_Module_Data*)ctx_mod); 281 return ((Elm_Datetime_Module_Data*)ctx_mod);
295} 282}
@@ -302,9 +289,6 @@ obj_unhook(Elm_Datetime_Module_Data *module_data)
302 ctx_mod = (Ctxpopup_Module_Data *)module_data; 289 ctx_mod = (Ctxpopup_Module_Data *)module_data;
303 if (!ctx_mod) return; 290 if (!ctx_mod) return;
304 291
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);
308 if (ctx_mod->ctxpopup) 292 if (ctx_mod->ctxpopup)
309 evas_object_del(ctx_mod->ctxpopup); 293 evas_object_del(ctx_mod->ctxpopup);
310 294