Gengrid: In reorder & sd->horizontal mode, the condition must be checked for item_loop_enable set or not. Also added a check button to enable reorder mode in gengrid 2.

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
This commit is contained in:
Chinmaya 2014-07-07 12:30:21 +09:00 committed by Carsten Haitzler (Rasterman)
parent 24ce4835c1
commit 84f5de5a74
2 changed files with 7 additions and 1 deletions

View 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);

View 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;