From a1c2de3621f3ccb415d6ed59da73e6f5cf3474c3 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Fri, 15 Sep 2017 12:16:20 +0530 Subject: [PATCH] electron-17: supported opening crashes directory from the menu --- js/menus/menuTemplate.js | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/js/menus/menuTemplate.js b/js/menus/menuTemplate.js index f5f6ce27..b8be4691 100644 --- a/js/menus/menuTemplate.js +++ b/js/menus/menuTemplate.js @@ -66,6 +66,10 @@ const template = [{ } } }, + { + label: 'Open Crashes Directory', + click() { electron.shell.showItemInFolder(crashReporter.getCrashDirectoryPath()); } + }, { type: 'separator' }, @@ -102,25 +106,6 @@ const template = [{ { label: 'Learn More', click() { electron.shell.openExternal('https://www.symphony.com'); } - }, - { - label: 'Crash Directory Info', - click() { - electron.dialog.showMessageBox(null, { - type: 'info', - buttons: ['Copy', 'OK'], - defaultId: 0, - cancelId: 1, - noLink: true, - title: 'Crash Directory Path', - message: crashReporter.getCrashDirectoryPath() - }, response); - function response(buttonId) { - if (buttonId === 0) { - electron.clipboard.writeText(crashReporter.getCrashDirectoryPath()); - } - } - } }] } ];