X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Fnavi.c;h=71090386bd9364df7999969e88fe6559b5c168d7;hb=2cbfb1bd74fdc6b0c3733abb07e95ba9fa334929;hp=f52a44bf9739ce9b83e36115586317e36680e1cb;hpb=8366314611bf30a0f31d25bf5f5023186fa87692;p=ion3.git diff --git a/ioncore/navi.c b/ioncore/navi.c index f52a44b..7109038 100644 --- a/ioncore/navi.c +++ b/ioncore/navi.c @@ -1,7 +1,7 @@ /* * ion/ioncore/navi.c * - * Copyright (c) Tuomo Valkonen 2006. + * Copyright (c) Tuomo Valkonen 2006-2007. * * Ion is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by @@ -120,6 +120,7 @@ static bool may_ascend(WRegion *to, WRegion *from, WRegionNaviData *data) }else if(data->no_ascend!=NULL){ return (data->no_ascend!=(Obj*)from); }else{ + /* Set to TRUE for cycling out of nested workspaces etc. */ return !OBJ_IS(from, WMPlex); } } @@ -136,6 +137,7 @@ static bool may_descend(WRegion *to, WRegion *from, WRegionNaviData *data) }else if(data->no_descend!=NULL){ return (data->no_descend!=(Obj*)from); }else{ + /* Set to TRUE for cycling into nested workspaces etc. */ return !OBJ_IS(to, WMPlex); } } @@ -228,12 +230,12 @@ static WRegion *release(WRegionNaviData *data, WRegion *res) /*EXTL_DOC * Find region next from \var{reg} in direction \var{dirstr} - * (up/down/left/right/next/prev/any). The table param may + * (up/down/left/right/next/prev/any). The table \var{param} may * contain the boolean field \var{nowrap}, instructing not to wrap * around, and the \type{WRegion}s \var{no_ascend} and \var{no_descend}, - * and functions \var{ascend_filter} and \var{descend_filter} from - * \var{WRegion}s (\var{to}, \var{from}), used to decide when to descend - * or ascend into another region. (TODO: more detailed explanation.) + * and boolean functions \var{ascend_filter} and \var{descend_filter} + * on \var{WRegion} pairs (\var{to}, \var{from}), are used to decide when + * to descend or ascend into another region. */ EXTL_EXPORT WRegion *ioncore_navi_next(WRegion *reg, const char *dirstr, ExtlTab param) @@ -271,10 +273,8 @@ WRegion *ioncore_navi_first(WRegion *reg, const char *dirstr, ExtlTab param) { WRegionNaviData data; - if(reg==NULL){ - /* ??? */ + if(reg==NULL) return NULL; - } if(!get_param(&data, dirstr, param)) return NULL; @@ -288,11 +288,9 @@ WRegion *ioncore_navi_first(WRegion *reg, const char *dirstr, ExtlTab param) static WRegion *do_goto(WRegion *res) { - if(res!=NULL){ - /* TODO: deep rqorder? */ - region_rqorder(res, REGION_ORDER_FRONT); + if(res!=NULL) region_goto(res); - } + return res; }