summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-03-08 03:27:09 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-03-08 03:27:09 +0900
commit148b220544bb85874a9664c46e181bca7a71d62f (patch)
tree3e71075d486852908bc5fdc21af70a1bf61df260
parent8f57cfba6282acbe86febfb1733995e531a1734b (diff)
downloadelementary-148b220544bb85874a9664c46e181bca7a71d62f.tar.gz
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.
-rw-r--r--src/lib/elm_genlist.c8
-rw-r--r--src/lib/elm_list.c17
2 files changed, 15 insertions, 10 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index a59a42f20..1c3abb4dd 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -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--;
diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c
index d18d669e5..8df8f4844 100644
--- a/src/lib/elm_list.c
+++ b/src/lib/elm_list.c
@@ -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);