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.
This commit is contained in:
Daniel Juyung Seo 2014-05-11 21:20:04 +09:00
parent 5407141ac6
commit dfead75366
4 changed files with 8 additions and 0 deletions

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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);