ui/gtk/toolkit.c

branch
newapi
changeset 174
0358f1d9c506
parent 167
161511838ea6
child 253
087cc9216f28
--- a/ui/gtk/toolkit.c	Sat Apr 15 21:06:45 2023 +0200
+++ b/ui/gtk/toolkit.c	Mon May 22 16:17:26 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