]> khamidou — GitHub mirrors - electron.git/commitdiff
BrowserWindow::setMenu is available on Linux.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 19 Feb 2014 13:06:45 +0000 (13:06 +0000)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 19 Feb 2014 13:06:45 +0000 (13:06 +0000)
browser/api/lib/browser-window.coffee

index 8503d8a4378d87b488bd235d01e60809dd14e9ce..38946c5500af511037bec6780c1d915208d4aa40 100644 (file)
@@ -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'