summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2015-03-10 20:01:27 +0100
committerStefano Karapetsas <[email protected]>2015-03-10 20:01:27 +0100
commit14a209aecb1390a1490e2c7915f33f816380bb84 (patch)
treec7dabf2ab7ca044f4acc8b28bf323f01550e5a71
parent1ebfda491775364cd3476989f12f8de120f695cf (diff)
parent0376255e93e11d06e368d468de7c1c804e4b4c9c (diff)
downloadmate-session-manager-14a209aecb1390a1490e2c7915f33f816380bb84.tar.bz2
mate-session-manager-14a209aecb1390a1490e2c7915f33f816380bb84.tar.xz
Merge pull request #73 from monsta/fix-for-new-glib-1.8
[1.8] first connect to settings, then read them.
-rw-r--r--capplet/gsm-properties-dialog.c5
-rw-r--r--mate-session/gsm-autostart-app.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c
index c920882..694690a 100644
--- a/capplet/gsm-properties-dialog.c
+++ b/capplet/gsm-properties-dialog.c
@@ -671,13 +671,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),
diff --git a/mate-session/gsm-autostart-app.c b/mate-session/gsm-autostart-app.c
index 04cc8e6..37c2228 100644
--- a/mate-session/gsm-autostart-app.c
+++ b/mate-session/gsm-autostart-app.c
@@ -307,13 +307,14 @@ setup_gsettings_condition_monitor (GsmAutostartApp *app,
return FALSE;
settings = g_settings_new (elems[0]);
- retval = g_settings_get_boolean (settings, elems[1]);
signal = g_strdup_printf ("changed::%s", elems[1]);
g_signal_connect (G_OBJECT (settings), signal,
G_CALLBACK (gsettings_condition_cb), app);
g_free (signal);
+ retval = g_settings_get_boolean (settings, elems[1]);
+
app->priv->condition_settings = settings;
g_strfreev (elems);