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
This commit is contained in:
Marco Trevisan (Treviño) 2019-04-09 18:23:59 -05:00 committed by Florian Müllner
parent 44fcb9e9af
commit 7bb84dae80
6 changed files with 6 additions and 6 deletions

@ -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', () => {