Only set application menu on OS X.
This commit is contained in:
parent
296feb1a50
commit
286335c8f9
2 changed files with 4 additions and 2 deletions
|
@ -156,9 +156,12 @@ app.on('finish-launching', function() {
|
||||||
];
|
];
|
||||||
|
|
||||||
menu = Menu.buildFromTemplate(template);
|
menu = Menu.buildFromTemplate(template);
|
||||||
|
|
||||||
|
if (process.platform == 'darwin')
|
||||||
Menu.setApplicationMenu(menu);
|
Menu.setApplicationMenu(menu);
|
||||||
|
|
||||||
ipc.on('message', function(processId, routingId, type) {
|
ipc.on('message', function(processId, routingId, type) {
|
||||||
|
console.log(type);
|
||||||
if (type == 'menu')
|
if (type == 'menu')
|
||||||
menu.popup(mainWindow);
|
menu.popup(mainWindow);
|
||||||
});
|
});
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
This is the default mode of Atom Shell, please follow the instructions in
|
This is the default mode of Atom Shell, please follow the instructions in
|
||||||
wiki to get started.
|
wiki to get started.
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
|
||||||
var ipc = require('ipc');
|
var ipc = require('ipc');
|
||||||
|
|
||||||
window.addEventListener('contextmenu', function (e) {
|
window.addEventListener('contextmenu', function (e) {
|
||||||
|
|
Loading…
Reference in a new issue