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 fb42b84245
commit 5ccabe756a

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'))