forked from enlightenment/efl
genlist/list: Fixed wrong internal function name.
_list/genlist_item_focus_set --> _list/genlist_item_content_focus_set. These internal functions set the focus to the item's content objects, not the item itself. So the name was wrong and very confusing.
This commit is contained in:
parent
f9559db8b5
commit
d626f9278f
|
@ -2427,7 +2427,7 @@ _item_single_select_down(Elm_Genlist_Smart_Data *sd)
|
|||
}
|
||||
|
||||
static void
|
||||
_elm_genlist_item_focus_set(Elm_Gen_Item *it, Elm_Focus_Direction dir)
|
||||
_elm_genlist_item_content_focus_set(Elm_Gen_Item *it, Elm_Focus_Direction dir)
|
||||
{
|
||||
Evas_Object *focused_obj = NULL;
|
||||
Eina_List *l;
|
||||
|
@ -2510,7 +2510,7 @@ _elm_genlist_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
x -= step_x;
|
||||
|
||||
Elm_Gen_Item *gt = (Elm_Gen_Item*)elm_genlist_selected_item_get(obj);
|
||||
_elm_genlist_item_focus_set(gt, ELM_FOCUS_LEFT);
|
||||
_elm_genlist_item_content_focus_set(gt, ELM_FOCUS_LEFT);
|
||||
}
|
||||
else if ((!strcmp(ev->key, "Right")) ||
|
||||
((!strcmp(ev->key, "KP_Right")) && (!ev->string)))
|
||||
|
@ -2518,7 +2518,7 @@ _elm_genlist_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
x += step_x;
|
||||
|
||||
Elm_Gen_Item *gt = (Elm_Gen_Item*)elm_genlist_selected_item_get(obj);
|
||||
_elm_genlist_item_focus_set(gt, ELM_FOCUS_RIGHT);
|
||||
_elm_genlist_item_content_focus_set(gt, ELM_FOCUS_RIGHT);
|
||||
}
|
||||
else if ((!strcmp(ev->key, "Up")) ||
|
||||
((!strcmp(ev->key, "KP_Up")) && (!ev->string)))
|
||||
|
@ -5191,7 +5191,7 @@ _item_select(Elm_Gen_Item *it)
|
|||
if (it->generation == sd->generation)
|
||||
evas_object_smart_callback_call(WIDGET(it), SIG_SELECTED, it);
|
||||
|
||||
_elm_genlist_item_focus_set(it, ELM_FOCUS_PREVIOUS);
|
||||
_elm_genlist_item_content_focus_set(it, ELM_FOCUS_PREVIOUS);
|
||||
|
||||
it->walking--;
|
||||
sd->walking--;
|
||||
|
|
|
@ -193,7 +193,8 @@ _item_single_select_down(Elm_List_Smart_Data *sd)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elm_list_item_focus_set(Elm_List_Item *it, Elm_Focus_Direction dir, Eina_Bool h_mode)
|
||||
_elm_list_item_content_focus_set(Elm_List_Item *it, Elm_Focus_Direction dir,
|
||||
Eina_Bool h_mode)
|
||||
{
|
||||
if (!it) return EINA_FALSE;
|
||||
ELM_LIST_DATA_GET(WIDGET(it), sd);
|
||||
|
@ -335,7 +336,8 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
((!strcmp(ev->key, "KP_Left")) && !ev->string))
|
||||
{
|
||||
it = (Elm_List_Item *)elm_list_selected_item_get(obj);
|
||||
Eina_Bool focused = _elm_list_item_focus_set(it, ELM_FOCUS_LEFT, sd->h_mode);
|
||||
Eina_Bool focused = _elm_list_item_content_focus_set(
|
||||
it, ELM_FOCUS_LEFT, sd->h_mode);
|
||||
|
||||
if ((sd->h_mode && !focused))
|
||||
{
|
||||
|
@ -359,7 +361,8 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
((!strcmp(ev->key, "KP_Right")) && !ev->string))
|
||||
{
|
||||
it = (Elm_List_Item *)elm_list_selected_item_get(obj);
|
||||
Eina_Bool focused = _elm_list_item_focus_set(it, ELM_FOCUS_RIGHT, sd->h_mode);
|
||||
Eina_Bool focused = _elm_list_item_content_focus_set(
|
||||
it, ELM_FOCUS_RIGHT, sd->h_mode);
|
||||
|
||||
if (sd->h_mode && !focused)
|
||||
{
|
||||
|
@ -383,7 +386,8 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
((!strcmp(ev->key, "KP_Up")) && !ev->string))
|
||||
{
|
||||
it = (Elm_List_Item *)elm_list_selected_item_get(obj);
|
||||
Eina_Bool focused = _elm_list_item_focus_set(it, ELM_FOCUS_UP, sd->h_mode);
|
||||
Eina_Bool focused = _elm_list_item_content_focus_set(
|
||||
it, ELM_FOCUS_UP, sd->h_mode);
|
||||
|
||||
if (!sd->h_mode && !focused)
|
||||
{
|
||||
|
@ -407,7 +411,8 @@ _elm_list_smart_event(Eo *obj, void *_pd, va_list *list)
|
|||
((!strcmp(ev->key, "KP_Down")) && !ev->string))
|
||||
{
|
||||
it = (Elm_List_Item *)elm_list_selected_item_get(obj);
|
||||
Eina_Bool focused = _elm_list_item_focus_set(it, ELM_FOCUS_DOWN, sd->h_mode);
|
||||
Eina_Bool focused = _elm_list_item_content_focus_set(
|
||||
it, ELM_FOCUS_DOWN, sd->h_mode);
|
||||
|
||||
if (!sd->h_mode && !focused)
|
||||
{
|
||||
|
@ -1161,7 +1166,7 @@ _item_select(Elm_List_Item *it)
|
|||
return;
|
||||
}
|
||||
|
||||
_elm_list_item_focus_set(it, ELM_FOCUS_PREVIOUS, sd->h_mode);
|
||||
_elm_list_item_content_focus_set(it, ELM_FOCUS_PREVIOUS, sd->h_mode);
|
||||
|
||||
it->selected = EINA_TRUE;
|
||||
sd->selected = eina_list_append(sd->selected, it);
|
||||
|
|
Loading…
Reference in New Issue