summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--battstat/battstat-upower.c16
-rw-r--r--configure.ac2
2 files changed, 1 insertions, 17 deletions
diff --git a/battstat/battstat-upower.c b/battstat/battstat-upower.c
index 2e8b4b4c..042d6098 100644
--- a/battstat/battstat-upower.c
+++ b/battstat/battstat-upower.c
@@ -67,12 +67,10 @@ device_cb (UpClient *client, UpDevice *device, gpointer user_data) {
schedule_status_callback();
}
-#if UP_CHECK_VERSION (0, 99, 0)
static void
device_removed_cb (UpClient *client, const gchar *object_path, gpointer user_data) {
schedule_status_callback();
}
-#endif
/* ---- public functions ---- */
@@ -87,29 +85,15 @@ battstat_upower_initialise (void (*callback) (void))
if( (upc = up_client_new() ) == NULL )
goto error_out;
-#if UP_CHECK_VERSION(0, 99, 0)
GPtrArray *devices;
devices = up_client_get_devices2 (upc);
if (!devices) {
goto error_shutdownclient;
}
g_ptr_array_unref(devices);
-#else
- GError *gerror;
- GCancellable *cancellable = g_cancellable_new ();
- if (! up_client_enumerate_devices_sync (upc, cancellable, &gerror)) {
- g_debug ("Unable to enumerate upower devices: %s\n", gerror->message);
- goto error_shutdownclient;
- }
-#endif
g_signal_connect_after( upc, "device-added", G_CALLBACK (device_cb), NULL );
-#if UP_CHECK_VERSION(0, 99, 0)
g_signal_connect_after( upc, "device-removed", G_CALLBACK (device_removed_cb), NULL );
-#else
- g_signal_connect_after( upc, "device-changed", G_CALLBACK (device_cb), NULL );
- g_signal_connect_after( upc, "device-removed", G_CALLBACK (device_cb), NULL );
-#endif
return NULL;
diff --git a/configure.ac b/configure.ac
index f6a7e817..14302952 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ GTK_REQUIRED=3.22.0
LIBPANEL4_REQUIRED=1.17.0
LIBGTOP_REQUIRED=2.12.0
LIBNOTIFY_REQUIRED=0.7.0
-UPOWER_REQUIRED=0.9.4
+UPOWER_REQUIRED=0.99.8
DBUS_GLIB_REQUIRED=0.74
LIBXML_REQUIRED=2.5.0
POLKIT_REQUIRED=0.97