298 ui_destroy_boundvar(data->obj->ctx, data->var); |
298 ui_destroy_boundvar(data->obj->ctx, data->var); |
299 } |
299 } |
300 free(data); |
300 free(data); |
301 } |
301 } |
302 |
302 |
|
303 void ui_destroy_widget_var(GtkWidget *object, UiVar *var) { |
|
304 ui_destroy_boundvar(NULL, var); |
|
305 } |
|
306 |
303 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
307 void ui_destroy_boundvar(UiContext *ctx, UiVar *var) { |
304 uic_unbind_var(var); |
308 uic_unbind_var(var); |
305 |
309 |
306 if(var->type == UI_VAR_SPECIAL) { |
310 if(var->type == UI_VAR_SPECIAL) { |
307 ui_free(var->from_ctx, var); |
311 ui_free(var->from_ctx, var); |
360 " background-color: red;\n" |
364 " background-color: red;\n" |
361 "}\n" |
365 "}\n" |
362 ".ui_label_title {\n" |
366 ".ui_label_title {\n" |
363 " font-weight: bold;\n" |
367 " font-weight: bold;\n" |
364 "}\n" |
368 "}\n" |
|
369 ".ui-listbox-header {\n" |
|
370 " font-weight: bold;\n" |
|
371 " margin-left: 10px;\n" |
|
372 " margin-top: 12px;\n" |
|
373 " margin-bottom: 10px;\n" |
|
374 "}\n" |
|
375 ".ui-listbox-header-first {\n" |
|
376 " font-weight: bold;\n" |
|
377 " margin-left: 10px;\n" |
|
378 " margin-top: 4px;\n" |
|
379 " margin-bottom: 10px;\n" |
|
380 "}\n" |
365 ; |
381 ; |
366 |
382 |
367 #elif GTK_MAJOR_VERSION == 3 |
383 #elif GTK_MAJOR_VERSION == 3 |
368 static const char *ui_gtk_css = |
384 static const char *ui_gtk_css = |
369 "#path-textfield-box {\n" |
385 "#path-textfield-box {\n" |
378 " background-color: red;\n" |
394 " background-color: red;\n" |
379 "}\n" |
395 "}\n" |
380 ".ui_label_title {\n" |
396 ".ui_label_title {\n" |
381 " font-weight: bold;\n" |
397 " font-weight: bold;\n" |
382 "}\n" |
398 "}\n" |
|
399 "placessidebar row {\n" |
|
400 " padding-left: 10px;\n" |
|
401 "}\n" |
|
402 ".ui-listbox-header {\n" |
|
403 " font-weight: bold;\n" |
|
404 " margin-left: 10px;\n" |
|
405 " margin-top: 12px;\n" |
|
406 " margin-bottom: 10px;\n" |
|
407 "}\n" |
|
408 ".ui-listbox-header-first {\n" |
|
409 " font-weight: bold;\n" |
|
410 " margin-left: 10px;\n" |
|
411 " margin-top: 4px;\n" |
|
412 " margin-bottom: 10px;\n" |
|
413 "}\n" |
383 ; |
414 ; |
384 #endif |
415 #endif |
385 |
416 |
386 void ui_css_init(void) { |
417 void ui_css_init(void) { |
387 ui_gtk_css_provider = gtk_css_provider_new(); |
418 ui_gtk_css_provider = gtk_css_provider_new(); |