Gengrid: In reorder & sd->horizontal mode, the condition must be checked for item_loo...
authorChinmaya <chinmaya@chinmaya-VirtualBox.(none)>
Mon, 7 Jul 2014 03:30:21 +0000 (12:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 7 Jul 2014 03:30:21 +0000 (12:30 +0900)
Summary:
The bug was there when reorder mode and sd->horizontal mode is enabled but item_loop_enable
is not set, then also the loop was occuring with right key event.

Test Plan: elementary_test -to "gengrid 2"

Reviewers: raster, seoz, eagleeye, SanghyeonLee

CC: seoz
Differential Revision: https://phab.enlightenment.org/D1121

src/bin/test_gengrid.c
src/lib/elm_gengrid.c

index 847b66d8747bdabb40b4da74ec9fbb5ac4efabbb..ba69f37fa260cb083578f026e2edc59083c48910 100644 (file)
@@ -828,6 +828,12 @@ test_gengrid2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
    elm_box_pack_end(hbx, bt);
    evas_object_show(bt);
 
+   ck = elm_check_add(win);
+   elm_object_text_set(ck, "Reorder mode enable");
+   evas_object_smart_callback_add(ck, "changed", reorder_mode_cb, grid);
+   elm_box_pack_end(hbx, ck);
+   evas_object_show(ck);
+
    ck = elm_check_add(win);
    elm_object_text_set(ck, "Horizontal Mode");
    evas_object_smart_callback_add(ck, "changed", _horizontal_grid, grid);
index b97e6ee5180ef0be2553fcb2622b284b96cb13e0..b44f316a2f68a9fa3f10c18b956458fe5a28081a 100644 (file)
@@ -2428,7 +2428,7 @@ _key_action_move(Evas_Object *obj, const char *params)
                        if (_item_horizontal_loop(obj, ELM_FOCUS_LEFT))
                          return EINA_TRUE;
                     }
-                  else
+                  else if (sd->item_loop_enable)
                     {
                        if (_item_horizontal_loop(obj, ELM_FOCUS_UP))
                          return EINA_TRUE;