[gnome-control-center] power: Only show the 'When power is critically low' when there is a laptop battery or UPS attached.



commit e51ff4001b7fb2f0dbf38e62cc2f5ccc350b6383
Author: Richard Hughes <richard hughsie com>
Date:   Thu Apr 28 11:33:14 2011 +0100

    power: Only show the 'When power is critically low' when there is a laptop battery or UPS attached.
    
    This fixes https://bugzilla.gnome.org/show_bug.cgi?id=646053

 panels/power/cc-power-panel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index fe215fb..45a89ce 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -483,6 +483,9 @@ set_ac_battery_ui_mode (CcPowerPanel *self)
   g_ptr_array_unref (devices);
 out:
   widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
+                                               "vbox_actions"));
+  gtk_widget_set_visible (widget, has_batteries);
+  widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,
                                                "vbox_battery"));
   gtk_widget_set_visible (widget, has_batteries);
   widget = GTK_WIDGET (gtk_builder_get_object (priv->builder,



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