summaryrefslogtreecommitdiff
path: root/mate-session/gsm-manager.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-07-10 12:20:16 -0700
committerStefano Karapetsas <[email protected]>2013-07-10 12:20:16 -0700
commitdba25d0e45128b297b76c33e78f3e4615171da5f (patch)
tree9b065f2d8ffcf05850369d02bc95f3b61f6a00a1 /mate-session/gsm-manager.c
parentda13489e6b1f6f015a684c9b2c0d30297485952a (diff)
parent1bfa3e834d64e35b98474b75702487908684321b (diff)
downloadmate-session-manager-dba25d0e45128b297b76c33e78f3e4615171da5f.tar.bz2
mate-session-manager-dba25d0e45128b297b76c33e78f3e4615171da5f.tar.xz
Merge pull request #28 from lxnay/master
Use LOGIND_RUNNING() macro instead of sd_booted(), drop libsystemd-daemon dependency
Diffstat (limited to 'mate-session/gsm-manager.c')
-rw-r--r--mate-session/gsm-manager.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
index d765322..1e393ac 100644
--- a/mate-session/gsm-manager.c
+++ b/mate-session/gsm-manager.c
@@ -62,7 +62,6 @@
#include "gsm-consolekit.h"
#ifdef HAVE_SYSTEMD
#include "gsm-systemd.h"
-#include <systemd/sd-daemon.h>
#endif
#include "gsm-session-save.h"
@@ -448,7 +447,7 @@ gsm_manager_quit (GsmManager *manager)
mdm_set_logout_action (MDM_LOGOUT_ACTION_NONE);
#ifdef HAVE_SYSTEMD
- if (sd_booted () > 0) {
+ if (LOGIND_RUNNING()) {
systemd = gsm_get_systemd ();
g_signal_connect (systemd,
"request-completed",
@@ -477,7 +476,7 @@ gsm_manager_quit (GsmManager *manager)
mdm_set_logout_action (MDM_LOGOUT_ACTION_NONE);
#ifdef HAVE_SYSTEMD
- if (sd_booted () > 0) {
+ if (LOGIND_RUNNING()) {
systemd = gsm_get_systemd ();
g_signal_connect (systemd,
"request-completed",
@@ -1930,7 +1929,7 @@ maybe_save_session (GsmManager *manager)
GError *error;
#ifdef HAVE_SYSTEMD
- if (sd_booted () > 0) {
+ if (LOGIND_RUNNING()) {
systemd = gsm_get_systemd ();
session_type = gsm_systemd_get_current_session_type (systemd);
@@ -2458,7 +2457,7 @@ on_presence_status_changed (GsmPresence *presence,
GsmManager *manager)
{
#ifdef HAVE_SYSTEMD
- if (sd_booted () > 0) {
+ if (LOGIND_RUNNING()) {
GsmSystemd *systemd;
systemd = gsm_get_systemd ();
@@ -2744,7 +2743,7 @@ request_reboot (GsmManager *manager)
*/
#ifdef HAVE_SYSTEMD
- if (sd_booted () > 0) {
+ if (LOGIND_RUNNING()) {
systemd = gsm_get_systemd ();
g_signal_connect (systemd,
"privileges-completed",
@@ -2856,7 +2855,7 @@ request_shutdown (GsmManager *manager)
* this works. */
#ifdef HAVE_SYSTEMD
- if (sd_booted () > 0) {
+ if (LOGIND_RUNNING()) {
systemd = gsm_get_systemd ();
g_signal_connect (systemd,
"privileges-completed",
@@ -3202,7 +3201,7 @@ gsm_manager_can_shutdown (GsmManager *manager,
g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
#ifdef HAVE_SYSTEMD
- if (sd_booted () > 0) {
+ if (LOGIND_RUNNING()) {
systemd = gsm_get_systemd ();
*shutdown_available = gsm_systemd_can_stop (systemd)
|| gsm_systemd_can_restart (systemd)