diff -r e79a60b3a7cb -r 7c3ff86ee9d4 ui/gtk/toolkit.c --- 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 +#include +#include +#include #include @@ -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); } }