[gnome-shell/T27795: 84/138] Allow opening the background menu popup from the APPS view



commit 0aca9827c35c9093542b8accafba174ba3318415
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Thu Jun 15 14:37:57 2017 +0100

    Allow opening the background menu popup from the APPS view
    
    This allows opening the menu from the icon grid view, as long
    as no folder is open (which disables the click action).

 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 0e0bf2f3e7..7b9c6a512d 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -6,6 +6,7 @@ const Signals = imports.signals;
 
 const AppActivation = imports.ui.appActivation;
 const AppFavorites = imports.ui.appFavorites;
+const BackgroundMenu = imports.ui.backgroundMenu;
 const BoxPointer = imports.ui.boxpointer;
 const DND = imports.ui.dnd;
 const GrabHelper = imports.ui.grabHelper;
@@ -344,7 +345,16 @@ var AllView = class AllView extends BaseAppView {
             if (!this._currentPopup.actor.contains(actor))
                 this._currentPopup.popdown();
         });
-        this._eventBlocker.add_action(this._clickAction);
+        Main.overview.addAction(this._clickAction, false);
+        this._eventBlocker.bind_property('reactive', this._clickAction, 'enabled', 
GObject.BindingFlags.SYNC_CREATE);
+
+        this._bgAction = new Clutter.ClickAction();
+        Main.overview.addAction(this._bgAction, true);
+        BackgroundMenu.addBackgroundMenuForAction(this._bgAction, Main.layoutManager);
+        this._clickAction.bind_property('enabled', this._bgAction, 'enabled',
+                                        GObject.BindingFlags.SYNC_CREATE | 
GObject.BindingFlags.INVERT_BOOLEAN);
+        this.actor.bind_property('mapped', this._bgAction, 'enabled',
+                                 GObject.BindingFlags.SYNC_CREATE);
 
         this._displayingPopup = false;
         this._currentPopupDestroyId = 0;


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