page: nested browsing
This commit is contained in:
parent
fe3de08658
commit
e2ed2a0b7e
1 changed files with 10 additions and 8 deletions
|
@ -721,13 +721,12 @@ popenfile(Page *p)
|
||||||
Page*
|
Page*
|
||||||
nextpage(Page *p)
|
nextpage(Page *p)
|
||||||
{
|
{
|
||||||
if(p){
|
if(p && p->down)
|
||||||
if(p->down)
|
return p->down;
|
||||||
return p->down;
|
while(p){
|
||||||
if(p->next)
|
if(p->next)
|
||||||
return p->next;
|
return p->next;
|
||||||
if(p->up)
|
p = p->up;
|
||||||
return p->up->next;
|
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@ -1336,13 +1335,16 @@ main(int argc, char *argv[])
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(m.buttons & 4){
|
if(m.buttons & 4){
|
||||||
|
Page *x;
|
||||||
|
|
||||||
if(root->down == nil)
|
if(root->down == nil)
|
||||||
goto Unlock;
|
goto Unlock;
|
||||||
|
qlock(&pagelock);
|
||||||
pagemenu.lasthit = pageindex(current);
|
pagemenu.lasthit = pageindex(current);
|
||||||
i = emenuhit(3, &m, &pagemenu);
|
x = pageat(emenuhit(3, &m, &pagemenu));
|
||||||
|
qunlock(&pagelock);
|
||||||
unlockdisplay(display);
|
unlockdisplay(display);
|
||||||
if(i != -1)
|
showpage(x);
|
||||||
showpage(pageat(i));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Unlock:
|
Unlock:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue