gnome-session r5352 - in trunk: . gnome-session
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r5352 - in trunk: . gnome-session
- Date: Tue, 24 Mar 2009 22:28:06 +0000 (UTC)
Author: vuntz
Date: Tue Mar 24 22:28:06 2009
New Revision: 5352
URL: http://svn.gnome.org/viewvc/gnome-session?rev=5352&view=rev
Log:
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)
Modified:
trunk/ChangeLog
trunk/gnome-session/gsm-manager.c
Modified: trunk/gnome-session/gsm-manager.c
==============================================================================
--- trunk/gnome-session/gsm-manager.c (original)
+++ trunk/gnome-session/gsm-manager.c Tue Mar 24 22:28:06 2009
@@ -727,9 +727,21 @@
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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]