Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xfce4-screensaver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Apps
xfce4-screensaver
Commits
0f2cb4cb
Commit
0f2cb4cb
authored
5 years ago
by
Alexander Butenko
Committed by
Sean Davis
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
remove session-idle signal since its not in use/not fully implemented
Signed-off-by:
Sean Davis
<
smd.seandavis@gmail.com
>
parent
856892c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gs-listener-dbus.c
+0
-83
0 additions, 83 deletions
src/gs-listener-dbus.c
with
0 additions
and
83 deletions
src/gs-listener-dbus.c
+
0
−
83
View file @
0f2cb4cb
...
...
@@ -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
);
...
...
@@ -357,30 +352,11 @@ listener_check_throttle (GSListener *listener) {
return
TRUE
;
}
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment