From 27954f902adfb2e3b446a5e08b0632c0b20f64bf Mon Sep 17 00:00:00 2001 From: Monsta Date: Thu, 19 Feb 2015 17:36:25 +0300 Subject: first connect to settings, then read them. fixes the issue with GLib >= 2.43, https://git.gnome.org/browse/glib/commit/?id=8ff5668a458344da22d30491e3ce726d861b3619 Closes https://github.com/mate-desktop/mate-session-manager/pull/72 --- capplet/gsm-properties-dialog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'capplet') diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c index 98ea0fc..32f4aff 100644 --- a/capplet/gsm-properties-dialog.c +++ b/capplet/gsm-properties-dialog.c @@ -659,13 +659,14 @@ setup_dialog (GsmPropertiesDialog *dialog) button = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, CAPPLET_REMEMBER_WIDGET_NAME)); dialog->priv->remember_toggle = button; - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), - g_settings_get_boolean (dialog->priv->settings, SPC_AUTOSAVE_KEY)); + g_signal_connect (dialog->priv->settings, "changed::" SPC_AUTOSAVE_KEY, G_CALLBACK (on_autosave_value_notify), dialog); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), + g_settings_get_boolean (dialog->priv->settings, SPC_AUTOSAVE_KEY)); g_signal_connect (button, "toggled", G_CALLBACK (on_autosave_value_toggled), -- cgit v1.2.1