ui/common/context.c

branch
newapi
changeset 335
91d4f0391282
parent 325
99a93a9250c4
child 337
2904fba2708b
equal deleted inserted replaced
334:00be546d3b38 335:91d4f0391282
160 cxListDestroy(ls); 160 cxListDestroy(ls);
161 } 161 }
162 162
163 static UiVar* ctx_getvar(UiContext *ctx, CxHashKey key) { 163 static UiVar* ctx_getvar(UiContext *ctx, CxHashKey key) {
164 UiVar *var = cxMapGet(ctx->vars, key); 164 UiVar *var = cxMapGet(ctx->vars, key);
165 if(!var) { 165 if(!var && ctx->documents) {
166 CxIterator i = cxListIterator(ctx->documents); 166 CxIterator i = cxListIterator(ctx->documents);
167 cx_foreach(void *, doc, i) { 167 cx_foreach(void *, doc, i) {
168 UiContext *subctx = ui_document_context(doc); 168 UiContext *subctx = ui_document_context(doc);
169 var = ctx_getvar(subctx, key); 169 var = ctx_getvar(subctx, key);
170 if(var) { 170 if(var) {

mercurial