diff options
author | raveit65 <[email protected]> | 2020-07-14 13:50:34 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-07-14 16:19:54 +0200 |
commit | f7a5d24430d8cb33f1c4227c5a1753f2aacb6bb2 (patch) | |
tree | 35fc9cc10669dec04cec8647351d13cc197f10fb /battstat/battstat-upower.c | |
parent | 06feef78296f3a2d3a5a3d1f653d38e7bf122015 (diff) | |
download | mate-applets-f7a5d24430d8cb33f1c4227c5a1753f2aacb6bb2.tar.bz2 mate-applets-f7a5d24430d8cb33f1c4227c5a1753f2aacb6bb2.tar.xz |
battstat: bump upower required version and drop legacy code
Diffstat (limited to 'battstat/battstat-upower.c')
-rw-r--r-- | battstat/battstat-upower.c | 16 |
1 files changed, 0 insertions, 16 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; |