From 10fa6ae4c5a7d35574072ab5a4a638775a303fdb Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 29 Nov 2008 13:56:13 +0100 Subject: [PATCH] Emit the completed signal on shutdown completion, not on client disconnection. When shutting down with no activity running we was not hitting completion. Fix #11 --- src/sugar/gsm-session.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sugar/gsm-session.c b/src/sugar/gsm-session.c index 3f0714c7..b1f4f0e4 100644 --- a/src/sugar/gsm-session.c +++ b/src/sugar/gsm-session.c @@ -373,6 +373,8 @@ session_shutdown (GsmSession *session) /* FIXME: do this in reverse phase order */ for (cl = session->clients; cl; cl = cl->next) gsm_client_die (cl->data); + + g_signal_emit (session, signals[SHUTDOWN_COMPLETED], 0); } static void @@ -485,9 +487,6 @@ client_disconnected (GsmClient *client, gpointer data) } g_object_unref (client); - - if (session->phase == GSM_SESSION_PHASE_SHUTDOWN && !session->clients) - g_signal_emit (session, signals[SHUTDOWN_COMPLETED], 0); } GsmSession *