From 662fa0538d1babb882543218c4f3683019920d65 Mon Sep 17 00:00:00 2001 From: "John M. Horan" Date: Thu, 11 May 2017 16:23:08 -0700 Subject: [PATCH 1/2] Add keyboard shortcuts to "File" submenu #65 * Shortcuts for JSON import, JSON export and Quit. * Addresses issue https://github.com/nexB/aboutcode-manager/issues/65 Signed-off-by: John M. Horan --- main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index a8def81e..0d97668c 100644 --- a/main.js +++ b/main.js @@ -40,17 +40,18 @@ app.on('activate', function () { function getTemplate() { const template = [ { - label: 'File', - + label: 'File', submenu: [ { label: "Import JSON File", + accelerator: 'CmdOrCtrl+I', click: function (menuItem, currentWindow) { currentWindow.webContents.send('import-JSON') } }, { label: "Export JSON File", + accelerator: 'CmdOrCtrl+E', click: function (menuItem, currentWindow) { currentWindow.webContents.send('export-JSON') } @@ -258,6 +259,7 @@ const pjson = require('./package.json'); const quitSubmenu = { label: "Quit", + accelerator: 'CmdOrCtrl+Q', click: () => { app.quit(); } From c88b969e04ee183a30b20c1e2ef99b7a1f22e1c7 Mon Sep 17 00:00:00 2001 From: "John M. Horan" Date: Mon, 15 May 2017 12:40:48 -0700 Subject: [PATCH 2/2] Remove trailing spaces #65 * Removed trailing spaces on line 43 of main.js. Signed-off-by: John M. Horan --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 0d97668c..5f83fe4c 100644 --- a/main.js +++ b/main.js @@ -40,7 +40,7 @@ app.on('activate', function () { function getTemplate() { const template = [ { - label: 'File', + label: 'File', submenu: [ { label: "Import JSON File",