genlist/gengrid/list: Fix first on_focus call correctly by checking focus highlight.

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.
This commit is contained in:
Daniel Juyung Seo 2014-04-22 23:15:20 +09:00
parent 1303a6dbec
commit b173ed7c85
3 changed files with 3 additions and 3 deletions

View 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;

View 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;

View 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;