forked from enlightenment/efl
elementary/datetime : Ctxpopup should be hidden when datetime is
unfocused. SVN revision: 76489
This commit is contained in:
parent
30c479371f
commit
9fb785f10e
|
@ -79,6 +79,8 @@ _dt_mod_init()
|
|||
_elm_module_symbol_get(mod, "obj_hook");
|
||||
((Datetime_Mod_Api *)(mod->api))->obj_unhook =
|
||||
_elm_module_symbol_get(mod, "obj_unhook");
|
||||
((Datetime_Mod_Api *)(mod->api))->obj_hide =
|
||||
_elm_module_symbol_get(mod, "obj_hide");
|
||||
((Datetime_Mod_Api *)(mod->api))->field_create =
|
||||
_elm_module_symbol_get(mod, "field_create");
|
||||
((Datetime_Mod_Api *)(mod->api))->field_value_display =
|
||||
|
@ -429,6 +431,20 @@ printf("count = %d\n", eina_list_count(items));
|
|||
return ret;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elm_datetime_smart_on_focus(Evas_Object *obj)
|
||||
{
|
||||
if (!elm_widget_focus_get(obj))
|
||||
{
|
||||
ELM_DATETIME_DATA_GET(obj, sd);
|
||||
|
||||
if ((dt_mod) && (dt_mod->obj_hide))
|
||||
dt_mod->obj_hide(sd->mod_data);
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_datetime_smart_sizing_eval(Evas_Object *obj)
|
||||
{
|
||||
|
@ -801,6 +817,7 @@ _elm_datetime_smart_set_user(Elm_Datetime_Smart_Class *sc)
|
|||
|
||||
ELM_WIDGET_CLASS(sc)->translate = _elm_datetime_smart_translate;
|
||||
ELM_WIDGET_CLASS(sc)->focus_next = _elm_datetime_smart_focus_next;
|
||||
ELM_WIDGET_CLASS(sc)->on_focus = _elm_datetime_smart_on_focus;
|
||||
ELM_WIDGET_CLASS(sc)->theme = _elm_datetime_smart_theme;
|
||||
|
||||
ELM_LAYOUT_CLASS(sc)->sizing_eval = _elm_datetime_smart_sizing_eval;
|
||||
|
|
|
@ -146,6 +146,7 @@ struct _Datetime_Mod_Api
|
|||
{
|
||||
Elm_Datetime_Module_Data *(*obj_hook)(Evas_Object * obj);
|
||||
void (*obj_unhook)(Elm_Datetime_Module_Data *mdata);
|
||||
void (*obj_hide)(Elm_Datetime_Module_Data *mdata);
|
||||
Evas_Object *(*field_create)(Elm_Datetime_Module_Data * mdata,
|
||||
Elm_Datetime_Field_Type ftype);
|
||||
void (*field_value_display)(Elm_Datetime_Module_Data
|
||||
|
|
|
@ -352,6 +352,18 @@ obj_unhook(Elm_Datetime_Module_Data *module_data)
|
|||
}
|
||||
}
|
||||
|
||||
EAPI void
|
||||
obj_hide(Elm_Datetime_Module_Data *module_data)
|
||||
{
|
||||
Ctxpopup_Module_Data *ctx_mod;
|
||||
|
||||
ctx_mod = (Ctxpopup_Module_Data *)module_data;
|
||||
if (!ctx_mod) return;
|
||||
|
||||
if (ctx_mod->ctxpopup)
|
||||
evas_object_hide(ctx_mod->ctxpopup);
|
||||
}
|
||||
|
||||
// module api funcs needed
|
||||
EAPI int
|
||||
elm_modapi_init(void *m __UNUSED__)
|
||||
|
|
Loading…
Reference in New Issue