ui/motif/list.c

branch
newapi
changeset 176
bc63cb601f6d
parent 153
ee49d1852a5f
--- a/ui/motif/list.c	Mon May 22 19:44:27 2023 +0200
+++ b/ui/motif/list.c	Mon May 22 21:21:20 2023 +0200
@@ -61,7 +61,7 @@
     ct->add(ct, XtParent(widget));
     XtManageChild(widget);
     
-    UiListView *listview = ucx_mempool_malloc(obj->ctx->mempool, sizeof(UiListView));
+    UiListView *listview = cxMalloc(obj->ctx->allocator, sizeof(UiListView));
     listview->widget = widget;
     listview->list = var;
     listview->getvalue = getvalue;
@@ -72,8 +72,8 @@
     XtFree((char *)items);
     
     if(f) {
-        UiListViewEventData *event = ucx_mempool_malloc(
-                obj->ctx->mempool,
+        UiListViewEventData *event = cxMalloc(
+                obj->ctx->allocator,
                 sizeof(UiListViewEventData));
         event->event.obj = obj;
         event->event.userdata = udata;
@@ -182,8 +182,8 @@
 }
 
 UIWIDGET ui_combobox_var(UiObject *obj, UiVar *var, ui_getvaluefunc getvalue, ui_callback f, void *udata) {
-    UiListView *listview = ucx_mempool_malloc(
-                obj->ctx->mempool,
+    UiListView *listview = cxMalloc(
+                obj->ctx->allocator,
                 sizeof(UiListView));
     
     UiContainer *ct = uic_get_current_container(obj);
@@ -204,4 +204,5 @@
     
     ui_listview_update(NULL, listview);
     
+    return parent;
 }

mercurial