fix: OS X has no tray icon

This commit is contained in:
Feross Aboukhadijeh
2016-04-04 00:32:18 -07:00
committed by DC
parent 94bcc7b2e2
commit 5d5a32858d

View File

@@ -9,10 +9,12 @@ var windows = require('./windows')
var trayIcon
function init () {
// No tray icon on OSX
if (process.platform === 'darwin') {
// Instead of relying on the tray icon quit button, listen for Cmd+Q
electron.app.once('before-quit', quitApp)
// OS X has no tray icon
return
}
trayIcon = new electron.Tray(path.join(__dirname, '..', 'static', 'WebTorrentSmall.png'))