[gnome-session] shell: fix duplicate dialog issue



commit 0e7f6876c17c3b6737a3a7612446df08177c5680
Author: Ray Strode <rstrode redhat com>
Date:   Mon Jul 16 22:59:14 2012 -0400

    shell: fix duplicate dialog issue
    
    The act of cancelling the dialog alters the inhibitor list.
    When the inhibitor list is changed, we reshow the dialog.
    
    This commit makes the code stop watching the inhibitor list
    before sending out the cancel signal.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=664508

 gnome-session/gsm-shell.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gnome-session/gsm-shell.c b/gnome-session/gsm-shell.c
index 9785160..67d9597 100644
--- a/gnome-session/gsm-shell.c
+++ b/gnome-session/gsm-shell.c
@@ -516,6 +516,15 @@ static void
 on_end_session_dialog_canceled (DBusGProxy *proxy,
                                 GsmShell   *shell)
 {
+        if (shell->priv->update_idle_id != 0) {
+                g_source_remove (shell->priv->update_idle_id);
+                shell->priv->update_idle_id = 0;
+        }
+
+        g_signal_handlers_disconnect_by_func (shell->priv->inhibitors,
+                                              G_CALLBACK (queue_end_session_dialog_update),
+                                              shell);
+
         g_signal_emit (G_OBJECT (shell), signals[END_SESSION_DIALOG_CANCELED], 0);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]