Add menu item role defaults

This commit is contained in:
Kevin Sawicki 2016-06-22 10:29:49 -07:00
parent 56b3478760
commit 25b2724ab9
2 changed files with 66 additions and 0 deletions

View file

@ -21,6 +21,7 @@
'lib/browser/api/ipc-main.js',
'lib/browser/api/menu.js',
'lib/browser/api/menu-item.js',
'lib/browser/api/menu-item-roles.js',
'lib/browser/api/navigation-controller.js',
'lib/browser/api/power-monitor.js',
'lib/browser/api/power-save-blocker.js',

View file

@ -0,0 +1,65 @@
module.exports = {
undo: {
label: 'Undo',
accelerator: 'CmdOrCtrl+Z',
method: 'undo'
},
redo: {
label: 'Redo',
accelerator: 'Shift+CmdOrCtrl+Z',
method: 'redo'
},
cut: {
label: 'Cut',
accelerator: 'CmdOrCtrl+X',
method: 'cut'
},
copy: {
label: 'Copy',
accelerator: 'CmdOrCtrl+C',
method: 'copy'
},
paste: {
label: 'Paste',
accelerator: 'CmdOrCtrl+V',
method: 'paste'
},
pasteandmatchstyle: {
label: 'Paste and Match Style',
accelerator: 'Shift+Command+V',
method: 'pasteAndMatchStyle'
},
selectall: {
label: 'Select All',
accelerator: 'CmdOrCtrl+A',
method: 'selectAll'
},
minimize: {
label: 'Minimize',
accelerator: 'CmdOrCtrl+M',
method: 'minimize'
},
close: {
label: 'Close',
accelerator: 'CmdOrCtrl+W',
method: 'close'
},
delete: {
label: 'Delete',
accelerator: 'Delete',
method: 'delete'
},
quit: {
get label () {
const {app} = require('electron')
return process.platform === 'win32' ? 'Exit' : `Quit ${app.getName()}`
},
accelerator: process.platform === 'win32' ? null : 'Command+Q',
method: 'quit'
},
togglefullscreen: {
label: 'Toggle Full Screen',
accelerator: process.platform === 'darwin' ? 'Ctrl+Command+F' : 'F11',
method: 'toggleFullScreen'
}
}