X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ioncore%2Fsaveload.c;h=db8a12f47b55dcb9e9ee043690836ec042aaa750;hb=ae4260bb64817c11f9a7140324cd3e3ba113e297;hp=bb67ac1fcb482b5bb7f657421fafce6237071f5d;hpb=803afbc1cd633f6c025bcd9537e9b7e9aedadd0d;p=ion3.git diff --git a/ioncore/saveload.c b/ioncore/saveload.c index bb67ac1..db8a12f 100644 --- a/ioncore/saveload.c +++ b/ioncore/saveload.c @@ -3,10 +3,7 @@ * * Copyright (c) Tuomo Valkonen 1999-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 - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. + * See the included file LICENSE for details. */ #include @@ -86,33 +83,6 @@ WRegion *create_region_load(WWindow *par, const WFitParams *fp, if(!extl_table_gets_s(tab, "type", &objclass)) return NULL; - - /* Backwards compatibility hack. */ - if(strcmp(objclass, "WFloatWS")==0){ - objclass=scopy("WGroupWS"); - }else if(strcmp(objclass, "WIonWS")==0){ - WGroupWS *ws=create_groupws(par, fp); - if(ws!=NULL){ - extl_table_gets_s(tab, "name", &name); - extl_table_sets_s(tab, "type", "WTiling"); - extl_table_sets_b(tab, "bottom", TRUE); - extl_table_sets_b(tab, "bottom_last_close", TRUE); - extl_table_sets_i(tab, "sizepolicy", SIZEPOLICY_FULL_EXACT); - - if(name!=NULL) - region_set_name((WRegion*)ws, name); - - reg=group_attach_new((WGroup*)ws, tab); - - if(reg!=NULL) - return (WRegion*)ws; - - destroy_obj((Obj*)ws); - } - objclass=scopy("WTiling"); - }else if(strcmp(objclass, "WFloatFrame")==0){ - objclass=scopy("WFrame"); - } if(objclass==NULL) return NULL; @@ -187,10 +157,34 @@ ExtlTab region_get_base_configuration(WRegion *reg) } +static bool get_config_clientwins=TRUE; + + ExtlTab region_get_configuration(WRegion *reg) { ExtlTab tab=extl_table_none(); - CALL_DYN_RET(tab, ExtlTab, region_get_configuration, reg, (reg)); + if(get_config_clientwins || !OBJ_IS(reg, WClientWin)){ + CALL_DYN_RET(tab, ExtlTab, region_get_configuration, reg, (reg)); + } + return tab; +} + + +/*EXTL_DOC + * Get configuration tree. If \var{clientwins} is unset, client windows + * are filtered out. + */ +EXTL_EXPORT_AS(WRegion, get_configuration) +ExtlTab region_get_configuration_extl(WRegion *reg, bool clientwins) +{ + ExtlTab tab; + + get_config_clientwins=clientwins; + + tab=region_get_configuration(reg); + + get_config_clientwins=TRUE; + return tab; }