forked from enlightenment/enlightenment
remove e_bindings_key_up_event_find, rename other one to e_bindings_key_event_find
key up and key down are identical, having two functions here is misleading
This commit is contained in:
parent
e88823dd1b
commit
6e3b9763b0
|
@ -709,7 +709,7 @@ e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Even
|
|||
}
|
||||
|
||||
E_API E_Action *
|
||||
e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev, E_Binding_Key **bind_ret)
|
||||
e_bindings_key_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev, E_Binding_Key **bind_ret)
|
||||
{
|
||||
E_Binding_Modifier mod = 0;
|
||||
E_Binding_Key *binding;
|
||||
|
@ -735,31 +735,6 @@ e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev, E_Bi
|
|||
return NULL;
|
||||
}
|
||||
|
||||
E_API E_Action *
|
||||
e_bindings_key_up_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev)
|
||||
{
|
||||
E_Binding_Modifier mod = 0;
|
||||
E_Binding_Key *binding;
|
||||
Eina_List *l;
|
||||
|
||||
mod = _e_bindings_modifiers(ev->modifiers);
|
||||
EINA_LIST_FOREACH(key_bindings, l, binding)
|
||||
{
|
||||
if ((binding->key) && (!strcmp(binding->key, ev->key)) &&
|
||||
((binding->any_mod) || (binding->mod == mod)))
|
||||
{
|
||||
if (_e_bindings_context_match(binding->ctxt, ctxt))
|
||||
{
|
||||
E_Action *act;
|
||||
|
||||
act = e_action_find(binding->action);
|
||||
return act;
|
||||
}
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
E_API Eina_Bool
|
||||
e_bindings_key_allowed(const char *key)
|
||||
{
|
||||
|
|
|
@ -161,8 +161,7 @@ E_API void e_bindings_key_grab(E_Binding_Context ctxt, Ecore_X_Window win
|
|||
E_API void e_bindings_key_ungrab(E_Binding_Context ctxt, Ecore_X_Window win);
|
||||
E_API E_Action *e_bindings_key_down_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev);
|
||||
E_API E_Action *e_bindings_key_up_event_handle(E_Binding_Context ctxt, E_Object *obj, Ecore_Event_Key *ev);
|
||||
E_API E_Action *e_bindings_key_down_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev, E_Binding_Key **bind_ret);
|
||||
E_API E_Action *e_bindings_key_up_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev);
|
||||
E_API E_Action *e_bindings_key_event_find(E_Binding_Context ctxt, Ecore_Event_Key *ev, E_Binding_Key **bind_ret);
|
||||
|
||||
E_API Eina_Bool e_bindings_key_allowed(const char *key);
|
||||
|
||||
|
|
|
@ -390,7 +390,7 @@ _cb_key_down(EINA_UNUSED void *data, Ecore_Event_Key *ev)
|
|||
t = ecore_loop_time_get();
|
||||
if (t - show_time > 0.5)
|
||||
{
|
||||
act = e_bindings_key_down_event_find(E_BINDING_CONTEXT_ANY, ev, NULL);
|
||||
act = e_bindings_key_event_find(E_BINDING_CONTEXT_ANY, ev, NULL);
|
||||
if ((act) && (act->name))
|
||||
{
|
||||
if (!strcmp(act->name, "syscon"))
|
||||
|
|
Loading…
Reference in New Issue