Commit 3d686de4 authored by Jeremy Bicha's avatar Jeremy Bicha 🎹 Committed by Georges Basile Stavracas Neto

power: stop using deprecated up_client_get_devices

and bump required upower version to 0.99.8 which
introduced up_client_get_devices2

This is a follow-up from
GNOME/gnome-control-center!82
parent 3cbe926f
......@@ -127,7 +127,7 @@ libxml_dep = dependency('libxml-2.0')
polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
pulse_dep = dependency('libpulse', version: pulse_req_version)
pulse_mainloop_dep = dependency('libpulse-mainloop-glib', version: pulse_req_version)
upower_glib_dep = dependency('upower-glib', version: '>= 0.99.6')
upower_glib_dep = dependency('upower-glib', version: '>= 0.99.8')
x11_dep = dependency('x11')
xi_dep = dependency('xi', version: '>= 1.2')
......@@ -294,4 +294,4 @@ output += ' NetworkManager (Network panel) ............. ' + host_is_linux.t
output += ' Wacom (Wacom tablet panel) ................. ' + host_is_linux_not_s390.to_string() + '\n'
output += ' Wayland .................................... ' + enable_wayland.to_string() + '\n'
message(output)
\ No newline at end of file
message(output)
......@@ -2629,11 +2629,7 @@ cc_power_panel_init (CcPowerPanel *self)
g_signal_connect (self->up_client, "device-added", G_CALLBACK (up_client_device_added), self);
g_signal_connect (self->up_client, "device-removed", G_CALLBACK (up_client_device_removed), self);
self->devices = up_client_get_devices (self->up_client);
/* up_client_get_devices doesn't set a free function, we'll set it so we don't need to do it.
* https://bugs.freedesktop.org/show_bug.cgi?id=106740
*/
g_ptr_array_set_free_func (self->devices, g_object_unref);
self->devices = up_client_get_devices2 (self->up_client);
for (i = 0; self->devices != NULL && i < self->devices->len; i++) {
UpDevice *device = g_ptr_array_index (self->devices, i);
g_signal_connect (G_OBJECT (device), "notify",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment