[gnome-session] manager: call complete_shutdown in better place
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] manager: call complete_shutdown in better place
- Date: Wed, 5 Dec 2012 19:59:12 +0000 (UTC)
commit 8b187ec5177647ee9b2a78af27e538b078941f8c
Author: Ray Strode <rstrode redhat com>
Date: Tue Dec 4 10:20:41 2012 -0500
manager: call complete_shutdown in better place
The code currently unconditionally calls complete_shutdown at the
bottom of the END_SESSION phase. This means it gets called at logout
time, and ConsoleKit users will get power off at logout time.
This commit moves it to be called in place of the superfluous calls
to attempt_stop/attempt_restart in gsm_manager_quit (which runs
at the proper time, during the EXIT phase, and has checks to exclude
the LOGOUT case)
https://bugzilla.gnome.org/show_bug.cgi?id=689721
gnome-session/gsm-manager.c | 22 ++--------------------
1 files changed, 2 insertions(+), 20 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index c8e91b3..056ab31 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -492,12 +492,7 @@ gsm_manager_quit (GsmManager *manager)
case GSM_MANAGER_LOGOUT_REBOOT:
case GSM_MANAGER_LOGOUT_REBOOT_INTERACT:
gdm_set_logout_action (GDM_LOGOUT_ACTION_NONE);
-
- g_signal_connect (manager->priv->system,
- "request-completed",
- G_CALLBACK (quit_request_completed),
- GINT_TO_POINTER (GDM_LOGOUT_ACTION_REBOOT));
- gsm_system_attempt_restart (manager->priv->system);
+ gsm_system_complete_shutdown (manager->priv->system);
break;
case GSM_MANAGER_LOGOUT_REBOOT_GDM:
gdm_set_logout_action (GDM_LOGOUT_ACTION_REBOOT);
@@ -506,12 +501,7 @@ gsm_manager_quit (GsmManager *manager)
case GSM_MANAGER_LOGOUT_SHUTDOWN:
case GSM_MANAGER_LOGOUT_SHUTDOWN_INTERACT:
gdm_set_logout_action (GDM_LOGOUT_ACTION_NONE);
-
- g_signal_connect (manager->priv->system,
- "request-completed",
- G_CALLBACK (quit_request_completed),
- GINT_TO_POINTER (GDM_LOGOUT_ACTION_SHUTDOWN));
- gsm_system_attempt_stop (manager->priv->system);
+ gsm_system_complete_shutdown (manager->priv->system);
break;
case GSM_MANAGER_LOGOUT_SHUTDOWN_GDM:
gdm_set_logout_action (GDM_LOGOUT_ACTION_SHUTDOWN);
@@ -524,7 +514,6 @@ gsm_manager_quit (GsmManager *manager)
}
static gboolean do_query_end_session_exit (GsmManager *manager);
-static void do_end_session_exit (GsmManager *manager);
static void
end_phase (GsmManager *manager)
@@ -572,7 +561,6 @@ end_phase (GsmManager *manager)
break;
case GSM_MANAGER_PHASE_END_SESSION:
maybe_save_session (manager);
- do_end_session_exit (manager);
break;
case GSM_MANAGER_PHASE_EXIT:
start_next_phase = FALSE;
@@ -4142,9 +4130,3 @@ do_query_end_session_exit (GsmManager *manager)
return TRUE; /* go to end session phase */
}
-
-static void
-do_end_session_exit (GsmManager *manager)
-{
- gsm_system_complete_shutdown (manager->priv->system);
-}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]