rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=07d470658f5c425335687349bfbed0f2d1031979

commit 07d470658f5c425335687349bfbed0f2d1031979
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Dec 16 18:55:40 2015 +0200

    group_navigator: change arrows enabling logic
    
    fix issue when only one part was in list and was selected, but restack  
arrows
    were not disabled
---
 src/bin/ui/group_navigator.c | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/src/bin/ui/group_navigator.c b/src/bin/ui/group_navigator.c
index 6e30664..4639c52 100644
--- a/src/bin/ui/group_navigator.c
+++ b/src/bin/ui/group_navigator.c
@@ -438,28 +438,24 @@ _selected_cb(void *data,
    /* enabling or disabling up and down buttons */
    if ((itc == pl->itc_part_selected) || (itc == pl->itc_part))
      {
+        TODO("Update logic after adding 'parts' genlist item")
         if (elm_genlist_item_prev_get(glit) == NULL)
-          {
-             TODO("Update logic after adding 'parts' genlist item")
-             elm_object_disabled_set(pl->btn_down, false);
-             elm_object_disabled_set(pl->btn_up, true);
-          }
+          elm_object_disabled_set(pl->btn_up, true);
         else
+          elm_object_disabled_set(pl->btn_up, false);
+
+        next_item = elm_genlist_item_next_get(glit);
+        while (next_item != NULL)
           {
-             next_item = elm_genlist_item_next_get(glit);
-             while (next_item != NULL)
-               {
-                  next_itc = elm_genlist_item_item_class_get(next_item);
-                  if ((next_itc == pl->itc_part_selected) || (next_itc == 
pl->itc_part))
-                    break;
-                  next_item = elm_genlist_item_next_get(next_item);
-               }
-             if (next_item)
-               elm_object_disabled_set(pl->btn_down, false);
-             else
-               elm_object_disabled_set(pl->btn_down, true);
-             elm_object_disabled_set(pl->btn_up, false);
+             next_itc = elm_genlist_item_item_class_get(next_item);
+             if ((next_itc == pl->itc_part_selected) || (next_itc == 
pl->itc_part))
+               break;
+             next_item = elm_genlist_item_next_get(next_item);
           }
+        if (next_item)
+          elm_object_disabled_set(pl->btn_down, false);
+        else
+          elm_object_disabled_set(pl->btn_down, true);
      }
    else if ((itc == pl->itc_item))
      {

-- 


Reply via email to