Commit 0c95758c authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz

ignore this if we're not in a relevant phase. Also make sure the inhibit

2009-03-24  Vincent Untz  <vuntz@gnome.org>

	* gnome-session/gsm-manager.c: (cancel_end_session): ignore this if
	we're not in a relevant phase. Also make sure the inhibit dialog is
	destroyed before removing inhibitors (which would activate the
	inhibit dialog)

svn path=/trunk/; revision=5352
parent ac66a43d
2009-03-24 Vincent Untz <vuntz@gnome.org>
* gnome-session/gsm-manager.c: (cancel_end_session): ignore this if
we're not in a relevant phase. Also make sure the inhibit dialog is
destroyed before removing inhibitors (which would activate the
inhibit dialog)
2009-03-24 Vincent Untz <vuntz@gnome.org>
* gnome-session/gsm-util.c: (ensure_dir_exists): create the dir with
......
......@@ -727,9 +727,21 @@ inhibitor_is_jit (gpointer key,
static void
cancel_end_session (GsmManager *manager)
{
/* just ignore if received outside of shutdown */
if (manager->priv->phase < GSM_MANAGER_PHASE_QUERY_END_SESSION) {
return;
}
/* switch back to running phase */
g_debug ("GsmManager: Cancelling the end of session");
/* remove the dialog before we remove the inhibitors, else the dialog
* will activate itself automatically when the last inhibitor will be
* removed */
if (manager->priv->inhibit_dialog)
gtk_widget_destroy (GTK_WIDGET (manager->priv->inhibit_dialog));
manager->priv->inhibit_dialog = NULL;
/* clear all JIT inhibitors */
gsm_store_foreach_remove (manager->priv->inhibitors,
(GsmStoreFunc)inhibitor_is_jit,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment