[Xfce4-commits] [xfce/xfce4-power-manager] 01/03: Do not remove brightness tab, only hide it

noreply at xfce.org noreply at xfce.org
Tue Jul 15 00:39:34 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 b49756c8bc8145aa77f1892c25887afe45a90415
Author: Harald Judt <h.judt at gmx.at>
Date:   Mon Jul 14 19:55:22 2014 +0200

    Do not remove brightness tab, only hide it
    
    ... and fix hiding battery stuff on the brightness tab if the laptop
    has no battery.
---
 settings/xfpm-settings.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 745d6a0..b68bde7 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -871,7 +871,7 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
     }
     else
     {
-    gtk_notebook_remove_page (GTK_NOTEBOOK (nt), 3);
+    gtk_widget_hide (gtk_notebook_get_nth_page (GTK_NOTEBOOK (nt), 3));
     }
 
 }
@@ -990,7 +990,7 @@ xfpm_settings_on_ac (XfconfChannel *channel, gboolean auth_suspend,
 	}
 	else
 	{
-	gtk_notebook_remove_page (GTK_NOTEBOOK (nt), 3);
+	gtk_widget_hide (gtk_notebook_get_nth_page (GTK_NOTEBOOK (nt), 3));
 	}
 
 }
@@ -2033,6 +2033,8 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean auth_suspend,
 	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"display_pluggedin")));
 	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 ,"brightness_onbattery")));
+	gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (xml ,"brightness_pluggedin")));
 	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 ,"system_onbattery")));

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


More information about the Xfce4-commits mailing list