Commit 7bb84dae authored by Marco Trevisan's avatar Marco Trevisan 🎺 Committed by Florian Müllner

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

!487
parent 44fcb9e9
Pipeline #76001 passed with stages
in 4 minutes and 33 seconds
......@@ -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);
......
......@@ -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);
......
......@@ -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) {
......
......@@ -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 = [];
}
......
......@@ -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);
......
......@@ -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', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment