summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-01 02:43:47 -0800
committerStefano Karapetsas <[email protected]>2014-01-01 02:43:47 -0800
commitd64ec1da62f34c0a51e5bced950b165ab9f60477 (patch)
tree9244cd956515667cfa4feb85e8e577903855ee8e
parent815258bb924c3d5f41636714888909eafd3ffe1c (diff)
parent1e464e89fa0305266e72e3fce43f49e59b4a8ef8 (diff)
downloadmate-applets-d64ec1da62f34c0a51e5bced950b165ab9f60477.tar.bz2
mate-applets-d64ec1da62f34c0a51e5bced950b165ab9f60477.tar.xz
Merge pull request #64 from NiceandGently/master
battstat: more adjustments for upower-1.0
-rw-r--r--battstat/battstat-upower.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/battstat/battstat-upower.c b/battstat/battstat-upower.c
index 55929491..f42de3fd 100644
--- a/battstat/battstat-upower.c
+++ b/battstat/battstat-upower.c
@@ -86,14 +86,17 @@ battstat_upower_initialise (void (*callback) (void))
GCancellable *cancellable = g_cancellable_new();
GError *gerror;
-#if !UP_CHECK_VERSION(0, 9, 99)
+#if !UP_CHECK_VERSION(0, 99, 0)
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
-
+#if UP_CHECK_VERSION(0, 99, 0)
+ g_signal_connect_after( upc, "notify", device_cb, NULL );
+#else
g_signal_connect_after( upc, "device-changed", device_cb, NULL );
+#endif
g_signal_connect_after( upc, "device-added", device_cb, NULL );
g_signal_connect_after( upc, "device-removed", device_cb, NULL );