MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / ghb_ui_update_from_settings

Function ghb_ui_update_from_settings

gtk/src/settings.c:438–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438int
439ghb_ui_update_from_settings (const char *name, const GhbValue *settings)
440{
441 GObject *object;
442 GhbValue * value;
443 signal_user_data_t *ud = ghb_ud();
444
445 ghb_log_func_str(name);
446 if (name == NULL)
447 return 0;
448 value = ghb_dict_get_value(settings, name);
449 if (value == NULL)
450 return 0;
451 object = ghb_builder_object(name);
452 if (object == NULL)
453 {
454 g_debug("Failed to find widget for key: %s", name);
455 return -1;
456 }
457 ghb_update_widget((GtkWidget*)object, value);
458 // Its possible the value hasn't changed. Since settings are only
459 // updated when the value changes, I'm initializing settings here as well.
460 ghb_widget_to_setting(ud->settings, (GtkWidget*)object);
461 return 0;
462}
463
464int
465ghb_ui_update (const gchar *name, const GhbValue *value)

Callers 2

ghb_set_scaleFunction · 0.85
meta_pass_changed_cbFunction · 0.85

Calls 5

ghb_udFunction · 0.85
ghb_dict_get_valueFunction · 0.85
ghb_builder_objectFunction · 0.85
ghb_update_widgetFunction · 0.85
ghb_widget_to_settingFunction · 0.85

Tested by

no test coverage detected