ui/gtk/toolkit.c

branch
newapi
changeset 178
7c3ff86ee9d4
parent 174
0358f1d9c506
child 253
087cc9216f28
--- a/ui/gtk/toolkit.c	Sun Apr 16 10:20:21 2023 +0200
+++ b/ui/gtk/toolkit.c	Tue May 23 11:11:28 2023 +0200
@@ -38,7 +38,9 @@
 #include "../common/document.h"
 #include "../common/properties.h"
 
-#include <ucx/utils.h>
+#include <cx/utils.h>
+#include <cx/string.h>
+#include <cx/printf.h>
 
 #include <pthread.h>
 
@@ -118,7 +120,7 @@
 
 void ui_main() {
 #ifndef UI_GTK2
-    sstr_t appid = ucx_sprintf(
+    cxmutstr appid = cx_asprintf(
             "ui.%s",
             application_name ? application_name : "application1");
     
@@ -246,10 +248,14 @@
 }
 
 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) {
+    uic_unbind_var(var);
+    
     if(var->type == UI_VAR_SPECIAL) {
         free(var);
     } else {
-        uic_remove_bound_var(ctx, var);
+        ui_free(var->from_ctx, var);
+        // TODO: free or unbound
+        //uic_remove_bound_var(ctx, var);
     }
 }
 

mercurial