From 0c9d6312a472864c4635e2cc6a7cffae8d699fda Mon Sep 17 00:00:00 2001 From: zweicoder Date: Sat, 30 Jan 2016 10:48:48 +0800 Subject: [PATCH] Fix app not hiding and add quit option --- app/src/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main.js b/app/src/main.js index 7b89872..02ed807 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -38,6 +38,7 @@ app.on('window-all-closed', () => { // determined opts if(appArgs.minimizeToTray){ mainWindow.hide(); + return; } if (!isOSX()) { app.quit(); @@ -79,6 +80,13 @@ app.on('ready', () => { appArgs.minimizeToTray = menuItem.checked = !menuItem.checked; fs.writeFileSync(APP_ARGS_FILE_PATH, JSON.stringify(appArgs)); } + }, + { + label: 'Close', + type: 'normal', + click: function (menuItem) { + app.quit(); + } } ]); appIcon.setContextMenu(menu);