[gnome-settings-daemon] updates: don't use changed signal on UpClient



commit 772aaac99d7ad6e933432ed1ab9fcb38d9ddd623
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Jan 18 16:33:33 2014 -0800

    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 files 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]