From db7b78825d88caae079c7c1827091f1f80c85cee Mon Sep 17 00:00:00 2001 From: Mathieu Gosbee Date: Fri, 11 Dec 2015 00:05:52 -0500 Subject: [PATCH] quit from tray --- src/main.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 13849d9..5acb26e 100644 --- a/src/main.js +++ b/src/main.js @@ -8,7 +8,20 @@ var lib; var contextMenu = new Menu(); +contextMenu.append(new MenuItem({ + type: 'separator' +})); +// contextMenu.append(new MenuItem({ +// type: 'separator' +// })); +contextMenu.append(new MenuItem({ + type: 'normal', + label: 'Close', + click: () => { + app.quit(); + } +})); /* Some usefull chrome args */ app.commandLine.appendSwitch('v', -1); app.commandLine.appendSwitch('vmodule', 'console=0'); @@ -27,7 +40,7 @@ app.on('ready', () => { }) lib.on("deviceFound", (host, devicename) => { console.log(host, devicename); - contextMenu.append(new MenuItem({ + contextMenu.insert(0, new MenuItem({ label: devicename, type: 'checkbox', click: () => {