forked from enlightenment/efl
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
This commit is contained in:
parent
866c5b7a98
commit
3d2be98980
|
@ -52,17 +52,6 @@ _datetime_resize_cb(void *data, Evas *e __UNUSED__,Evas_Object *obj __UNUSED__,
|
|||
evas_object_hide(ctx_mod->ctxpopup);
|
||||
}
|
||||
|
||||
static void
|
||||
_ctxpopup_parent_resize_cb(void *data, Evas *e __UNUSED__,Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
{
|
||||
Ctxpopup_Module_Data *ctx_mod;
|
||||
|
||||
ctx_mod = (Ctxpopup_Module_Data *)data;
|
||||
if (!ctx_mod) return;
|
||||
elm_ctxpopup_hover_parent_set(ctx_mod->ctxpopup, elm_widget_top_get(ctx_mod->mod_data.base));
|
||||
}
|
||||
|
||||
static void
|
||||
_datetime_move_cb(void *data, Evas *e __UNUSED__,Evas_Object *obj __UNUSED__,
|
||||
void *event_info __UNUSED__)
|
||||
|
@ -288,8 +277,6 @@ obj_hook(Evas_Object *obj)
|
|||
_datetime_resize_cb, ctx_mod);
|
||||
evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,
|
||||
_datetime_move_cb, ctx_mod);
|
||||
evas_object_event_callback_add(elm_widget_top_get(obj), EVAS_CALLBACK_RESIZE,
|
||||
_ctxpopup_parent_resize_cb, ctx_mod);
|
||||
|
||||
return ((Elm_Datetime_Module_Data*)ctx_mod);
|
||||
}
|
||||
|
@ -302,9 +289,6 @@ obj_unhook(Elm_Datetime_Module_Data *module_data)
|
|||
ctx_mod = (Ctxpopup_Module_Data *)module_data;
|
||||
if (!ctx_mod) return;
|
||||
|
||||
evas_object_event_callback_del_full(elm_widget_top_get(module_data->base),
|
||||
EVAS_CALLBACK_RESIZE,
|
||||
_ctxpopup_parent_resize_cb, ctx_mod);
|
||||
if (ctx_mod->ctxpopup)
|
||||
evas_object_del(ctx_mod->ctxpopup);
|
||||
|
||||
|
|
Loading…
Reference in New Issue