[gnome-control-center] Screen: Fix the delay acrobatics
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Screen: Fix the delay acrobatics
- Date: Fri, 11 Mar 2011 00:05:18 +0000 (UTC)
commit 22bd03db52c3b54cc12bdd1467e80335c0042d70
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Mar 10 19:03:51 2011 -0500
Screen: Fix the delay acrobatics
The special-casing of lock delay 0 was wrong, since the > 0 check
was happening after converting to absolute.
https://bugzilla.gnome.org/show_bug.cgi?id=644403
panels/screen/cc-screen-panel.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/panels/screen/cc-screen-panel.c b/panels/screen/cc-screen-panel.c
index e0fb153..133fc6f 100644
--- a/panels/screen/cc-screen-panel.c
+++ b/panels/screen/cc-screen-panel.c
@@ -330,14 +330,18 @@ set_idle_delay_from_dpms (CcScreenPanel *self,
off_delay = (guint) value;
g_settings_get (self->priv->lock_settings, "lock-delay", "u", &lock_delay);
- /* convert to seconds */
- lock_delay *= 60;
-
- lock_delay = lock_delay_to_absolute (self, lock_delay);
- idle_delay = off_delay;
if (lock_delay > 0)
- idle_delay = MIN (lock_delay, off_delay);
+ {
+ /* convert to seconds */
+ lock_delay *= 60;
+
+ lock_delay = lock_delay_to_absolute (self, lock_delay);
+
+ idle_delay = MIN (lock_delay, off_delay);
+ }
+ else
+ idle_delay = off_delay;
idle_delay /= 60;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]