1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 02:36:36 +00:00

add quit option to menu & fix sudden app quit caused by finder-window

This commit is contained in:
Dick Choi
2015-12-22 20:17:40 +09:00
committed by Rokt33r
parent 1a527cca10
commit ae1fc7572a
2 changed files with 30 additions and 7 deletions

View File

@@ -36,8 +36,10 @@ nodeIpc.connectTo(
'disconnect',
function () {
nodeIpc.log('<< disconnected from main'.notice)
appQuit = true
app.quit()
if (process.platform === 'darwin') {
appQuit = true
app.quit()
}
}
)
nodeIpc.of.main.on(
@@ -95,9 +97,11 @@ finderWindow.on('blur', function () {
})
finderWindow.on('close', function (e) {
if (appQuit) return true
e.preventDefault()
finderWindow.hide()
if (process.platform === 'darwin') {
if (appQuit) return true
e.preventDefault()
finderWindow.hide()
}
})
var appIcon = new Tray(path.join(__dirname, '../resources/tray-icon.png'))