[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Load lock timeout from preferences

noreply at xfce.org noreply at xfce.org
Fri Nov 9 04:01:19 CET 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit 739b41d226588a241516f7526a8297074a620184
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Thu Nov 8 22:01:14 2018 -0500

    Load lock timeout from preferences
---
 src/gs-listener-x11.c | 1 +
 src/gs-monitor.c      | 3 +--
 src/gs-prefs.c        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gs-listener-x11.c b/src/gs-listener-x11.c
index 630e109..89a2fa6 100644
--- a/src/gs-listener-x11.c
+++ b/src/gs-listener-x11.c
@@ -232,6 +232,7 @@ void
 gs_listener_x11_set_lock_after (GSListenerX11 *listener,
                                 gint lock_after)
 {
+        gs_debug ("Lock timout updated to %i minutes", lock_after);
         listener->priv->lock_timeout = lock_after * 60;
         reset_lock_timer(listener);
 }
diff --git a/src/gs-monitor.c b/src/gs-monitor.c
index 0a2048a..2c0d5f0 100644
--- a/src/gs-monitor.c
+++ b/src/gs-monitor.c
@@ -209,6 +209,7 @@ static void _gs_monitor_update_from_prefs(GSMonitor* monitor, GSPrefs* prefs)
 
     /* enable activation when allowed */
     gs_listener_set_activation_enabled(monitor->priv->listener, monitor->priv->prefs->idle_activation_enabled);
+    gs_listener_x11_set_lock_after(monitor->priv->listener_x11, monitor->priv->prefs->timeout);
 }
 
 static void disconnect_listener_signals(GSMonitor* monitor)
@@ -312,8 +313,6 @@ GSMonitor* gs_monitor_new(void)
 
     monitor = g_object_new(GS_TYPE_MONITOR, NULL);
 
-    gs_listener_x11_set_lock_after(monitor->priv->listener_x11, 1);
-
     return GS_MONITOR(monitor);
 }
 
diff --git a/src/gs-prefs.c b/src/gs-prefs.c
index df28dc0..cf85b74 100644
--- a/src/gs-prefs.c
+++ b/src/gs-prefs.c
@@ -119,7 +119,7 @@ _gs_prefs_set_timeout (GSPrefs *prefs,
     if (value > 480)
         value = 480;
 
-    prefs->timeout = value * 60000;
+    prefs->timeout = value;
 }
 
 static void

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list