[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Drop unused config /power-management-delay

noreply at xfce.org noreply at xfce.org
Sun Nov 11 21:33:04 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 fc3e99386691151245be21d437bc2528b6cea1a9
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Nov 11 15:32:59 2018 -0500

    Drop unused config /power-management-delay
---
 src/gs-prefs.c | 26 --------------------------
 src/gs-prefs.h |  9 ---------
 2 files changed, 35 deletions(-)

diff --git a/src/gs-prefs.c b/src/gs-prefs.c
index f6d9f02..e1019d8 100644
--- a/src/gs-prefs.c
+++ b/src/gs-prefs.c
@@ -114,21 +114,6 @@ _gs_prefs_set_timeout (GSPrefs *prefs,
 }
 
 static void
-_gs_prefs_set_power_timeout (GSPrefs *prefs,
-                             int      value) {
-    if (value < 1)
-        value = 60;
-
-    /* pick a reasonable large number for the
-       upper bound */
-    if (value > 480)
-        value = 480;
-
-    /* this value is in seconds - others are in minutes */
-    prefs->power_timeout = value * 1000;
-}
-
-static void
 _gs_prefs_set_lock_timeout (GSPrefs *prefs,
                             int      value) {
     if (value < 0)
@@ -280,11 +265,6 @@ gs_prefs_load_from_settings (GSPrefs *prefs) {
     _gs_prefs_set_timeout (prefs, value);
 
     value = xfconf_channel_get_int (prefs->priv->channel,
-                                    KEY_POWER_DELAY,
-                                    DEFAULT_KEY_POWER_DELAY);
-    _gs_prefs_set_power_timeout (prefs, value);
-
-    value = xfconf_channel_get_int (prefs->priv->channel,
                                     KEY_LOCK_DELAY,
                                     DEFAULT_KEY_LOCK_DELAY);
     _gs_prefs_set_lock_timeout (prefs, value);
@@ -368,11 +348,6 @@ key_changed_cb (XfconfChannel *channel,
 
         delay = xfconf_channel_get_int (channel, property, DEFAULT_KEY_IDLE_DELAY);
         _gs_prefs_set_timeout (prefs, delay);
-    } else if (strcmp (property, KEY_POWER_DELAY) == 0) {
-        int delay;
-
-        delay = xfconf_channel_get_int (channel, property, DEFAULT_KEY_POWER_DELAY);
-        _gs_prefs_set_power_timeout (prefs, delay);
     } else if (strcmp (property, KEY_LOCK_DELAY) == 0) {
         int delay;
 
@@ -453,7 +428,6 @@ gs_prefs_init (GSPrefs *prefs) {
     prefs->user_switch_enabled     = FALSE;
 
     prefs->timeout                 = 600000;
-    prefs->power_timeout           = 60000;
     prefs->lock_timeout            = 0;
     prefs->logout_timeout          = 14400000;
     prefs->cycle                   = 600000;
diff --git a/src/gs-prefs.h b/src/gs-prefs.h
index c5896c2..14fa4a7 100644
--- a/src/gs-prefs.h
+++ b/src/gs-prefs.h
@@ -55,14 +55,6 @@ G_BEGIN_DECLS
 #define DEFAULT_KEY_IDLE_DELAY 5
 
 /**
- * Time before power management baseline
- * The number of seconds of inactivity before signalling to power management.
- * This key is set and maintained by the session power management agent.
- */
-#define KEY_POWER_DELAY "/power-management-delay"
-#define DEFAULT_KEY_POWER_DELAY 30
-
-/**
  * Time before locking
  * The number of minutes after screensaver activation before locking the screen.
  */
@@ -177,7 +169,6 @@ typedef struct
     guint            user_switch_enabled : 1;  /* Whether to offer the user switch option */
     guint            keyboard_enabled : 1;       /* Whether to try to embed a keyboard */
     guint            status_message_enabled : 1; /* show the status message in the lock */
-    guint            power_timeout;  /* how much idle time before power management */
     guint            timeout;        /* how much idle time before activation */
     guint            lock_timeout;   /* how long after activation locking starts */
     guint            logout_timeout; /* how long until the logout option appears */

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


More information about the Xfce4-commits mailing list