summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-08-26 20:43:39 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-28 17:41:40 +0530
commit4da16f3d5ddc941cc5308e16a3d4eb0498add1b2 (patch)
tree9eab0490f2decb70f2d55715f146bf218d920ea9
parent5c091504987b66eb2ee068cdc20d635a2c73950a (diff)
gengrid: no need to loop in case of reorder mode is enabled
There is no need to loop when reorder mode is enabled. This looks ugly and nobody wants it. This fault was introduced in 7aaa5c8d0a4a5714b4f1bf79e This patch also fixes following crash 1. elementary_test -to "Gengrid 2". 2. Enable all the options available. 3. Do reorder of item via keys. 4. Observe segv on reordering edge items. @fix
-rw-r--r--src/lib/elm_gengrid.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 5eca39e14..7414ca9ac 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -3057,10 +3057,7 @@ _key_action_move(Evas_Object *obj, const char *params)
3057 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) 3057 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT))
3058 { 3058 {
3059 if (sd->item_loop_enable) 3059 if (sd->item_loop_enable)
3060 { 3060 return EINA_TRUE;
3061 if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT))
3062 return EINA_TRUE;
3063 }
3064 return EINA_FALSE; 3061 return EINA_FALSE;
3065 } 3062 }
3066 if (!sd->horizontal) 3063 if (!sd->horizontal)
@@ -3078,10 +3075,7 @@ _key_action_move(Evas_Object *obj, const char *params)
3078 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT)) 3075 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT))
3079 { 3076 {
3080 if (sd->item_loop_enable) 3077 if (sd->item_loop_enable)
3081 { 3078 return EINA_TRUE;
3082 if (_item_horizontal_loop(obj, ELM_FOCUS_RIGHT))
3083 return EINA_TRUE;
3084 }
3085 return EINA_FALSE; 3079 return EINA_FALSE;
3086 } 3080 }
3087 if (!_elm_config->item_select_on_focus_disable) 3081 if (!_elm_config->item_select_on_focus_disable)
@@ -3138,16 +3132,8 @@ _key_action_move(Evas_Object *obj, const char *params)
3138 3132
3139 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT)) 3133 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT))
3140 { 3134 {
3141 if (sd->item_loop_enable && !sd->horizontal) 3135 if (sd->item_loop_enable)
3142 { 3136 return EINA_TRUE;
3143 if (_item_horizontal_loop(obj, ELM_FOCUS_LEFT))
3144 return EINA_TRUE;
3145 }
3146 else if (sd->item_loop_enable)
3147 {
3148 if (_item_horizontal_loop(obj, ELM_FOCUS_UP))
3149 return EINA_TRUE;
3150 }
3151 return EINA_FALSE; 3137 return EINA_FALSE;
3152 } 3138 }
3153 if (!sd->horizontal) 3139 if (!sd->horizontal)
@@ -3168,7 +3154,7 @@ _key_action_move(Evas_Object *obj, const char *params)
3168 { 3154 {
3169 if (_item_horizontal_loop(obj, ELM_FOCUS_UP)) 3155 if (_item_horizontal_loop(obj, ELM_FOCUS_UP))
3170 return EINA_TRUE; 3156 return EINA_TRUE;
3171 } 3157 }
3172 } 3158 }
3173 if (!_elm_config->item_select_on_focus_disable) 3159 if (!_elm_config->item_select_on_focus_disable)
3174 { 3160 {