[gnome-shell/eos3.8: 100/255] AppIcon: Use a showMenu parameter to enable/disable the popup menu



commit 1d6ed40f5143c6c07299f9752c6e0f7a3dcc92bb
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 | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index dd5c7ec065..610250a5ba 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1752,10 +1752,16 @@ var AppIcon = GObject.registerClass({
         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['setSizeManually'] = false;
         this.icon = new IconGrid.BaseIcon(app.get_name(), iconParams);
@@ -1908,6 +1914,10 @@ var AppIcon = GObject.registerClass({
 
     popupMenu() {
         this._removeMenuTimeout();
+
+        if (!this._showMenu)
+            return true;
+
         this.fake_release();
 
         if (this._draggable)


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