From b59529e579e915a89d538c2b03ace6ecbd988b65 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 21 Nov 2012 01:29:45 +0100 Subject: [PATCH] MessageTray: fix closing the right click menu We were trying to disconnect a signal we never added. https://bugzilla.gnome.org/show_bug.cgi?id=688771 --- js/ui/messageTray.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 31283e690..266759b95 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2493,6 +2493,7 @@ const MessageTray = new Lang.Class({ this._summaryBoxPointerItem.prepareNotificationStackForShowing(); } else if (this._clickedSummaryItemMouseButton == 3) { this._summaryBoxPointer.bin.child = this._clickedSummaryItem.rightClickMenu; + this._summaryBoxPointerCloseClickedId = 0; } this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child, @@ -2599,8 +2600,10 @@ const MessageTray = new Lang.Class({ this._summaryBoxPointer.bin.child = null; this._summaryBoxPointerItem.disconnect(this._summaryBoxPointerContentUpdatedId); this._summaryBoxPointerContentUpdatedId = 0; - this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId); - this._summaryBoxPointerCloseClickedId = 0; + if (this._summaryBoxPointerCloseClickedId != 0) { + this._summaryBoxPointerItem.closeButton.disconnect(this._summaryBoxPointerCloseClickedId); + this._summaryBoxPointerCloseClickedId = 0; + } this._summaryBoxPointerItem.source.disconnect(this._sourceDoneDisplayingId); this._summaryBoxPointerDoneDisplayingId = 0;