Remove label/accelerators with role defaults

This commit is contained in:
Kevin Sawicki 2016-06-22 14:37:16 -07:00
parent b7afe44a5c
commit 4dbdcad05e

View file

@ -39,45 +39,30 @@ const template = [
label: 'Edit', label: 'Edit',
submenu: [ submenu: [
{ {
label: 'Undo',
accelerator: 'CmdOrCtrl+Z',
role: 'undo' role: 'undo'
}, },
{ {
label: 'Redo',
accelerator: 'Shift+CmdOrCtrl+Z',
role: 'redo' role: 'redo'
}, },
{ {
type: 'separator' type: 'separator'
}, },
{ {
label: 'Cut',
accelerator: 'CmdOrCtrl+X',
role: 'cut' role: 'cut'
}, },
{ {
label: 'Copy',
accelerator: 'CmdOrCtrl+C',
role: 'copy' role: 'copy'
}, },
{ {
label: 'Paste',
accelerator: 'CmdOrCtrl+V',
role: 'paste' role: 'paste'
}, },
{ {
label: 'Paste and Match Style',
accelerator: 'Shift+Command+V',
role: 'pasteandmatchstyle' role: 'pasteandmatchstyle'
}, },
{ {
label: 'Delete',
role: 'delete' role: 'delete'
}, },
{ {
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
role: 'selectall' role: 'selectall'
}, },
] ]
@ -93,12 +78,7 @@ const template = [
} }
}, },
{ {
label: 'Toggle Full Screen', role: 'togglefullscreen'
accelerator: process.platform === 'darwin' ? 'Ctrl+Command+F' : 'F11',
click(item, focusedWindow) {
if (focusedWindow)
focusedWindow.setFullScreen(!focusedWindow.isFullScreen());
}
}, },
{ {
label: 'Toggle Developer Tools', label: 'Toggle Developer Tools',
@ -111,23 +91,17 @@ const template = [
] ]
}, },
{ {
label: 'Window',
role: 'window', role: 'window',
submenu: [ submenu: [
{ {
label: 'Minimize',
accelerator: 'CmdOrCtrl+M',
role: 'minimize' role: 'minimize'
}, },
{ {
label: 'Close',
accelerator: 'CmdOrCtrl+W',
role: 'close' role: 'close'
}, },
] ]
}, },
{ {
label: 'Help',
role: 'help', role: 'help',
submenu: [ submenu: [
{ {
@ -144,14 +118,12 @@ if (process.platform === 'darwin') {
label: name, label: name,
submenu: [ submenu: [
{ {
label: 'About ' + name,
role: 'about' role: 'about'
}, },
{ {
type: 'separator' type: 'separator'
}, },
{ {
label: 'Services',
role: 'services', role: 'services',
submenu: [] submenu: []
}, },
@ -159,26 +131,19 @@ if (process.platform === 'darwin') {
type: 'separator' type: 'separator'
}, },
{ {
label: 'Hide ' + name,
accelerator: 'Command+H',
role: 'hide' role: 'hide'
}, },
{ {
label: 'Hide Others',
accelerator: 'Command+Alt+H',
role: 'hideothers' role: 'hideothers'
}, },
{ {
label: 'Show All',
role: 'unhide' role: 'unhide'
}, },
{ {
type: 'separator' type: 'separator'
}, },
{ {
label: 'Quit', role: 'quit'
accelerator: 'Command+Q',
click() { app.quit(); }
}, },
] ]
}); });