gnome-control-center/gnome-control-center-upower-fix-build.patch

51 lines
1.4 KiB
Diff
Raw Normal View History

From ceafe6f4c51452b731c165808eebc8334bf58df9 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Thu, 17 Oct 2013 16:52:36 +0200
Subject: [PATCH] power: Fix build
up_client_enumerate_devices_sync() was removed.
https://bugzilla.gnome.org/show_bug.cgi?id=710393
---
panels/power/cc-power-panel.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index cab6b4a..fccc994 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -1095,22 +1095,11 @@ static void
set_ac_battery_ui_mode (CcPowerPanel *self)
{
gboolean has_batteries = FALSE;
- gboolean ret;
- GError *error = NULL;
GPtrArray *devices;
guint i;
UpDevice *device;
UpDeviceKind kind;
- /* this is sync, but it's cached in the daemon and so quick */
- ret = up_client_enumerate_devices_sync (self->priv->up_client, NULL, &error);
- if (!ret)
- {
- g_warning ("failed to get device list: %s", error->message);
- g_error_free (error);
- goto out;
- }
-
devices = up_client_get_devices (self->priv->up_client);
g_debug ("got %d devices from upower\n", devices->len);
@@ -1131,7 +1120,6 @@ set_ac_battery_ui_mode (CcPowerPanel *self)
has_batteries = FALSE;
#endif
-out:
self->priv->has_batteries = has_batteries;
gtk_widget_set_visible (self->priv->critical_battery_row, has_batteries);
--
1.8.4