ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=1a4843fba8e66113c5677850d34b867eaafbbec4

commit 1a4843fba8e66113c5677850d34b867eaafbbec4
Author: Kelly Wilson <wils...@cpsc.ucalgary.ca>
Date:   Sun Feb 8 14:38:46 2015 -0700

    Mainview: prior/next tabbing wrap
    
    Add wrap around for 'ctrl-prior' and 'ctrl-next' in the mainview naviframe
---
 src/bin/mainview/edi_mainview.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/bin/mainview/edi_mainview.c b/src/bin/mainview/edi_mainview.c
index 5f0bacb..cc25c3d 100644
--- a/src/bin/mainview/edi_mainview.c
+++ b/src/bin/mainview/edi_mainview.c
@@ -52,12 +52,18 @@ edi_mainview_item_prev()
 {
    Eina_List *item;
    Elm_Object_Item *current;
-   Edi_Mainview_Item *it, *prev = NULL;
+   Edi_Mainview_Item *it, *first, *prev = NULL;
 
    current = elm_naviframe_top_item_get(nf);
+   first = (Edi_Mainview_Item *)eina_list_nth(_edi_mainview_items, 0);
 
    EINA_LIST_FOREACH(_edi_mainview_items, item, it)
      {
+        if (first->view == current)
+         {
+            prev = eina_list_nth(_edi_mainview_items, 
eina_list_count(_edi_mainview_items)-1);
+            edi_mainview_item_select(prev);
+         }
         if (it && it->view == current)
           {
              if (prev)
@@ -74,13 +80,19 @@ edi_mainview_item_next()
 {
    Eina_List *item;
    Elm_Object_Item *current;
-   Edi_Mainview_Item *it;
+   Edi_Mainview_Item *it, *last, *next;
    Eina_Bool open_next = EINA_FALSE;
 
    current = elm_naviframe_top_item_get(nf);
+   last = eina_list_nth(_edi_mainview_items, 
eina_list_count(_edi_mainview_items)-1);
 
    EINA_LIST_FOREACH(_edi_mainview_items, item, it)
      {
+        if (last->view == current)
+         {
+            next = eina_list_nth(_edi_mainview_items, 0);
+            edi_mainview_item_select(next);
+         }
         if (it && open_next)
           {
              edi_mainview_item_select(it);

-- 


Reply via email to