summaryrefslogtreecommitdiffstats
path: root/gtk/src/settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/settings.c')
-rw-r--r--gtk/src/settings.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
index 2fe0b5e6d..389120351 100644
--- a/gtk/src/settings.c
+++ b/gtk/src/settings.c
@@ -707,6 +707,28 @@ update_widget(GtkWidget *widget, const GValue *value)
}
int
+ghb_ui_update_from_settings(GtkBuilder *builder, const gchar *name, const GValue *settings)
+{
+ GObject *object;
+ GValue * value;
+
+ g_debug("ghb_ui_update_from_settings() %s", name);
+ if (name == NULL)
+ return 0;
+ value = ghb_settings_get_value(settings, name);
+ if (value == NULL)
+ return 0;
+ object = GHB_OBJECT(builder, name);
+ if (object == NULL)
+ {
+ g_debug("Failed to find widget for key: %s\n", name);
+ return -1;
+ }
+ update_widget((GtkWidget*)object, value);
+ return 0;
+}
+
+int
ghb_ui_update(signal_user_data_t *ud, const gchar *name, const GValue *value)
{
GObject *object;