more fix on menus

This commit is contained in:
Damillora 2017-07-04 02:02:17 +07:00
parent 766edbc6c4
commit 18878a20d6

17
menu.js
View File

@ -7,13 +7,6 @@ const options = {userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6
module.exports = function(win){ module.exports = function(win){
const template = [ const template = [
{
label: "File",
submenu: [
{label: 'Preferences',click(){prefman.showPreferences()}},
],
visible: process.platform !== 'darwin'
},
{ {
label: 'Edit', label: 'Edit',
submenu: [ submenu: [
@ -72,7 +65,6 @@ module.exports = function(win){
] ]
} }
] ]
if (process.platform === 'darwin') { if (process.platform === 'darwin') {
template.unshift({ template.unshift({
label: app.getName(), label: app.getName(),
@ -111,6 +103,15 @@ module.exports = function(win){
{type: 'separator'}, {type: 'separator'},
{role: 'front'} {role: 'front'}
] ]
} else
{
template.unshift({
label: "File",
submenu: [
{label: 'Preferences',click(){prefman.showPreferences()}},
],
visible: process.platform !== 'darwin'
})
} }
const themenu = Menu.buildFromTemplate(template); const themenu = Menu.buildFromTemplate(template);