[gnome-shell/gnome-3-8] messageTray: Check if the clicked summary item has a right click menu
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-8] messageTray: Check if the clicked summary item has a right click menu
- Date: Fri, 24 May 2013 22:18:55 +0000 (UTC)
commit 2eb779740c8d3dc7013b53cf17d4fe5cec45ecb4
Author: Rui Matos <tiagomatos gmail com>
Date: Fri May 24 20:59:40 2013 +0200
messageTray: Check if the clicked summary item has a right click menu
Commit e71129aa6879b62a04d2fc3b43ff25edd6611987 introduced the
possibility of having summary items without a right click menu so we
should check for one before trying to show it.
https://bugzilla.gnome.org/show_bug.cgi?id=700190
js/ui/messageTray.js | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 98724c5..665d980 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2245,10 +2245,15 @@ const MessageTray = new Lang.Class({
let canShowSummaryBoxPointer = this._trayState == State.SHOWN;
// We only have sources with empty notification stacks for legacy tray icons. Currently, we never
attempt
// to show notifications for legacy tray icons, but this would be necessary if we did.
- let requestedNotificationStackIsEmpty = (this._clickedSummaryItemMouseButton == 1 &&
this._clickedSummaryItem.source.notifications.length == 0);
- let wrongSummaryNotificationStack = (this._clickedSummaryItemMouseButton == 1 &&
+ let requestedNotificationStackIsEmpty = (haveClickedSummaryItem &&
+ this._clickedSummaryItemMouseButton == 1 &&
+ this._clickedSummaryItem.source.notifications.length == 0);
+ let wrongSummaryNotificationStack = (haveClickedSummaryItem &&
+ this._clickedSummaryItemMouseButton == 1 &&
this._summaryBoxPointer.bin.child !=
this._clickedSummaryItem.notificationStackWidget);
- let wrongSummaryRightClickMenu = (this._clickedSummaryItemMouseButton == 3 &&
+ let wrongSummaryRightClickMenu = (haveClickedSummaryItem &&
+ this._clickedSummaryItemMouseButton == 3 &&
+ this._clickedSummaryItem.rightClickMenu != null &&
this._summaryBoxPointer.bin.child !=
this._clickedSummaryItem.rightClickMenu);
let wrongSummaryBoxPointer = (haveClickedSummaryItem &&
(wrongSummaryNotificationStack || wrongSummaryRightClickMenu));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]