summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzmike <michael.blumenkrantz@gmail.com>2014-08-10 14:28:16 -0400
committerzmike <michael.blumenkrantz@gmail.com>2014-08-10 14:30:34 -0400
commitf9b51245e87a2da6a00fd96fff358439d0b72532 (patch)
tree8209117f0e953c924a5c45c02c18722e543aa240
parent4059e2b5c3a93033e3926b2e4939206cfa504422 (diff)
gengrid once again selects items using keyboard when no item was previously selected
this was yet another thing broken by the mostly-unreviewed and untested widget item focus feature. it's still not completely fixed, since the reorder modes are broken, but at least it works for the general case again @fix
-rw-r--r--src/lib/elm_gengrid.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 3909123a1..efdb5d354 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -2587,8 +2587,8 @@ _key_action_move(Evas_Object *obj, const char *params)
2587 } 2587 }
2588 else 2588 else
2589 { 2589 {
2590 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT) || 2590 if (sd->focused_item && (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT) ||
2591 !elm_gengrid_item_prev_get(sd->focused_item)) 2591 !elm_gengrid_item_prev_get(sd->focused_item)))
2592 { 2592 {
2593 if (sd->item_loop_enable) 2593 if (sd->item_loop_enable)
2594 { 2594 {
@@ -2654,7 +2654,7 @@ _key_action_move(Evas_Object *obj, const char *params)
2654 } 2654 }
2655 if (sd->horizontal) 2655 if (sd->horizontal)
2656 { 2656 {
2657 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT)) 2657 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT))
2658 { 2658 {
2659 if (sd->item_loop_enable) 2659 if (sd->item_loop_enable)
2660 { 2660 {
@@ -2672,8 +2672,8 @@ _key_action_move(Evas_Object *obj, const char *params)
2672 } 2672 }
2673 else 2673 else
2674 { 2674 {
2675 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT) || 2675 if (sd->focused_item && (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT) ||
2676 !elm_gengrid_item_next_get(sd->focused_item)) 2676 !elm_gengrid_item_next_get(sd->focused_item)))
2677 { 2677 {
2678 if (sd->item_loop_enable) 2678 if (sd->item_loop_enable)
2679 { 2679 {
@@ -2727,7 +2727,7 @@ _key_action_move(Evas_Object *obj, const char *params)
2727 } 2727 }
2728 if (sd->horizontal) 2728 if (sd->horizontal)
2729 { 2729 {
2730 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP)) 2730 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP))
2731 return EINA_FALSE; 2731 return EINA_FALSE;
2732 if (!_elm_config->item_select_on_focus_disable) 2732 if (!_elm_config->item_select_on_focus_disable)
2733 { 2733 {
@@ -2784,7 +2784,7 @@ _key_action_move(Evas_Object *obj, const char *params)
2784 } 2784 }
2785 if (sd->horizontal) 2785 if (sd->horizontal)
2786 { 2786 {
2787 if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_DOWN)) 2787 if (sd->focused_item && _elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_DOWN))
2788 return EINA_FALSE; 2788 return EINA_FALSE;
2789 if (!_elm_config->item_select_on_focus_disable) 2789 if (!_elm_config->item_select_on_focus_disable)
2790 { 2790 {