diff --git a/lib/main-app.js b/lib/main-app.js index 3078f4b8..400bde23 100644 --- a/lib/main-app.js +++ b/lib/main-app.js @@ -269,7 +269,7 @@ app.on('ready', function () { checkUpdate() mainWindow = require('./main-window') - if (process.platform === 'win32') { + if (process.platform === 'win32' || process.platform === 'linux') { mainWindow.setMenu(menu) } mainWindow.on('close', function (e) { diff --git a/lib/main-menu.js b/lib/main-menu.js index 1218fed0..678dfaa9 100644 --- a/lib/main-menu.js +++ b/lib/main-menu.js @@ -5,6 +5,7 @@ const mainWindow = require('./main-window') const OSX = process.platform === 'darwin' const WIN = process.platform === 'win32' +const LINUX = process.platform === 'linux' var boost = { label: 'Boostnote', @@ -58,23 +59,6 @@ var file = { mainWindow.webContents.send('nav-new-folder') } }, - // { - // type: 'separator' - // }, - // { - // label: 'Save Post', - // accelerator: OSX ? 'Command + S' : 'Control + S', - // click: function () { - // mainWindow.webContents.send('detail-save') - // } - // }, - // { - // label: 'Save All Posts', - // accelerator: OSX ? 'Command + Shift + S' : 'Control + Shift + S', - // click: function () { - // mainWindow.webContents.send('top-save-all') - // } - // }, { type: 'separator' }, @@ -88,6 +72,19 @@ var file = { ] } +if (LINUX) { + file.submenu.push({ + type: 'separator' + }) + file.submenu.push({ + label: 'Quit Boostnote', + accelerator: 'Control + Q', + click: function () { + mainWindow.close() + } + }) +} + var edit = { label: 'Edit', submenu: [ @@ -201,4 +198,6 @@ var help = { module.exports = process.platform === 'darwin' ? [boost, file, edit, view, window, help] + : process.platform === 'win32' + ? [file, view, help] : [file, view, help]