From 3d686de41c68bca8d268bcc67fdd2112ee9015e6 Mon Sep 17 00:00:00 2001 From: Jeremy Bicha Date: Tue, 4 Dec 2018 16:47:31 -0500 Subject: 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 https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/82 --- panels/power/cc-power-panel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'panels/power') 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", -- cgit v1.2.1