[gnome-shell] autorunManager: Don't show a right-click menu



commit e71129aa6879b62a04d2fc3b43ff25edd6611987
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Sep 5 12:34:01 2012 -0300

    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 deletions(-)
---
diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js
index 38f93bc..541c75c 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 fc39e66..f5fdeb4 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];



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