menu: implement plugin updating in menu

This commit is contained in:
Guillermo Rauch 2016-07-07 16:23:23 -07:00
parent c693a46896
commit c97b67b4c8

14
menu.js
View file

@ -7,7 +7,7 @@ const appName = app.getName();
// https://github.com/sindresorhus/anatine/blob/master/menu.js
module.exports = function createMenu ({ createWindow }) {
module.exports = function createMenu ({ createWindow, updatePlugins }) {
return [
{
label: 'Application',
@ -152,6 +152,18 @@ module.exports = function createMenu ({ createWindow }) {
}
]
},
{
label: 'Tools',
submenu: [
{
label: 'Update plugins',
accelerator: 'CmdOrCtrl+U',
click (item, focusedWindow) {
updatePlugins();
}
}
]
},
{
label: 'Window',
submenu: [