[gnome-shell] AppIcon: right-click menu should appear on press, not click



commit c256fa9b9f573609879e3124b03f39e83ad9699f
Author: Dan Winship <danw gnome org>
Date:   Wed Jan 26 11:15:41 2011 -0500

    AppIcon: right-click menu should appear on press, not click
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640583

 js/ui/appDisplay.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 6cefd64..c5fe8c6 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -328,6 +328,7 @@ AppWellIcon.prototype = {
         this.icon = new AppIcon(app, iconParams);
         this.actor.set_child(this.icon.actor);
 
+        this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
         this.actor.connect('clicked', Lang.bind(this, this._onClicked));
 
         this._menu = null;
@@ -344,7 +345,6 @@ AppWellIcon.prototype = {
                Main.overview.endItemDrag(this);
             }));
 
-        this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
         this.actor.connect('destroy', Lang.bind(this, this._onDestroy));
 
         this._menuTimeoutId = 0;
@@ -383,7 +383,11 @@ AppWellIcon.prototype = {
                 Lang.bind(this, function() {
                     this.popupMenu();
                 }));
+        } else if (button == 3) {
+            this.popupMenu();
+            return true;
         }
+        return false;
     },
 
     _onClicked: function(actor, event) {
@@ -400,8 +404,6 @@ AppWellIcon.prototype = {
                 this.app.open_new_window();
                 Main.overview.hide();
             }
-        } else if (button == 3) {
-            this.popupMenu();
         }
         return false;
     },



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