summaryrefslogtreecommitdiff
path: root/src/xfpm-shutdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xfpm-shutdown.c')
-rw-r--r--src/xfpm-shutdown.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/xfpm-shutdown.c b/src/xfpm-shutdown.c
index 800b434f..5479543d 100644
--- a/src/xfpm-shutdown.c
+++ b/src/xfpm-shutdown.c
@@ -415,13 +415,11 @@ void xfpm_shutdown (XfpmShutdown *shutdown, GError **error)
xfpm_send_message_to_network_manager ("sleep");
- if ( !xfpm_session_shutdown (shutdown->priv->session) )
+ if ( !xfpm_shutdown_internal (dbus_g_connection_get_connection(shutdown->priv->bus), "Shutdown", NULL))
{
- if ( !xfpm_shutdown_internal (dbus_g_connection_get_connection(shutdown->priv->bus), "Shutdown", NULL))
- xfpm_send_message_to_network_manager ("wake");
+ xfpm_send_message_to_network_manager ("wake");
+ shutdown->priv->block_shutdown = FALSE;
}
-
- shutdown->priv->block_shutdown = FALSE;
}
void xfpm_reboot (XfpmShutdown *shutdown, GError **error)
@@ -438,13 +436,11 @@ void xfpm_reboot (XfpmShutdown *shutdown, GError **error)
}
xfpm_send_message_to_network_manager ("sleep");
-// if ( !xfpm_session_reboot (shutdown->priv->session) )
+ if ( !xfpm_shutdown_internal (dbus_g_connection_get_connection(shutdown->priv->bus), "Reboot", NULL))
{
- if ( !xfpm_shutdown_internal (dbus_g_connection_get_connection(shutdown->priv->bus), "Reboot", NULL))
- xfpm_send_message_to_network_manager ("wake");
+ xfpm_send_message_to_network_manager ("wake");
+ shutdown->priv->block_shutdown = FALSE;
}
-
- shutdown->priv->block_shutdown = FALSE;
}
void xfpm_hibernate (XfpmShutdown *shutdown, GError **error)