genlist/gengrid/list: Fix first on_focus call correctly by checking focus highlight.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Tue, 22 Apr 2014 14:15:20 +0000 (23:15 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Tue, 22 Apr 2014 14:18:04 +0000 (23:18 +0900)
First on_focus call should consider focus highlight enable status and
do the different job according to that.

This can be tested in "genlist 7" and "genlist focus" examples in
elementary_test.

src/lib/elm_gengrid.c
src/lib/elm_genlist.c
src/lib/elm_list.c

index 567d5f8..8873b32 100644 (file)
@@ -2222,7 +2222,7 @@ _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;
-        else
+        else if (elm_widget_focus_highlight_enabled_get(obj))
           {
              it = elm_gengrid_first_item_get(obj);
              is_sel = EINA_TRUE;
index 89f0517..9f8d37f 100644 (file)
@@ -2844,7 +2844,7 @@ _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;
-        else if (sd->selected)
+        else if (elm_widget_focus_highlight_enabled_get(obj))
           {
              it = elm_genlist_first_item_get(obj);
              is_sel = EINA_TRUE;
index bbb97cf..fd5def2 100644 (file)
@@ -1199,7 +1199,7 @@ _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;
-        else
+        else if (elm_widget_focus_highlight_enabled_get(obj))
           {
              it = eina_list_data_get(sd->items);
              is_sel = EINA_TRUE;