diff -r 853685152c1d -r dd0ae1c62a72 ui/common/types.c --- a/ui/common/types.c Sun Nov 12 12:03:50 2017 +0100 +++ b/ui/common/types.c Thu Nov 16 12:04:10 2017 +0100 @@ -90,7 +90,7 @@ /* --------------------------- UiList --------------------------- */ -UiList* ui_list_new(void) { +UiList* ui_list_new(UiContext *ctx, char *name) { UiList *list = malloc(sizeof(UiList)); list->first = ui_list_first; list->next = ui_list_next; @@ -104,6 +104,10 @@ list->update = NULL; list->obj = NULL; + if(name) { + uic_reg_var(ctx, name, UI_VAR_LIST, list); + } + return list; } @@ -167,7 +171,7 @@ char *name; } UiColumn; -UiModel* ui_model_info(UiContext *ctx, ...) { +UiModel* ui_model(UiContext *ctx, ...) { UiModel *info = ui_calloc(ctx, 1, sizeof(UiModel)); va_list ap; @@ -205,7 +209,7 @@ return info; } -void ui_model_info_free(UiContext *ctx, UiModel *mi) { +void ui_model_free(UiContext *ctx, UiModel *mi) { ucx_mempool_free(ctx->mempool, mi->types); ucx_mempool_free(ctx->mempool, mi->titles); ucx_mempool_free(ctx->mempool, mi);