[Xfce4-commits] <xfce4-power-manager:master> Fix on ac brightness dimming timeout

Ali Abdallah noreply at xfce.org
Mon Sep 28 15:16:01 CEST 2009


Updating branch refs/heads/master
         to e031e0f91c40c44620c1224c79e5b60008a1ec82 (commit)
       from 2b78e2cc4ff105c361722b88be36a19f475b3c38 (commit)

commit e031e0f91c40c44620c1224c79e5b60008a1ec82
Author: Ali Abdallah <ali at ali-xfce.org>
Date:   Mon Sep 28 15:13:17 2009 +0000

    Fix on ac brightness dimming timeout

 src/xfpm-brightness-hal.c |   18 +++++++++---------
 src/xfpm-xfconf.c         |    6 +++---
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/xfpm-brightness-hal.c b/src/xfpm-brightness-hal.c
index 3df73d4..75a36b1 100644
--- a/src/xfpm-brightness-hal.c
+++ b/src/xfpm-brightness-hal.c
@@ -385,37 +385,37 @@ xfpm_brightness_hal_inhibit_changed_cb (XfpmScreenSaver *saver, gboolean inhibit
 }
 
 static void
-xfpm_brightness_get_user_timeouts (XfpmBrightnessHal *brg, guint16 *on_ac, guint16 *on_battery)
+xfpm_brightness_get_user_timeouts (XfpmBrightnessHal *brg, guint *timeout_on_ac, guint *timeout_on_battery)
 {
     g_object_get (G_OBJECT (brg->priv->conf),
-		  BRIGHTNESS_ON_AC, on_ac,
-		  BRIGHTNESS_ON_BATTERY, on_battery,
+		  BRIGHTNESS_ON_AC, timeout_on_ac,
+		  BRIGHTNESS_ON_BATTERY, timeout_on_battery,
 		  NULL);
 }
 
 static void
 xfpm_brightness_hal_set_timeouts (XfpmBrightnessHal *brg )
 {
-    guint16 on_ac, on_battery;
+    guint timeout_on_ac, timeout_on_battery ;
     
-    xfpm_brightness_get_user_timeouts (brg, &on_ac, &on_battery);
+    xfpm_brightness_get_user_timeouts (brg, &timeout_on_ac, &timeout_on_battery);
     
-    if ( on_ac == ALARM_DISABLED )
+    if ( timeout_on_ac == ALARM_DISABLED )
     {
 	xfpm_idle_free_alarm (brg->priv->idle, TIMEOUT_BRIGHTNESS_ON_AC );
     }
     else
     {
-	xfpm_idle_set_alarm (brg->priv->idle, TIMEOUT_BRIGHTNESS_ON_AC, on_ac * 1000);
+	xfpm_idle_set_alarm (brg->priv->idle, TIMEOUT_BRIGHTNESS_ON_AC, timeout_on_ac * 1000);
     }
     
-    if ( on_battery == ALARM_DISABLED )
+    if ( timeout_on_battery == ALARM_DISABLED )
     {
 	xfpm_idle_free_alarm (brg->priv->idle, TIMEOUT_BRIGHTNESS_ON_BATTERY );
     }
     else
     {
-	xfpm_idle_set_alarm (brg->priv->idle, TIMEOUT_BRIGHTNESS_ON_BATTERY, on_battery * 1000);
+	xfpm_idle_set_alarm (brg->priv->idle, TIMEOUT_BRIGHTNESS_ON_BATTERY, timeout_on_battery * 1000);
     }
     
     xfpm_idle_alarm_reset_all (brg->priv->idle);
diff --git a/src/xfpm-xfconf.c b/src/xfpm-xfconf.c
index 6284e4c..6a7c601 100644
--- a/src/xfpm-xfconf.c
+++ b/src/xfpm-xfconf.c
@@ -124,7 +124,7 @@ xfpm_xfconf_get_property (GObject *object,
     conf = XFPM_XFCONF (object);
     
     src = conf->priv->values + prop_id;
-    
+
     if ( G_VALUE_HOLDS (src, pspec->value_type) )
 	g_value_copy (src, value);
     else
@@ -447,7 +447,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                      PROP_DIM_ON_AC_TIMEOUT,
                                      g_param_spec_uint (BRIGHTNESS_ON_AC,
                                                         NULL, NULL,
-							0,
+							9,
 							G_MAXUINT,
 							9,
                                                         G_PARAM_READWRITE));
@@ -459,7 +459,7 @@ xfpm_xfconf_class_init (XfpmXfconfClass *klass)
                                      PROP_DIM_ON_BATTERY_TIMEOUT,
                                      g_param_spec_uint (BRIGHTNESS_ON_BATTERY,
                                                         NULL, NULL,
-							0,
+							9,
 							G_MAXUINT,
 							120,
                                                         G_PARAM_READWRITE));



More information about the Xfce4-commits mailing list