Remove "async" option from menu.popup()
All menus are async now. See "Cleanup MenuRunner API" https://codereview.chromium.org/2790773002
This commit is contained in:
parent
338604239d
commit
4e859b4718
7 changed files with 32 additions and 51 deletions
|
@ -44,7 +44,6 @@ Menu.prototype._init = function () {
|
|||
}
|
||||
|
||||
Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
let asyncPopup
|
||||
let [newX, newY, newPosition, newWindow] = [x, y, positioningItem, window]
|
||||
|
||||
// menu.popup(x, y, positioningItem)
|
||||
|
@ -61,7 +60,6 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
|||
newX = opts.x
|
||||
newY = opts.y
|
||||
newPosition = opts.positioningItem
|
||||
asyncPopup = opts.async
|
||||
}
|
||||
|
||||
// set defaults
|
||||
|
@ -69,9 +67,8 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
|||
if (typeof y !== 'number') newY = -1
|
||||
if (typeof positioningItem !== 'number') newPosition = -1
|
||||
if (!window) newWindow = BrowserWindow.getFocusedWindow()
|
||||
if (typeof asyncPopup !== 'boolean') asyncPopup = false
|
||||
|
||||
this.popupAt(newWindow, newX, newY, newPosition, asyncPopup)
|
||||
this.popupAt(newWindow, newX, newY, newPosition)
|
||||
}
|
||||
|
||||
Menu.prototype.closePopup = function (window) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue