File updates-dont-use-changed-signal-on-UpClient.patch of Package gnome-settings-daemon

From 178d7b60fb4c8a6859eafbedcd6e073fb51eef22 Mon Sep 17 00:00:00 2001
From: Cosimo Cecchi <cosimoc@gnome.org>
Date: Sat, 18 Jan 2014 16:33:33 -0800
Subject: [PATCH] updates: don't use changed signal on UpClient

This was removed recently from upower; connect to the notification of
the property we're interested in instead.

https://bugzilla.gnome.org/show_bug.cgi?id=724573
---
 plugins/updates/gsd-updates-refresh.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/plugins/updates/gsd-updates-refresh.c b/plugins/updates/gsd-updates-refresh.c
index 7769d54..bb7a198 100644
--- a/plugins/updates/gsd-updates-refresh.c
+++ b/plugins/updates/gsd-updates-refresh.c
@@ -393,8 +393,9 @@ periodic_timeout_cb (gpointer user_data)
 }
 
 static void
-gsd_updates_refresh_client_changed_cb (UpClient *client,
-                                       GsdUpdatesRefresh *refresh)
+gsd_updates_refresh_client_on_battery_cb (UpClient *client,
+					  GParamSpec *pspec,
+					  GsdUpdatesRefresh *refresh)
 {
         gboolean on_battery;
 
@@ -497,8 +498,8 @@ gsd_updates_refresh_init (GsdUpdatesRefresh *refresh)
 
         /* use a UpClient */
         refresh->priv->client = up_client_new ();
-        g_signal_connect (refresh->priv->client, "changed",
-                          G_CALLBACK (gsd_updates_refresh_client_changed_cb), refresh);
+        g_signal_connect (refresh->priv->client, "notify::on-battery",
+                          G_CALLBACK (gsd_updates_refresh_client_on_battery_cb), refresh);
 
         /* get the battery state */
         refresh->priv->on_battery = up_client_get_on_battery (refresh->priv->client);
-- 
1.8.5.3
openSUSE Build Service is sponsored by