Remove JS override of setMenu

This commit is contained in:
Cheng Zhao 2015-06-24 19:51:11 +08:00
parent f198148c79
commit 9b9108f789
3 changed files with 17 additions and 14 deletions

View file

@ -27,12 +27,6 @@ BrowserWindow::_init = ->
@on 'focus', (event) =>
app.emit 'browser-window-focus', event, this
BrowserWindow::setMenu = (menu) ->
throw new TypeError('Invalid menu') unless menu is null or menu?.constructor?.name is 'Menu'
@menu = menu # Keep a reference of menu in case of GC.
@_setMenu menu
BrowserWindow.getFocusedWindow = ->
windows = BrowserWindow.getAllWindows()
return window for window in windows when window.isFocused()