[Xfce4-commits] [apps/xfce4-screensaver] 02/04: remove session-idle signal since its not in use/not fully implemented
noreply at xfce.org
noreply at xfce.org
Sun Jul 7 19:25:59 CEST 2019
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 0f2cb4cbe13949dd3d0ffcc8fac085bd6c901635
Author: Alexander Butenko <a.butenka at gmail.com>
Date: Sun Jun 30 21:51:25 2019 -0400
remove session-idle signal since its not in use/not fully implemented
Signed-off-by: Sean Davis <smd.seandavis at gmail.com>
---
src/gs-listener-dbus.c | 83 --------------------------------------------------
1 file changed, 83 deletions(-)
diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index f0c7871..ff0650f 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -125,7 +125,6 @@ enum {
enum {
PROP_0,
PROP_ACTIVE,
- PROP_SESSION_IDLE,
};
enum {
@@ -312,10 +311,6 @@ listener_check_activation (GSListener *listener) {
return TRUE;
}
- if (!listener->priv->session_idle) {
- return TRUE;
- }
-
/* if we aren't inhibited then activate */
inhibited = listener_ref_entry_is_present (listener, REF_ENTRY_TYPE_INHIBIT);
@@ -358,29 +353,10 @@ listener_check_throttle (GSListener *listener) {
}
static gboolean
-listener_set_session_idle_internal (GSListener *listener,
- gboolean idle) {
- listener->priv->session_idle = idle;
-
- if (idle) {
- listener->priv->session_idle_start = time (NULL);
- } else {
- listener->priv->session_idle_start = 0;
- }
-
- return TRUE;
-}
-
-static gboolean
listener_set_active_internal (GSListener *listener,
gboolean active) {
listener->priv->active = active;
- /* if idle not in sync with active, change it */
- if (listener->priv->session_idle != active) {
- listener_set_session_idle_internal (listener, active);
- }
-
if (active) {
listener->priv->active_start = time (NULL);
} else {
@@ -405,65 +381,12 @@ gs_listener_set_active (GSListener *listener,
return FALSE;
}
- res = FALSE;
g_signal_emit (listener, signals[ACTIVE_CHANGED], 0, active, &res);
- if (!res) {
- /* if the signal is not handled then we haven't changed state */
- gs_debug ("Active-changed signal not handled");
-
- /* clear the idle state */
- if (active) {
- listener_set_session_idle_internal (listener, FALSE);
- }
-
- return FALSE;
- }
-
listener_set_active_internal (listener, active);
return TRUE;
}
-gboolean
-gs_listener_set_session_idle (GSListener *listener,
- gboolean idle) {
- gboolean res;
-
- g_return_val_if_fail (GS_IS_LISTENER (listener), FALSE);
-
- gs_debug ("Setting session idle: %d", idle);
-
- if (listener->priv->session_idle == idle) {
- gs_debug ("Trying to set idle state when already %s",
- idle ? "idle" : "not idle");
- return FALSE;
- }
-
- if (idle) {
- gboolean inhibited;
-
- inhibited = listener_ref_entry_is_present (listener, REF_ENTRY_TYPE_INHIBIT);
-
- /* if we are inhibited then do nothing */
- if (inhibited) {
- return FALSE;
- }
- }
-
- listener->priv->session_idle = idle;
- res = listener_check_activation (listener);
-
- /* if activation fails then don't set idle */
- if (res) {
- listener_set_session_idle_internal (listener, idle);
- } else {
- gs_debug ("Idle activation failed");
- listener->priv->session_idle = !idle;
- }
-
- return res;
-}
-
static dbus_bool_t
listener_property_set_bool (GSListener *listener,
guint prop_id,
@@ -1751,9 +1674,6 @@ gs_listener_set_property (GObject *object,
case PROP_ACTIVE:
gs_listener_set_active (self, g_value_get_boolean (value));
break;
- case PROP_SESSION_IDLE:
- gs_listener_set_session_idle (self, g_value_get_boolean (value));
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -1773,9 +1693,6 @@ gs_listener_get_property (GObject *object,
case PROP_ACTIVE:
g_value_set_boolean (value, self->priv->active);
break;
- case PROP_SESSION_IDLE:
- g_value_set_boolean (value, self->priv->session_idle);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list