woohyun pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=0a3f2f0e315789bd5be87d2205c306b20f660bc2

commit 0a3f2f0e315789bd5be87d2205c306b20f660bc2
Author: WooHyun Jung <wh0705.j...@samsung.com>
Date:   Thu Nov 21 10:13:40 2013 +0900

    elementary/elm_scroller.c : For checking focus next object, 
focus_direcion_get function should be changed to focus_next_get function. If 
there is no focus next object, focus_direction_get will be executed by 
focus_next_get.
---
 src/lib/elm_scroller.c | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/src/lib/elm_scroller.c b/src/lib/elm_scroller.c
index 67ae134..b3082d9 100644
--- a/src/lib/elm_scroller.c
+++ b/src/lib/elm_scroller.c
@@ -151,31 +151,22 @@ _elm_scroller_smart_event(Eo *obj, void *_pd, va_list 
*list)
           }
         else
           {
-             Evas_Object *tmp = NULL;
-             double degree = 0.0, weight = 0.0;
-             void *(*list_data_get)(const Eina_List *list);
-
-             list_data_get = eina_list_data_get;
+             Eina_Bool r = EINA_FALSE;
 
              if ((!strcmp(ev->key, "Left")) ||
                  (!strcmp(ev->key, "KP_Left")))
-               degree = 270.0;
+               r = elm_widget_focus_next_get(obj, ELM_FOCUS_LEFT, &new_focus);
              else if ((!strcmp(ev->key, "Right")) ||
                       (!strcmp(ev->key, "KP_Right")))
-               degree = 90.0;
+               r = elm_widget_focus_next_get(obj, ELM_FOCUS_RIGHT, &new_focus);
              else if ((!strcmp(ev->key, "Up")) ||
                       (!strcmp(ev->key, "KP_Up")))
-               degree = 0.0;
+               r = elm_widget_focus_next_get(obj, ELM_FOCUS_UP, &new_focus);
              else if ((!strcmp(ev->key, "Down")) ||
                       (!strcmp(ev->key, "KP_Down")))
-               degree = 180.0;
-
-             if (elm_widget_focus_list_direction_get
-                   (obj, current_focus, can_focus_list, list_data_get, degree,
-                   &tmp, &weight))
-               new_focus = tmp;
+               r = elm_widget_focus_next_get(obj, ELM_FOCUS_DOWN, &new_focus);
 
-             if (new_focus)
+             if (r && new_focus)
                {
                   Evas_Coord l_x = 0;
                   Evas_Coord l_y = 0;

-- 


Reply via email to