From e71129aa6879b62a04d2fc3b43ff25edd6611987 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Wed, 5 Sep 2012 12:34:01 -0300 Subject: [PATCH] autorunManager: Don't show a right-click menu Activating the source shouldn't be possible, and neither should removing it. https://bugzilla.gnome.org/show_bug.cgi?id=683438 --- js/ui/components/autorunManager.js | 4 ++++ js/ui/messageTray.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index 38f93bc8c..541c75ca7 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -284,6 +284,10 @@ const AutorunResidentSource = new Lang.Class({ this._notification = new AutorunResidentNotification(this._manager, this); }, + buildRightClickMenu: function() { + return null; + }, + addMount: function(mount, apps) { if (!shouldAutorunMount(mount, false)) return; diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index fc39e661b..f5fdeb447 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2340,7 +2340,9 @@ const MessageTray = new Lang.Class({ Lang.bind(this, this._onSummaryBoxPointerContentUpdated)); this._sourceDoneDisplayingId = this._summaryBoxPointerItem.source.connect('done-displaying-content', Lang.bind(this, this._escapeTray)); - if (this._clickedSummaryItemMouseButton == 1) { + + let hasRightClickMenu = this._summaryBoxPointerItem.rightClickMenu != null; + if (this._clickedSummaryItemMouseButton == 1 || !hasRightClickMenu) { let newQueue = []; for (let i = 0; i < this._notificationQueue.length; i++) { let notification = this._notificationQueue[i];