forked from enlightenment/efl
elm_config: add helper method for copying widget key bindings
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11262
This commit is contained in:
parent
12880f053c
commit
1587d7fa1b
|
@ -2296,6 +2296,23 @@ _elm_key_bindings_update(Elm_Config *cfg, Elm_Config *syscfg EINA_UNUSED)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_key_bindings_copy_missing_bindings_of_widget(Elm_Config *cfg, Elm_Config *syscfg, const char *widget_name)
|
||||
{
|
||||
Elm_Config_Bindings_Widget *wd;
|
||||
Eina_List *n, *nnext;
|
||||
|
||||
EINA_LIST_FOREACH_SAFE(syscfg->bindings, n, nnext, wd)
|
||||
{
|
||||
if (eina_streq(widget_name, wd->name))
|
||||
{
|
||||
syscfg->bindings = eina_list_remove_list(syscfg->bindings, n);
|
||||
cfg->bindings = eina_list_append(cfg->bindings, wd);
|
||||
printf("Upgraded keybindings for %s!\n", wd->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_key_bindings_copy_missing_bindings(Elm_Config *cfg, Elm_Config *syscfg)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue