[gnome-control-center] screen: drop converting between seconds and minutes
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] screen: drop converting between seconds and minutes
- Date: Thu, 17 Mar 2011 03:57:41 +0000 (UTC)
commit a52956abf6532aada193822ba1ae0e67aeec0ea3
Author: William Jon McCann <jmccann redhat com>
Date: Wed Mar 16 23:56:52 2011 -0400
screen: drop converting between seconds and minutes
All settings now use seconds for consistency.
panels/screen/cc-screen-panel.c | 16 ----------------
1 files changed, 0 insertions(+), 16 deletions(-)
---
diff --git a/panels/screen/cc-screen-panel.c b/panels/screen/cc-screen-panel.c
index 133fc6f..7d550b0 100644
--- a/panels/screen/cc-screen-panel.c
+++ b/panels/screen/cc-screen-panel.c
@@ -286,7 +286,6 @@ lock_delay_to_relative (CcScreenPanel *self,
/* convert to relative units */
idle_delay = 0;
g_settings_get (self->priv->session_settings, "idle-delay", "u", &idle_delay);
- idle_delay *= 60;
if (idle_delay > value)
new = 0;
@@ -308,7 +307,6 @@ lock_delay_to_absolute (CcScreenPanel *self,
/* convert to absolute units */
idle_delay = 0;
g_settings_get (self->priv->session_settings, "idle-delay", "u", &idle_delay);
- idle_delay *= 60;
new += idle_delay;
@@ -333,9 +331,6 @@ set_idle_delay_from_dpms (CcScreenPanel *self,
if (lock_delay > 0)
{
- /* convert to seconds */
- lock_delay *= 60;
-
lock_delay = lock_delay_to_absolute (self, lock_delay);
idle_delay = MIN (lock_delay, off_delay);
@@ -343,8 +338,6 @@ set_idle_delay_from_dpms (CcScreenPanel *self,
else
idle_delay = off_delay;
- idle_delay /= 60;
-
g_settings_set (self->priv->session_settings, "idle-delay", "u", idle_delay);
}
@@ -363,8 +356,6 @@ set_idle_delay_from_lock (CcScreenPanel *self,
else
idle_delay = off_delay;
- idle_delay /= 60;
-
g_settings_set (self->priv->session_settings, "idle-delay", "u", idle_delay);
}
@@ -415,10 +406,6 @@ lock_combo_changed_cb (GtkWidget *widget, CcScreenPanel *self)
-1);
relative = lock_delay_to_relative (self, absolute);
- /* convert to minutes */
- if (relative > 0)
- relative /= 60;
-
g_settings_set (self->priv->lock_settings, "lock-delay", "u", relative);
set_idle_delay_from_lock (self, absolute);
@@ -486,9 +473,6 @@ set_lock_value_for_combo (GtkComboBox *combo_box, CcScreenPanel *self)
/* try to make the UI match the lock setting */
g_settings_get (self->priv->lock_settings, "lock-delay", "u", &value);
- /* convert to seconds */
- value *= 60;
-
if (value > 0)
value = lock_delay_to_absolute (self, value);
do
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]