[Xfce4-commits] [xfce/xfce4-power-manager] 06/17: Add callback code for handle brightness keys option

noreply at xfce.org noreply at xfce.org
Wed Jul 23 22:02:56 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 08a4fd3da429b26e2a2491a24a2bc9cff6e6eeb1
Author: Harald Judt <h.judt at gmx.at>
Date:   Sat Jul 19 12:04:08 2014 +0200

    Add callback code for handle brightness keys option
---
 settings/xfpm-settings.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/settings/xfpm-settings.c b/settings/xfpm-settings.c
index 1662b8f..a2a5e8e 100644
--- a/settings/xfpm-settings.c
+++ b/settings/xfpm-settings.c
@@ -147,6 +147,9 @@ gchar      *format_brightness_percentage_cb        (GtkScale *scale,
 						    gdouble value,
 						    gpointer data);
 
+void        brightness_handle_keys_toggled_cb      (GtkWidget *w,
+						    XfconfChannel *channel);
+
 void        brightness_on_battery_value_changed_cb (GtkWidget *w, 
 						    XfconfChannel *channel);
 
@@ -550,6 +553,17 @@ format_brightness_percentage_cb (GtkScale *scale, gdouble value, gpointer data)
 }
 
 void
+brightness_handle_keys_toggled_cb (GtkWidget *w, XfconfChannel *channel)
+{
+    gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(w));
+
+    if ( !xfconf_channel_set_bool (channel, PROPERTIES_PREFIX HANDLE_BRIGHTNESS_KEYS, val) )
+    {
+        g_critical ("Cannot set value for property %s\n", HANDLE_BRIGHTNESS_KEYS);
+    }
+}
+
+void
 brightness_on_battery_value_changed_cb (GtkWidget *w, XfconfChannel *channel)
 {
     gint value    = (gint)gtk_range_get_value (GTK_RANGE (w));

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


More information about the Xfce4-commits mailing list