discomfitor pushed a commit to branch master.

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

commit f9b51245e87a2da6a00fd96fff358439d0b72532
Author: zmike <[email protected]>
Date:   Sun Aug 10 14:28:16 2014 -0400

    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
---
 src/lib/elm_gengrid.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 3909123..efdb5d3 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)
           }
         else
           {
-             if (_elm_gengrid_item_edge_check(sd->focused_item, 
ELM_FOCUS_LEFT) ||
-                 !elm_gengrid_item_prev_get(sd->focused_item))
+             if (sd->focused_item && 
(_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_LEFT) ||
+                 !elm_gengrid_item_prev_get(sd->focused_item)))
                {
                   if (sd->item_loop_enable)
                     {
@@ -2654,7 +2654,7 @@ _key_action_move(Evas_Object *obj, const char *params)
           }
         if (sd->horizontal)
           {
-             if (_elm_gengrid_item_edge_check(sd->focused_item, 
ELM_FOCUS_RIGHT))
+             if (sd->focused_item && 
_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT))
                {
                   if (sd->item_loop_enable)
                     {
@@ -2672,8 +2672,8 @@ _key_action_move(Evas_Object *obj, const char *params)
           }
         else
           {
-             if (_elm_gengrid_item_edge_check(sd->focused_item, 
ELM_FOCUS_RIGHT) ||
-                 !elm_gengrid_item_next_get(sd->focused_item))
+             if (sd->focused_item && 
(_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_RIGHT) ||
+                 !elm_gengrid_item_next_get(sd->focused_item)))
                {
                   if (sd->item_loop_enable)
                     {
@@ -2727,7 +2727,7 @@ _key_action_move(Evas_Object *obj, const char *params)
           }
         if (sd->horizontal)
           {
-             if (_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP))
+             if (sd->focused_item && 
_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_UP))
                return EINA_FALSE;
              if (!_elm_config->item_select_on_focus_disable)
                {
@@ -2784,7 +2784,7 @@ _key_action_move(Evas_Object *obj, const char *params)
           }
         if (sd->horizontal)
           {
-             if (_elm_gengrid_item_edge_check(sd->focused_item, 
ELM_FOCUS_DOWN))
+             if (sd->focused_item && 
_elm_gengrid_item_edge_check(sd->focused_item, ELM_FOCUS_DOWN))
                return EINA_FALSE;
              if (!_elm_config->item_select_on_focus_disable)
                {

-- 


Reply via email to