Make sure application menu always get referenced.
This commit is contained in:
parent
defb6c9882
commit
587484a5d0
1 changed files with 2 additions and 0 deletions
|
@ -43,8 +43,10 @@ Menu::insert = (pos, item) ->
|
|||
@items.splice pos, 0, item
|
||||
@commandsMap[item.commandId] = item
|
||||
|
||||
applicationMenu = null
|
||||
Menu.setApplicationMenu = (menu) ->
|
||||
throw new TypeError('Invalid menu') unless menu?.constructor is Menu
|
||||
applicationMenu = menu # Keep a reference.
|
||||
bindings.setApplicationMenu menu
|
||||
|
||||
Menu.sendActionToFirstResponder = bindings.sendActionToFirstResponder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue