--- a/ui/gtk/container.c Sun Apr 16 10:20:21 2023 +0200 +++ b/ui/gtk/container.c Tue May 23 11:11:28 2023 +0200 @@ -69,8 +69,8 @@ /* -------------------- Frame Container (deprecated) -------------------- */ UiContainer* ui_frame_container(UiObject *obj, GtkWidget *frame) { - UiContainer *ct = ucx_mempool_calloc( - obj->ctx->mempool, + UiContainer *ct = cxCalloc( + obj->ctx->allocator, 1, sizeof(UiContainer)); ct->widget = frame; @@ -87,8 +87,8 @@ /* -------------------- Box Container -------------------- */ UiContainer* ui_box_container(UiObject *obj, GtkWidget *box) { - UiBoxContainer *ct = ucx_mempool_calloc( - obj->ctx->mempool, + UiBoxContainer *ct = cxCalloc( + obj->ctx->allocator, 1, sizeof(UiBoxContainer)); ct->container.widget = box; @@ -118,8 +118,8 @@ } UiContainer* ui_grid_container(UiObject *obj, GtkWidget *grid) { - UiGridContainer *ct = ucx_mempool_calloc( - obj->ctx->mempool, + UiGridContainer *ct = cxCalloc( + obj->ctx->allocator, 1, sizeof(UiGridContainer)); ct->container.widget = grid; @@ -202,8 +202,8 @@ #endif UiContainer* ui_scrolledwindow_container(UiObject *obj, GtkWidget *scrolledwindow) { - UiContainer *ct = ucx_mempool_calloc( - obj->ctx->mempool, + UiContainer *ct = cxCalloc( + obj->ctx->allocator, 1, sizeof(UiContainer)); ct->widget = scrolledwindow; @@ -223,8 +223,8 @@ } UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview) { - UiTabViewContainer *ct = ucx_mempool_calloc( - obj->ctx->mempool, + UiTabViewContainer *ct = cxCalloc( + obj->ctx->allocator, 1, sizeof(UiTabViewContainer)); ct->container.widget = tabview; @@ -408,8 +408,8 @@ if(max <= 0) max = INT_MAX; - UiPanedContainer *pctn = ucx_mempool_calloc( - obj->ctx->mempool, + UiPanedContainer *pctn = cxCalloc( + obj->ctx->allocator, 1, sizeof(UiPanedContainer)); pctn->container.widget = paned; @@ -482,8 +482,9 @@ left->container = ct1; UiObject *right = uic_object_new(obj, sidebar); - UiContainer *ct2 = ucx_mempool_malloc( - obj->ctx->mempool, + UiContainer *ct2 = cxCalloc( + obj->ctx->allocator, + 1, sizeof(UiContainer)); ct2->widget = paned; ct2->add = ui_split_container_add2; @@ -557,7 +558,7 @@ UiObject *tab = ui_malloc(view->ctx, sizeof(UiObject)); tab->widget = NULL; // initialization for uic_context() - tab->ctx = uic_context(tab, view->ctx->mempool); + tab->ctx = uic_context(tab, view->ctx->allocator); tab->ctx->parent = view->ctx; tab->ctx->attach_document = uic_context_attach_document; tab->ctx->detach_document2 = uic_context_detach_document2;