224 |
224 |
225 void ui_destroy_userdata(GtkWidget *object, void *userdata) { |
225 void ui_destroy_userdata(GtkWidget *object, void *userdata) { |
226 free(userdata); |
226 free(userdata); |
227 } |
227 } |
228 |
228 |
|
229 void ui_destroy_vardata(GtkWidget *object, UiVarEventData *data) { |
|
230 ui_destroy_boundvar(data->obj->ctx, data->var); |
|
231 free(data); |
|
232 } |
|
233 |
229 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
234 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
230 if(var->type == UI_VAR_SPECIAL) { |
235 if(var->type == UI_VAR_SPECIAL) { |
231 free(var); |
236 free(var); |
232 } else { |
237 } else { |
233 uic_remove_bound_var(ctx, var); |
238 uic_remove_bound_var(ctx, var); |