[gnome-shell/T27795: 111/138] AppIcon: Use a showMenu parameter to enable/disable the popup menu



commit 28c458945348b9122dd09bead5d0724ced92a470
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Wed Jun 21 17:20:54 2017 +0200

    AppIcon: Use a showMenu parameter to enable/disable the popup menu
    
    This functionality is needed when we add the App Center icon (and
    possibly others) to the grid as it is special and should display no
    menu.
    
    https://phabricator.endlessm.com/T17787

 js/ui/appDisplay.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 6432b26fd7..1387644fb5 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1830,10 +1830,13 @@ var AppIcon = class AppIcon {
         this._folderPreviewId = 0;
 
         // Get the isDraggable property without passing it on to the BaseIcon:
-        let appIconParams = Params.parse(iconParams, { isDraggable: true }, true);
+        let appIconParams = Params.parse(iconParams, { isDraggable: true, showMenu: true }, true);
         let isDraggable = appIconParams['isDraggable'];
         delete iconParams['isDraggable'];
 
+        this._showMenu = appIconParams['showMenu'];
+        delete iconParams['showMenu'];
+
         iconParams['createIcon'] = this._createIcon.bind(this);
         iconParams['createExtraIcons'] = this._createExtraIcons.bind(this);
         iconParams['setSizeManually'] = false;
@@ -1978,6 +1981,10 @@ var AppIcon = class AppIcon {
 
     popupMenu() {
         this._removeMenuTimeout();
+
+        if (!this._showMenu)
+            return true;
+
         this.actor.fake_release();
 
         if (this._draggable)


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