diff --git a/app/menus/menu.js b/app/menus/menu.js index 61ca2323..e6959270 100644 --- a/app/menus/menu.js +++ b/app/menus/menu.js @@ -48,7 +48,7 @@ exports.createMenu = (createWindow, getLoadedPluginVersions) => { }); }; const menu = [ - ...(process.platform === 'darwin' ? [darwinMenu(commandKeys, showAbout)] : []), + ...(process.platform === 'darwin' ? [darwinMenu(commandKeys, execCommand, showAbout)] : []), shellMenu(commandKeys, execCommand), editMenu(commandKeys, execCommand), viewMenu(commandKeys, execCommand), diff --git a/app/menus/menus/darwin.js b/app/menus/menus/darwin.js index c2694553..5badbd8a 100644 --- a/app/menus/menus/darwin.js +++ b/app/menus/menus/darwin.js @@ -2,7 +2,7 @@ // The label is set to appName here so it matches actual behavior const {app} = require('electron'); -module.exports = (commandKeys, showAbout) => { +module.exports = (commandKeys, execCommand, showAbout) => { return { label: `${app.getName()}`, submenu: [ @@ -17,7 +17,10 @@ module.exports = (commandKeys, showAbout) => { }, { label: 'Preferences...', - accelerator: commandKeys['window:preferences'] + accelerator: commandKeys['window:preferences'], + click() { + execCommand('window:preferences'); + } }, { type: 'separator' diff --git a/app/menus/menus/edit.js b/app/menus/menus/edit.js index c20e9380..b55f672a 100644 --- a/app/menus/menus/edit.js +++ b/app/menus/menus/edit.js @@ -45,7 +45,10 @@ module.exports = (commandKeys, execCommand) => { {type: 'separator'}, { label: 'Preferences...', - accelerator: commandKeys['window:preferences'] + accelerator: commandKeys['window:preferences'], + click() { + execCommand('window:preferences'); + } } ); }