| 435 | }; |
| 436 | |
| 437 | void |
| 438 | ghb_bind_dependencies (void) |
| 439 | { |
| 440 | GhbBinding *binding; |
| 441 | GObject *source, *target; |
| 442 | GBindingTransformFunc func; |
| 443 | int n_bindings = sizeof(widget_bindings) / sizeof(GhbBinding); |
| 444 | |
| 445 | for (int i = 0; i < n_bindings; i++) |
| 446 | { |
| 447 | |
| 448 | binding = &widget_bindings[i]; |
| 449 | func = (GBindingTransformFunc) (binding->invert ? |
| 450 | ghb_bind_property_inverted : |
| 451 | ghb_bind_property); |
| 452 | source = ghb_builder_object(binding->source_widget); |
| 453 | if (!G_IS_OBJECT(source)) |
| 454 | g_warning("Invalid object name: %s", binding->source_widget); |
| 455 | |
| 456 | target = ghb_builder_object(binding->target_widget); |
| 457 | if (!G_IS_OBJECT(target)) |
| 458 | g_warning("Invalid object name: %s", binding->target_widget); |
| 459 | |
| 460 | g_object_bind_property_full(source, binding->source_property, |
| 461 | target, binding->target_property, |
| 462 | binding->flags | G_BINDING_SYNC_CREATE, |
| 463 | func, NULL, |
| 464 | (gpointer) gettext(binding->source_property_values), |
| 465 | NULL); |
| 466 | } |
| 467 | } |
| 468 | |
| 469 | static void |
| 470 | application_quit (void) |
no test coverage detected