From: Cheng Zhao Date: Wed, 19 Feb 2014 13:06:45 +0000 (+0000) Subject: BrowserWindow::setMenu is available on Linux. X-Git-Tag: v0.10.0~6^2~16 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=27cd6688c112f73295d8f3773acce57586ee6e70;p=electron.git BrowserWindow::setMenu is available on Linux. --- diff --git a/browser/api/lib/browser-window.coffee b/browser/api/lib/browser-window.coffee index 8503d8a4..38946c55 100644 --- a/browser/api/lib/browser-window.coffee +++ b/browser/api/lib/browser-window.coffee @@ -34,7 +34,8 @@ BrowserWindow::restart = -> @loadUrl(@getUrl()) BrowserWindow::setMenu = (menu) -> - throw new Error('BrowserWindow.setMenu is only available on Windows') unless process.platform is 'win32' + if process.platform is 'darwin' + throw new Error('BrowserWindow.setMenu is not available on OS X') throw new TypeError('Invalid menu') unless menu?.constructor?.name is 'Menu'