forked from enlightenment/edi
Mainview: prior/next tabbing wrap
Add wrap around for 'ctrl-prior' and 'ctrl-next' in the mainview naviframe
This commit is contained in:
parent
7c8d84d110
commit
1a4843fba8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue