[gnome-settings-daemon] power: Merge idle-dim-ac/idle-dim-battery
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Merge idle-dim-ac/idle-dim-battery
- Date: Thu, 17 Jan 2013 06:57:48 +0000 (UTC)
commit 0b3a9c96b949d6a17df0b8b2a029afed3a39292f
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 16 19:42:08 2013 +0100
power: Merge idle-dim-ac/idle-dim-battery
We have a single setting in the power panel, so it doesn't make sense
to have two separate ones here.
...settings-daemon.plugins.power.gschema.xml.in.in | 11 +++--------
plugins/power/gsd-power-manager.c | 7 +------
2 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
index b16194d..24c97bf 100644
--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
@@ -15,15 +15,10 @@
<summary>The brightness of the screen when idle</summary>
<description>This is the laptop panel screen brightness used when the session is idle.</description>
</key>
- <key name="idle-dim-ac" type="b">
- <default>false</default>
- <summary>Dim the screen after a period of inactivity when on AC power</summary>
- <description>If the screen should be dimmed to save power when the computer is idle when on AC power.</description>
- </key>
- <key name="idle-dim-battery" type="b">
+ <key name="idle-dim" type="b">
<default>true</default>
- <summary>Dim the screen after a period of inactivity when on battery power</summary>
- <description>If the screen should be dimmed to save power when the computer is idle when on battery power.</description>
+ <summary>Dim the screen after a period of inactivity</summary>
+ <description>If the screen should be dimmed to save power when the computer is idle.</description>
</key>
<key name="idle-dim-time" type="i">
<default>90</default>
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 6cd0611..34c003d 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2743,12 +2743,7 @@ idle_configure (GsdPowerManager *manager)
* but only if we actually want to dim. */
timeout_dim = 0;
if (!manager->priv->screensaver_active) {
- gboolean do_dim;
-
- do_dim = g_settings_get_boolean (manager->priv->settings,
- on_battery ? "idle-dim-battery" : "idle-dim-ac");
-
- if (do_dim)
+ if (g_settings_get_boolean (manager->priv->settings, "idle-dim"))
timeout_dim = g_settings_get_int (manager->priv->settings,
"idle-dim-time");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]