[Xfce4-commits] [xfce/xfce4-power-manager] 14/17: Toggle brightness switch when user changes handle brightness keys option

noreply at xfce.org noreply at xfce.org
Wed Jul 23 22:03:04 CEST 2014


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

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

commit a3dc853fad8b6a2d4e0cb6f7205e14f016a32375
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Jul 23 10:37:59 2014 +0200

    Toggle brightness switch when user changes handle brightness keys option
---
 settings/xfpm-settings.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index a2a5e8e..2aa1266 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -40,6 +40,7 @@
 #include "xfpm-debug.h"
 #include "xfpm-power-common.h"
 #include "xfpm-power.h"
+#include "xfpm-backlight.h"
 
 #include "interfaces/xfpm-settings_ui.h"
 
@@ -561,6 +562,10 @@ brightness_handle_keys_toggled_cb (GtkWidget *w, XfconfChannel *channel)
     {
         g_critical ("Cannot set value for property %s\n", HANDLE_BRIGHTNESS_KEYS);
     }
+    if ( !xfconf_channel_set_int (channel, PROPERTIES_PREFIX BRIGHTNESS_SWITCH, !val) )
+    {
+        g_critical ("Cannot set value for property %s\n", BRIGHTNESS_SWITCH);
+    }
 }
 
 void
@@ -847,12 +852,12 @@ xfpm_settings_on_battery (XfconfChannel *channel, gboolean auth_suspend,
     {
     brg = GTK_WIDGET (gtk_builder_get_object (xml ,"brg-on-battery"));
     brg_level = GTK_WIDGET (gtk_builder_get_object (xml ,"brg-level-on-battery"));
+
     val = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX BRIGHTNESS_ON_BATTERY, 120);
     gtk_range_set_value (GTK_RANGE(brg), val);
 
     val = xfconf_channel_get_uint (channel, PROPERTIES_PREFIX BRIGHTNESS_LEVEL_ON_BATTERY, 20);
     gtk_range_set_value (GTK_RANGE (brg_level), val);
-
     }
     else
     {

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


More information about the Xfce4-commits mailing list