From 076a8f3e963fd2c58af09c3ff6f2c2d6a75db3f7 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Sun, 17 Feb 2019 18:22:13 +0100 Subject: [PATCH] efl_ui_focus_composition: remove unneeded API the purpose of this API can be improved, and the values there can be guessed. Reviewed-by: Xavi Artigas Differential Revision: https://phab.enlightenment.org/D7993 --- src/lib/elementary/efl_ui_focus_composition.c | 26 ++++++++------------------ src/lib/elementary/efl_ui_focus_composition.eo | 9 --------- src/lib/elementary/efl_ui_list_view.c | 1 - src/lib/elementary/elm_gengrid.c | 1 - src/lib/elementary/elm_genlist.c | 1 - src/lib/elementary/elm_toolbar.c | 5 ----- src/lib/elementary_tizen/elm_genlist.c | 1 - 7 files changed, 8 insertions(+), 36 deletions(-) diff --git a/src/lib/elementary/efl_ui_focus_composition.c b/src/lib/elementary/efl_ui_focus_composition.c index 1db938a..3b95b16 100644 --- a/src/lib/elementary/efl_ui_focus_composition.c +++ b/src/lib/elementary/efl_ui_focus_composition.c @@ -14,7 +14,7 @@ typedef struct { Eina_List *order, *targets_ordered; Eina_List *register_target, *registered_targets; - Efl_Ui_Focus_Manager *registered, *custom_manager, *old_manager; + Efl_Ui_Focus_Manager *registered, *old_manager; Eina_Bool dirty; Eina_Bool logical; } Efl_Ui_Focus_Composition_Data; @@ -27,10 +27,7 @@ _state_apply(Eo *obj, Efl_Ui_Focus_Composition_Data *pd) //Legacy code compatibility, only update the custom chain of elements if legacy was NOT messing with it. if (elm_widget_is_legacy(obj) && elm_object_focus_custom_chain_get(obj)) return; - if (pd->custom_manager) - manager = pd->custom_manager; - else - manager = pd->registered; + manager = pd->registered; if (manager) { @@ -167,7 +164,12 @@ _efl_ui_focus_composition_efl_ui_widget_focus_state_apply(Eo *obj, Efl_Ui_Focus_ registered = efl_ui_widget_focus_state_apply(efl_super(obj, MY_CLASS), current_state, configured_state, redirect); if (registered) - pd->registered = configured_state->manager; + { + if (efl_isa(obj, EFL_UI_FOCUS_MANAGER_INTERFACE)) + pd->registered = obj; + else + pd->registered = configured_state->manager; + } else pd->registered = NULL; @@ -195,18 +197,6 @@ _efl_ui_focus_composition_efl_ui_focus_object_prepare_logical_none_recursive(Eo } EOLIAN static void -_efl_ui_focus_composition_custom_manager_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Efl_Ui_Focus_Manager *custom_manager) -{ - pd->custom_manager = custom_manager; -} - -EOLIAN static Efl_Ui_Focus_Manager* -_efl_ui_focus_composition_custom_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd) -{ - return pd->custom_manager; -} - -EOLIAN static void _efl_ui_focus_composition_logical_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Focus_Composition_Data *pd, Eina_Bool logical_mode) { pd->logical = logical_mode; diff --git a/src/lib/elementary/efl_ui_focus_composition.eo b/src/lib/elementary/efl_ui_focus_composition.eo index 3fb5a36..15d2a60 100644 --- a/src/lib/elementary/efl_ui_focus_composition.eo +++ b/src/lib/elementary/efl_ui_focus_composition.eo @@ -29,15 +29,6 @@ mixin @beta Efl.Ui.Focus.Composition requires Efl.Ui.Widget { You can use this function to call composition_elements. ]] } - @property custom_manager @protected { - [[Register all children in this manager - - Set to $null to register them in the same manager as the implementor is - ]] - values { - custom_manager : Efl.Ui.Focus.Manager; [[EFL focus manager]] - } - } @property logical_mode @protected { [[Set to true if all children should be registered as logicals]] values { diff --git a/src/lib/elementary/efl_ui_list_view.c b/src/lib/elementary/efl_ui_list_view.c index 480f186..9a563df 100644 --- a/src/lib/elementary/efl_ui_list_view.c +++ b/src/lib/elementary/efl_ui_list_view.c @@ -679,7 +679,6 @@ _efl_ui_list_view_efl_object_constructor(Eo *obj, Efl_Ui_List_View_Data *pd) efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _list_element_focused, NULL); - efl_ui_focus_composition_custom_manager_set(obj, obj); efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); pd->style = eina_stringshare_add(elm_widget_style_get(obj)); diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 0739282..2bacdc5 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -5757,7 +5757,6 @@ _elm_gengrid_efl_object_constructor(Eo *obj, Elm_Gengrid_Data *sd) efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); - efl_ui_focus_composition_custom_manager_set(obj, obj); efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _gengrid_element_focused, obj); diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 938e2b0..943812f 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -6377,7 +6377,6 @@ _elm_genlist_efl_object_constructor(Eo *obj, Elm_Genlist_Data *sd) efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); - efl_ui_focus_composition_custom_manager_set(obj, obj); efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); efl_event_callback_add(obj, EFL_UI_FOCUS_MANAGER_EVENT_MANAGER_FOCUS_CHANGED, _genlist_element_focused, obj); diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index 1f36ac4..c71d25a 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -3320,11 +3320,6 @@ _elm_toolbar_efl_object_constructor(Eo *obj, Elm_Toolbar_Data *_pd EINA_UNUSED) evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks); efl_access_object_role_set(obj, EFL_ACCESS_ROLE_TOOL_BAR); - //TIZEN_ONLY(20180607): Restore legacy focus - if (!elm_widget_is_legacy(obj)) - // - efl_ui_focus_composition_custom_manager_set(obj, obj); - return obj; } diff --git a/src/lib/elementary_tizen/elm_genlist.c b/src/lib/elementary_tizen/elm_genlist.c index dd92d15..fd22848 100644 --- a/src/lib/elementary_tizen/elm_genlist.c +++ b/src/lib/elementary_tizen/elm_genlist.c @@ -6800,7 +6800,6 @@ _elm_genlist_efl_object_constructor(Eo *obj, Elm_Genlist_Data *sd) efl_ui_focus_parent_provider_gen_container_set(efl_added, obj), efl_ui_focus_parent_provider_gen_content_item_map_set(efl_added, sd->content_item_map)); - efl_ui_focus_composition_custom_manager_set(obj, obj); efl_ui_focus_composition_logical_mode_set(obj, EINA_TRUE); sd->obj = obj; -- 2.7.4