[gnome-control-center] power: Fix build



commit ceafe6f4c51452b731c165808eebc8334bf58df9
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Oct 17 16:52:36 2013 +0200

    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 files changed, 0 insertions(+), 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]