[Xfce4-commits] [xfce/xfce4-power-manager] 13/17: Enable/disable brightness switch depending on handle keys option at startup
noreply at xfce.org
noreply at xfce.org
Wed Jul 23 22:03:03 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 95a3cc396a853b8d464494b7a6f688ba9f765d71
Author: Harald Judt <h.judt at gmx.at>
Date: Wed Jul 23 14:48:00 2014 +0200
Enable/disable brightness switch depending on handle keys option at startup
---
src/xfpm-backlight.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/xfpm-backlight.c b/src/xfpm-backlight.c
index dcaabd0..e88ade2 100644
--- a/src/xfpm-backlight.c
+++ b/src/xfpm-backlight.c
@@ -357,7 +357,7 @@ xfpm_backlight_init (XfpmBacklight *backlight)
}
else
{
- gboolean ret;
+ gboolean ret, handle_keys;
backlight->priv->idle = egg_idletime_new ();
backlight->priv->conf = xfpm_xfconf_new ();
@@ -381,6 +381,16 @@ xfpm_backlight_init (XfpmBacklight *backlight)
NULL);
backlight->priv->brightness_switch_initialized = TRUE;
+ /* check whether to change the brightness switch */
+ handle_keys = xfconf_channel_get_bool (xfpm_xfconf_get_channel(backlight->priv->conf),
+ PROPERTIES_PREFIX HANDLE_BRIGHTNESS_KEYS,
+ TRUE);
+ backlight->priv->brightness_switch = handle_keys ? 0 : 1;
+ g_object_set (G_OBJECT (backlight),
+ BRIGHTNESS_SWITCH,
+ backlight->priv->brightness_switch,
+ NULL);
+
g_signal_connect (backlight->priv->idle, "alarm-expired",
G_CALLBACK (xfpm_backlight_alarm_timeout_cb), backlight);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list