summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--panels/display/cc-night-light-dialog.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/panels/display/cc-night-light-dialog.c b/panels/display/cc-night-light-dialog.c
index 1d03ba393..b26b9e3e5 100644
--- a/panels/display/cc-night-light-dialog.c
+++ b/panels/display/cc-night-light-dialog.c
@@ -386,13 +386,18 @@ static void
dialog_got_proxy_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
CcNightLightDialog *self = (CcNightLightDialog *) user_data;
+ GDBusProxy *proxy;
g_autoptr(GError) error = NULL;
- self->proxy_color = cc_object_storage_create_dbus_proxy_finish (res, &error);
- if (self->proxy_color == NULL)
+
+ proxy = cc_object_storage_create_dbus_proxy_finish (res, &error);
+ if (proxy == NULL)
{
g_warning ("failed to connect to g-s-d: %s", error->message);
return;
}
+
+ self->proxy_color = proxy;
+
g_signal_connect_object (self->proxy_color, "g-properties-changed",
G_CALLBACK (dialog_color_properties_changed_cb), self, 0);
dialog_update_state (self);
@@ -403,13 +408,17 @@ static void
dialog_got_proxy_props_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
CcNightLightDialog *self = (CcNightLightDialog *) user_data;
+ GDBusProxy *proxy;
g_autoptr(GError) error = NULL;
- self->proxy_color_props = cc_object_storage_create_dbus_proxy_finish (res, &error);
- if (self->proxy_color_props == NULL)
+
+ proxy = cc_object_storage_create_dbus_proxy_finish (res, &error);
+ if (proxy == NULL)
{
g_warning ("failed to connect to g-s-d: %s", error->message);
return;
}
+
+ self->proxy_color_props = proxy;
}
static gboolean