[gnome-shell] MessageTray: disconnect signal to notification early
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] MessageTray: disconnect signal to notification early
- Date: Mon, 28 Jan 2013 20:03:22 +0000 (UTC)
commit 4545719e18239edfb276c3ede7a76ca401fddc1e
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Jan 28 12:09:17 2013 +0100
MessageTray: disconnect signal to notification early
Similar to the previous patch, this adds robustness and prevents more
stacktraces and confusion in the state machine.
https://bugzilla.gnome.org/show_bug.cgi?id=692693
js/ui/messageTray.js | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 277b7e3..79a91df 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2384,11 +2384,18 @@ const MessageTray = new Lang.Class({
this.idleMonitor.disconnect(this._idleMonitorBecameActiveId);
this._idleMonitorBecameActiveId = 0;
}
-
if (this._notificationExpandedId) {
this._notification.disconnect(this._notificationExpandedId);
this._notificationExpandedId = 0;
}
+ if (this._notificationClickedId) {
+ this._notification.disconnect(this._notificationClickedId);
+ this._notificationClickedId = 0;
+ }
+ if (this._notificationUnfocusedId) {
+ this._notification.disconnect(this._notificationUnfocusedId);
+ this._notificationUnfocusedId = 0;
+ }
if (this._notificationRemoved) {
Tweener.removeTweens(this._notificationWidget);
@@ -2411,10 +2418,7 @@ const MessageTray = new Lang.Class({
_hideNotificationCompleted: function() {
this._notification.collapseCompleted();
- this._notification.disconnect(this._notificationClickedId);
- this._notificationClickedId = 0;
- this._notification.disconnect(this._notificationUnfocusedId);
- this._notificationUnfocusedId = 0;
+
let notification = this._notification;
this._notification = null;
if (notification.isTransient)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]