From dfead75366aec7259d52f8b3d157b9fa0bc2a687 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Sun, 11 May 2014 21:20:04 +0900 Subject: [PATCH] gengrid/genlist/list/toolbar: Do not set the focus to the item on widget's first focus. This was introduced during 1.10 development phase but this changed the default focus behavior and got a lot of complaints. (especially from discomfitor) So I would like to comment this out now and make it optional on 1.11 by keeping the default behavior. --- legacy/elementary/src/lib/elm_gengrid.c | 2 ++ legacy/elementary/src/lib/elm_genlist.c | 2 ++ legacy/elementary/src/lib/elm_list.c | 2 ++ legacy/elementary/src/lib/elm_toolbar.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/legacy/elementary/src/lib/elm_gengrid.c b/legacy/elementary/src/lib/elm_gengrid.c index 2ca5ad1..ab7a574 100644 --- a/legacy/elementary/src/lib/elm_gengrid.c +++ b/legacy/elementary/src/lib/elm_gengrid.c @@ -2570,11 +2570,13 @@ _elm_gengrid_elm_widget_on_focus(Eo *obj, Elm_Gengrid_Data *sd) it = sd->last_focused_item; else if (sd->last_selected_item) it = sd->last_selected_item; + /* TODO: make it optional on 1.11. Disable this until then else if (elm_widget_focus_highlight_enabled_get(obj)) { it = elm_gengrid_first_item_get(obj); is_sel = EINA_TRUE; } + */ if (it) { diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index 2761a35..0e5caba 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -2907,11 +2907,13 @@ _elm_genlist_elm_widget_on_focus(Eo *obj, Elm_Genlist_Data *sd) it = sd->last_focused_item; else if (sd->last_selected_item) it = sd->last_selected_item; + /* TODO: make it optional on 1.11. Disable this until then else if (elm_widget_focus_highlight_enabled_get(obj)) { it = elm_genlist_first_item_get(obj); is_sel = EINA_TRUE; } + */ if (it) { diff --git a/legacy/elementary/src/lib/elm_list.c b/legacy/elementary/src/lib/elm_list.c index 0098d1c..7b0cc06 100644 --- a/legacy/elementary/src/lib/elm_list.c +++ b/legacy/elementary/src/lib/elm_list.c @@ -1206,11 +1206,13 @@ _elm_list_elm_widget_on_focus(Eo *obj, Elm_List_Data *sd) it = sd->last_focused_item; else if (sd->last_selected_item) it = sd->last_selected_item; + /* TODO: make it optional on 1.11 else if (elm_widget_focus_highlight_enabled_get(obj)) { it = eina_list_data_get(sd->items); is_sel = EINA_TRUE; } + */ if (it) { diff --git a/legacy/elementary/src/lib/elm_toolbar.c b/legacy/elementary/src/lib/elm_toolbar.c index 0a62fe1..32b08f1 100644 --- a/legacy/elementary/src/lib/elm_toolbar.c +++ b/legacy/elementary/src/lib/elm_toolbar.c @@ -722,8 +722,10 @@ _elm_toolbar_elm_widget_on_focus(Eo *obj, Elm_Toolbar_Data *sd) { if (sd->last_focused_item) it = (Elm_Object_Item *)sd->last_focused_item; + /* TODO: make it optional on 1.11. Disable this until then else it = (Elm_Object_Item *)ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items); + */ if (it) { it = _elm_toolbar_nearest_visible_item_get(obj, it); -- 2.7.4