genlist/list: Fixed wrong internal function name.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 7 Mar 2014 18:27:09 +0000 (03:27 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 7 Mar 2014 18:27:09 +0000 (03:27 +0900)
_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.

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

index a59a42f..1c3abb4 100644 (file)
@@ -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--;
index d18d669..8df8f48 100644 (file)
@@ -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);