[Xfce4-commits] [xfce/xfce4-power-manager] 02/07: Add xfconf property for limiting the minimum brightness of the plugin slider

noreply at xfce.org noreply at xfce.org
Tue Aug 5 10:08:45 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 e98aa3ecda39ea5e92902dd1a968a2ff281f10de
Author: Harald Judt <h.judt at gmx.at>
Date:   Mon Aug 4 22:03:14 2014 +0200

    Add xfconf property for limiting the minimum brightness of the plugin slider
    
    Some laptops can turn off the backlight completely by setting the brightness
    to 0. Usually, this is no problem, but in case the brightness keys do not
    work for whatever reason, then the user can own himself and be left in the
    dark, with no easy way to regain control of the backlight.
    
    So as a first step, let's introduce a new xfconf property to track the
    minimum value the plugin slider can be set to.
---
 src/xfpm-config.h |    2 ++
 src/xfpm-xfconf.c |   13 +++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/src/xfpm-config.h b/src/xfpm-config.h
index 581fb1e..092fa29 100644
--- a/src/xfpm-config.h
+++ b/src/xfpm-config.h
@@ -64,6 +64,8 @@ G_BEGIN_DECLS
 #define     	BRIGHTNESS_LEVEL_ON_AC          "brightness-level-on-ac"
 #define     	BRIGHTNESS_LEVEL_ON_BATTERY     "brightness-level-on-battery"
 
+#define     	BRIGHTNESS_SLIDER_MIN_LEVEL     "brightness-slider-min-level"
+
 #define     	CRITICAL_POWER_LEVEL        	"critical-power-level"
 #define     	SHOW_BRIGHTNESS_POPUP        	"show-brightness-popup"
 #define     	HANDLE_BRIGHTNESS_KEYS          "handle-brightness-keys"
diff --git a/src/xfpm-xfconf.c b/src/xfpm-xfconf.c
index 0508bed..bd4cde4 100644
--- a/src/xfpm-xfconf.c
+++ b/src/xfpm-xfconf.c
@@ -70,6 +70,7 @@ enum
     PROP_LID_ACTION_ON_BATTERY,
     PROP_BRIGHTNESS_LEVEL_ON_AC,
     PROP_BRIGHTNESS_LEVEL_ON_BATTERY,
+    PROP_BRIGHTNESS_SLIDER_MIN_LEVEL,
 #ifdef HAVE_DPMS
     PROP_ENABLE_DPMS,
     PROP_DPMS_SLEEP_ON_AC,
@@ -542,6 +543,18 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                                         G_PARAM_READWRITE));
 
 
+    /**
+     * XfpmXfconf::brightness-slider-min-level
+     **/
+    g_object_class_install_property (object_class,
+                                     PROP_BRIGHTNESS_SLIDER_MIN_LEVEL,
+                                     g_param_spec_int (BRIGHTNESS_SLIDER_MIN_LEVEL,
+                                                       NULL, NULL,
+                                                       -1,
+                                                       G_MAXINT32,
+                                                       -1,
+                                                       G_PARAM_READWRITE));
+
 #ifdef WITH_NETWORK_MANAGER
     /**
      * XfpmXfconf::network-manager-sleep

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


More information about the Xfce4-commits mailing list