node.js - Prevent multiple tray icons in Node Webkit? -
is there way check if tray icon exists given app in node webkit (on osx)?
my problem looks this:
code used create tray icon:
// create tray icon if (os_platform === 'darwin'){ //better icon windows, correct size mac var tray = new gui.tray({ title: '', icon: 'icon-mac.png', tooltip: 'r' }); } else { var tray = new gui.tray({ title: '', icon: 'icon-win.png', tooltip: 'r' }); }
this trick.
window.onbeforeunload = function(){ tray.remove(); };
Comments
Post a Comment