more fix on menus

This commit is contained in:
Damillora 2017-07-04 02:02:17 +07:00
parent 766edbc6c4
commit 18878a20d6
1 changed files with 9 additions and 8 deletions

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){
const template = [
{
label: "File",
submenu: [
{label: 'Preferences',click(){prefman.showPreferences()}},
],
visible: process.platform !== 'darwin'
},
{
label: 'Edit',
submenu: [
@ -72,7 +65,6 @@ module.exports = function(win){
]
}
]
if (process.platform === 'darwin') {
template.unshift({
label: app.getName(),
@ -111,6 +103,15 @@ module.exports = function(win){
{type: 'separator'},
{role: 'front'}
]
} else
{
template.unshift({
label: "File",
submenu: [
{label: 'Preferences',click(){prefman.showPreferences()}},
],
visible: process.platform !== 'darwin'
})
}
const themenu = Menu.buildFromTemplate(template);