fixed bug with tray icon when run from other directories

This commit is contained in:
tigerbot 2017-04-21 16:16:17 -06:00
parent ee7a386421
commit 6ca7811342
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
var path = require('path');
var electron = require('electron'); var electron = require('electron');
var app = electron.app; var app = electron.app;
@ -48,7 +49,7 @@ function checkLinuxTraySupport (cb) {
} }
function createTray() { function createTray() {
tray = new electron.Tray('./images/daplie-logo.png'); tray = new electron.Tray(path.join(__dirname, 'images', 'daplie-logo.png'));
tray.on('click', function () { win.show(); }); tray.on('click', function () { win.show(); });
updateTrayMenu(); updateTrayMenu();
} }