[gnome-shell] popupMenu: Make MenuManager to take an actor as parameter



commit 7bb84dae805c98899ec3361b3c65cb0ebde9fb6c
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Tue Apr 9 18:23:59 2019 -0500

    popupMenu: Make MenuManager to take an actor as parameter
    
    Since we assume now that most of the classes are actors per se we can just pass
    the actor itself as parameter
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/487

 js/gdm/loginDialog.js   | 2 +-
 js/ui/appDisplay.js     | 2 +-
 js/ui/backgroundMenu.js | 2 +-
 js/ui/popupMenu.js      | 2 +-
 js/ui/shellEntry.js     | 2 +-
 js/ui/windowMenu.js     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 6c4d1357d..b6f499014 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -325,7 +325,7 @@ var SessionMenuButton = class {
                  this._button.remove_style_pseudo_class('active');
         });
 
-        this._manager = new PopupMenu.PopupMenuManager({ actor: this._button },
+        this._manager = new PopupMenu.PopupMenuManager(this._button,
                                                        { actionMode: Shell.ActionMode.NONE });
         this._manager.addMenu(this._menu);
 
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 8b7dec7dc..1dd182b17 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1479,7 +1479,7 @@ var AppIcon = class AppIcon {
         this.actor.connect('popup-menu', this._onKeyboardPopupMenu.bind(this));
 
         this._menu = null;
-        this._menuManager = new PopupMenu.PopupMenuManager(this);
+        this._menuManager = new PopupMenu.PopupMenuManager(this.actor);
 
         if (isDraggable) {
             this._draggable = DND.makeDraggable(this.actor);
diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js
index 7d3941bc7..b5bb2a664 100644
--- a/js/ui/backgroundMenu.js
+++ b/js/ui/backgroundMenu.js
@@ -25,7 +25,7 @@ var BackgroundMenu = class BackgroundMenu extends PopupMenu.PopupMenu {
 function addBackgroundMenu(actor, layoutManager) {
     actor.reactive = true;
     actor._backgroundMenu = new BackgroundMenu(layoutManager);
-    actor._backgroundManager = new PopupMenu.PopupMenuManager({ actor: actor });
+    actor._backgroundManager = new PopupMenu.PopupMenuManager(actor);
     actor._backgroundManager.addMenu(actor._backgroundMenu);
 
     function openMenu(x, y) {
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 81d5a86b5..d61d18792 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -1180,7 +1180,7 @@ var PopupMenuManager = class {
         grabParams = Params.parse(grabParams,
                                   { actionMode: Shell.ActionMode.POPUP });
         this._owner = owner;
-        this._grabHelper = new GrabHelper.GrabHelper(owner.actor, grabParams);
+        this._grabHelper = new GrabHelper.GrabHelper(owner, grabParams);
         this._menus = [];
     }
 
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
index 79f1aad3e..62b42f71b 100644
--- a/js/ui/shellEntry.js
+++ b/js/ui/shellEntry.js
@@ -148,7 +148,7 @@ function addContextMenu(entry, params) {
 
     entry.menu = new EntryMenu(entry);
     entry.menu.isPassword = params.isPassword;
-    entry._menuManager = new PopupMenu.PopupMenuManager({ actor: entry },
+    entry._menuManager = new PopupMenu.PopupMenuManager(entry,
                                                         { actionMode: params.actionMode });
     entry._menuManager.addMenu(entry.menu);
 
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
index 628f145ea..18bda4057 100644
--- a/js/ui/windowMenu.js
+++ b/js/ui/windowMenu.js
@@ -173,7 +173,7 @@ var WindowMenu = class extends PopupMenu.PopupMenu {
 
 var WindowMenuManager = class {
     constructor() {
-        this._manager = new PopupMenu.PopupMenuManager({ actor: Main.layoutManager.dummyCursor });
+        this._manager = new PopupMenu.PopupMenuManager(Main.layoutManager.dummyCursor);
 
         this._sourceActor = new St.Widget({ reactive: true, visible: false });
         this._sourceActor.connect('button-press-event', () => {


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