summaryrefslogtreecommitdiff
path: root/battstat
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2013-11-07 22:48:53 +0100
committerMartin Wimpress <[email protected]>2013-12-17 13:09:49 +0000
commit4d1a88869536ba3083a4472c823b379bd63f310d (patch)
treef0e83e8e1625d9b2022090fe485fc05aedd8f409 /battstat
parent7ba607723ded46c1b7137d2fc696ae614f4e2df9 (diff)
downloadmate-applets-4d1a88869536ba3083a4472c823b379bd63f310d.tar.bz2
mate-applets-4d1a88869536ba3083a4472c823b379bd63f310d.tar.xz
battstat applet: ready for upower-1.0
Diffstat (limited to 'battstat')
-rw-r--r--battstat/battstat-upower.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/battstat/battstat-upower.c b/battstat/battstat-upower.c
index 36acb408..55929491 100644
--- a/battstat/battstat-upower.c
+++ b/battstat/battstat-upower.c
@@ -86,10 +86,12 @@ battstat_upower_initialise (void (*callback) (void))
GCancellable *cancellable = g_cancellable_new();
GError *gerror;
+#if !UP_CHECK_VERSION(0, 9, 99)
if (! up_client_enumerate_devices_sync( upc, cancellable, &gerror ) ) {
sprintf(error_str, "Unable to enumerate upower devices: %s\n", gerror->message);
goto error_shutdownclient;
}
+#endif
g_signal_connect_after( upc, "device-changed", device_cb, NULL );
g_signal_connect_after( upc, "device-added", device_cb, NULL );