ui/gtk/toolkit.c

changeset 796
4d04cb879daa
parent 795
d466b6edfebc
child 853
380ec881faa2
equal deleted inserted replaced
795:d466b6edfebc 796:4d04cb879daa
320 320
321 void ui_destroy_widget_var(GtkWidget *object, UiVar *var) { 321 void ui_destroy_widget_var(GtkWidget *object, UiVar *var) {
322 ui_destroy_boundvar(NULL, var); 322 ui_destroy_boundvar(NULL, var);
323 } 323 }
324 324
325 // TODO: move to common
325 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { 326 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) {
327 uic_save_var(var);
326 uic_unbind_var(var); 328 uic_unbind_var(var);
327 329
330 // UI_VAR_SPECIAL: anonymous value variable, that is not registered
331 // in ctx->vars
328 if(var->type == UI_VAR_SPECIAL) { 332 if(var->type == UI_VAR_SPECIAL) {
329 ui_free(var->from_ctx, var); 333 ui_free(var->from_ctx, var);
330 } else {
331 ui_free(var->from_ctx, var);
332 // TODO: free or unbound
333 //uic_remove_bound_var(ctx, var);
334 } 334 }
335 } 335 }
336 336
337 void ui_set_active_window(UiObject *obj) { 337 void ui_set_active_window(UiObject *obj) {
338 active_window = obj; 338 active_window = obj;

mercurial