summaryrefslogtreecommitdiff
path: root/battstat/battstat-upower.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-11-07 15:58:27 -0800
committerStefano Karapetsas <[email protected]>2013-11-07 15:58:27 -0800
commitca5f767253b95d034568cc24e98c41c47c2f079d (patch)
tree6f7cf32b62d4a84bd71b9db9f446ca16e02add21 /battstat/battstat-upower.c
parentf0f5b7328a9c9ccf2bfe410b1f42cb1112ef03fb (diff)
parentf17654d853e603b1e4c6c22ffb1abbd6b364f4dc (diff)
downloadmate-applets-ca5f767253b95d034568cc24e98c41c47c2f079d.tar.bz2
mate-applets-ca5f767253b95d034568cc24e98c41c47c2f079d.tar.xz
Merge pull request #63 from NiceandGently/master
battstat applet: ready for upower-1.0
Diffstat (limited to 'battstat/battstat-upower.c')
-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 );