[Xfce4-commits] [panel-plugins/xfce4-systemload-plugin] 01/01: Update for Upower 0.99

noreply at xfce.org noreply at xfce.org
Thu Jun 12 22:43:52 CEST 2014


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository panel-plugins/xfce4-systemload-plugin.

commit abdcb383f380bf7a048cf512fa079581321b64fa
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri May 30 19:12:02 2014 +0300

    Update for Upower 0.99
    
    Upower 0.99 changed from the "changed" signal to "notify" as well as
    the function signature. This patch adds that while still supporting
    the previous versions of upower.
---
 panel-plugin/systemload.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index c0572a3..30636e9 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -624,11 +624,15 @@ monitor_set_orientation (XfcePanelPlugin *plugin, GtkOrientation orientation,
 
 #ifdef HAVE_UPOWER_GLIB
 static void
+#if UP_CHECK_VERSION(0, 99, 0)
+upower_changed_cb(UpClient *client, GParamSpec *pspec, t_global_monitor *global)
+#else /* UP_CHECK_VERSION < 0.99 */
 upower_changed_cb(UpClient *client, t_global_monitor *global)
+#endif /* UP_CHECK_VERSION */
 {
     setup_timer(global);
 }
-#endif
+#endif /* HAVE_UPOWER_GLIB */
 
 static void
 entry_changed_cb(GtkEntry *entry, t_global_monitor *global)
@@ -925,10 +929,15 @@ systemload_construct (XfcePanelPlugin *plugin)
 
 #ifdef HAVE_UPOWER_GLIB
     if (global->upower) {
+#if UP_CHECK_VERSION(0, 99, 0)
+        g_signal_connect (global->upower, "notify",
+                          G_CALLBACK(upower_changed_cb), global);
+#else /* UP_CHECK_VERSION < 0.99 */
         g_signal_connect (global->upower, "changed",
                           G_CALLBACK(upower_changed_cb), global);
+#endif /* UP_CHECK_VERSION */
     }
-#endif
+#endif /* HAVE_UPOWER_GLIB */
     
     g_signal_connect (plugin, "free-data", G_CALLBACK (monitor_free), global);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list