[Xfce4-commits] [xfce/xfce4-power-manager] 02/04: Hide the battery settings if it's not a laptop

noreply at xfce.org noreply at xfce.org
Tue Jun 10 10:25:12 CEST 2014


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit 1d3832fb1acc17696f41c07f3dc502322132dd0c
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Mon Jun 9 16:42:52 2014 +0200

    Hide the battery settings if it's not a laptop
---
 settings/xfpm-settings.c |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 126e231..508dde7 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -2118,7 +2118,7 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
 			 can_spin_down);
     
     if ( system_laptop )
-	xfpm_settings_on_battery (channel, 
+	xfpm_settings_on_battery (channel,
 				  auth_hibernate, 
 				  auth_suspend, 
 				  can_shutdown, 
@@ -2128,6 +2128,19 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean system_laptop,
 				  has_lid,
 				  devkit_disk,
 				  can_spin_down);
+    else
+    {
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"label18")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"label19")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"label4")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"sleep-dpms-on-battery")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"off-dpms-on-battery")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"brg-on-battery")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"brg-level-on-battery")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"label3")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"inactivity-on-battery")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"on-battery-lid")));
+    }
     
     xfpm_settings_general   (channel, auth_hibernate, auth_suspend, can_shutdown, can_suspend, can_hibernate,
 			     has_sleep_button, has_hibernate_button, has_power_button );

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list