diff options
-rw-r--r-- | meson.build | 4 | ||||
-rw-r--r-- | panels/power/cc-power-panel.c | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/meson.build b/meson.build index f344112b0..e97f53afe 100644 --- a/meson.build +++ b/meson.build @@ -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) diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c index 71801637c..e5982b978 100644 --- a/panels/power/cc-power-panel.c +++ b/panels/power/cc-power-panel.c @@ -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", |