raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=2936834d3107a061b0a7bb3bf7ba19e3cea954a0
commit 2936834d3107a061b0a7bb3bf7ba19e3cea954a0 Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com> Date: Tue Jul 12 18:03:54 2016 +0900 elementary - fix focus switching again after break this fixes T4053 this was due to everal widgets haveing changed their class names and are using the new names for mapping to keybinding config that used legacy names to match binding to widget. --- src/lib/elementary/efl_ui_flip.c | 3 +-- src/lib/elementary/efl_ui_frame.c | 3 +-- src/lib/elementary/efl_ui_grid.c | 1 + src/lib/elementary/efl_ui_grid_static.c | 1 + src/lib/elementary/efl_ui_image.c | 2 +- src/lib/elementary/efl_ui_nstate.c | 4 ++-- src/lib/elementary/efl_ui_text.c | 5 ++--- src/lib/elementary/efl_ui_video.c | 5 ++--- src/lib/elementary/efl_ui_win.c | 5 ++--- src/lib/elementary/elm_config.c | 17 +++++++++++++++-- 10 files changed, 28 insertions(+), 18 deletions(-) diff --git a/src/lib/elementary/efl_ui_flip.c b/src/lib/elementary/efl_ui_flip.c index 78e6cb6..5454778 100644 --- a/src/lib/elementary/efl_ui_flip.c +++ b/src/lib/elementary/efl_ui_flip.c @@ -13,8 +13,7 @@ #include "elm_part_helper.h" #define MY_CLASS EFL_UI_FLIP_CLASS - -#define MY_CLASS_NAME "Efl_Ui_Flip" +#define MY_CLASS_NAME "Efl.Ui.Flip" #define MY_CLASS_NAME_LEGACY "elm_flip" static const char SIG_ANIMATE_BEGIN[] = "animate,begin"; diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c index 7d8a0bb..4ce64b0 100644 --- a/src/lib/elementary/efl_ui_frame.c +++ b/src/lib/elementary/efl_ui_frame.c @@ -11,8 +11,7 @@ #include "elm_widget_layout.h" #define MY_CLASS EFL_UI_FRAME_CLASS - -#define MY_CLASS_NAME "Efl_Ui_Frame" +#define MY_CLASS_NAME "Efl.Ui.Frame" #define MY_CLASS_NAME_LEGACY "elm_frame" static const char SIG_CLICKED[] = "clicked"; diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index ffe9997..a4b6f5b 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -4,6 +4,7 @@ #define MY_CLASS EFL_UI_GRID_CLASS #define MY_CLASS_NAME "Efl.Ui.Grid" +#define MY_CLASS_NAME_LEGACY "elm_grid" typedef struct _Custom_Table_Data Custom_Table_Data; diff --git a/src/lib/elementary/efl_ui_grid_static.c b/src/lib/elementary/efl_ui_grid_static.c index 05855ab..9013016 100644 --- a/src/lib/elementary/efl_ui_grid_static.c +++ b/src/lib/elementary/efl_ui_grid_static.c @@ -2,6 +2,7 @@ #define MY_CLASS EFL_UI_GRID_STATIC_CLASS #define MY_CLASS_NAME "Efl.Ui.Grid.Static" +#define MY_CLASS_NAME_LEGACY "elm_grid" EOLIAN static Eo * _efl_ui_grid_static_eo_base_constructor(Eo *obj, void *pd EINA_UNUSED) diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 252b574..dad0754 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -760,7 +760,7 @@ _efl_ui_image_elm_widget_event(Eo *obj, Efl_Ui_Image_Data *_pd EINA_UNUSED, Evas if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; - if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME, ev, key_actions)) + if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME_LEGACY, ev, key_actions)) return EINA_FALSE; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; diff --git a/src/lib/elementary/efl_ui_nstate.c b/src/lib/elementary/efl_ui_nstate.c index 135b3ff..b195a5f 100644 --- a/src/lib/elementary/efl_ui_nstate.c +++ b/src/lib/elementary/efl_ui_nstate.c @@ -9,8 +9,8 @@ #include "elm_widget_button.h" #define MY_CLASS EFL_UI_NSTATE_CLASS - #define MY_CLASS_NAME "Efl.Ui.Nstate" +#define MY_CLASS_NAME_LEGACY "elm_check" typedef struct @@ -162,7 +162,7 @@ _efl_ui_nstate_elm_widget_event(Eo *obj, Efl_Ui_Nstate_Data *_pd EINA_UNUSED, Ev if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; - if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME, ev, key_actions)) + if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME_LEGACY, ev, key_actions)) return EINA_FALSE; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; diff --git a/src/lib/elementary/efl_ui_text.c b/src/lib/elementary/efl_ui_text.c index a38f680..c4b5ad4 100644 --- a/src/lib/elementary/efl_ui_text.c +++ b/src/lib/elementary/efl_ui_text.c @@ -178,9 +178,8 @@ struct _Efl_Ui_Text_Rectangle }; #define MY_CLASS EFL_UI_TEXT_CLASS - -#define MY_CLASS_NAME "Efl_Ui_Text" -#define MY_CLASS_NAME_LEGACY "efl ui text" +#define MY_CLASS_NAME "Efl.Ui.Text" +#define MY_CLASS_NAME_LEGACY "elm_entry" #include "efl_ui_internal_text_interactive.h" diff --git a/src/lib/elementary/efl_ui_video.c b/src/lib/elementary/efl_ui_video.c index 190cb1a..2f1965b 100644 --- a/src/lib/elementary/efl_ui_video.c +++ b/src/lib/elementary/efl_ui_video.c @@ -17,8 +17,7 @@ * progress in the theme when needed */ #define MY_CLASS EFL_UI_VIDEO_CLASS - -#define MY_CLASS_NAME "Efl_Ui_Video" +#define MY_CLASS_NAME "Efl.Ui.Video" #define MY_CLASS_NAME_LEGACY "elm_video" static const Evas_Smart_Cb_Description _smart_callbacks[] = { @@ -117,7 +116,7 @@ _efl_ui_video_elm_widget_event(Eo *obj, Efl_Ui_Video_Data *_pd EINA_UNUSED, Evas if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE; - if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME, ev, key_actions)) + if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME_LEGACY, ev, key_actions)) { INF("keyname: '%s' not handled", ev->key); return EINA_FALSE; diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index ebe283e..de74762 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -21,8 +21,7 @@ #include "interfaces/efl_common_internal.h" #define MY_CLASS EFL_UI_WIN_CLASS - -#define MY_CLASS_NAME "Efl_Ui_Win" +#define MY_CLASS_NAME "Efl.Ui.Win" #define MY_CLASS_NAME_LEGACY "elm_win" static const Elm_Win_Trap *trap = NULL; @@ -1653,7 +1652,7 @@ _efl_ui_win_elm_widget_event(Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, Evas_Obj if (elm_widget_disabled_get(obj)) return EINA_FALSE; if (type != EVAS_CALLBACK_KEY_DOWN) return EINA_FALSE; - if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME, ev, key_actions)) + if (!_elm_config_key_binding_call(obj, MY_CLASS_NAME_LEGACY, ev, key_actions)) return EINA_FALSE; ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD; diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c index 71cf73a..105fc95 100644 --- a/src/lib/elementary/elm_config.c +++ b/src/lib/elementary/elm_config.c @@ -2572,7 +2572,15 @@ _elm_config_key_binding_hash(void) _elm_key_bindings = eina_hash_string_superfast_new(NULL); EINA_LIST_FOREACH(_elm_config->bindings, l, wb) { - eina_hash_add(_elm_key_bindings, wb->name, wb->key_bindings); + if (wb->name) + { + char *namelower = alloca(strlen(wb->name) + 1); + char *p; + + strcpy(namelower, wb->name); + for (p = namelower; *p; p++) *p = tolower(*p); + eina_hash_add(_elm_key_bindings, namelower, wb->key_bindings); + } } } @@ -2598,9 +2606,14 @@ _elm_config_key_binding_call(Evas_Object *obj, { Elm_Config_Binding_Key *binding; Eina_List *binding_list, *l; + char *namelower, *p; int i = 0; - binding_list = eina_hash_find(_elm_key_bindings, name); + namelower = alloca(strlen(name) + 1); + strcpy(namelower, name); + for (p = namelower; *p; p++) *p = tolower(*p); + + binding_list = eina_hash_find(_elm_key_bindings, namelower); if (binding_list) { --