| 484 | } |
| 485 | |
| 486 | int |
| 487 | ghb_ui_settings_update( |
| 488 | signal_user_data_t *ud, |
| 489 | GhbValue *settings, |
| 490 | const gchar *name, |
| 491 | const GhbValue *value) |
| 492 | { |
| 493 | GObject *object; |
| 494 | |
| 495 | ghb_log_func_str(name); |
| 496 | if (name == NULL || value == NULL) |
| 497 | return 0; |
| 498 | object = ghb_builder_object(name); |
| 499 | if (object == NULL) |
| 500 | { |
| 501 | g_debug("Failed to find widget for key: %s", name); |
| 502 | return -1; |
| 503 | } |
| 504 | ghb_update_widget((GtkWidget*)object, value); |
| 505 | // Its possible the value hasn't changed. Since settings are only |
| 506 | // updated when the value changes, I'm initializing settings here as well. |
| 507 | ghb_widget_to_setting(settings, (GtkWidget*)object); |
| 508 | return 0; |
| 509 | } |
no test coverage detected