diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index bafbaa49f7..a60e326111 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -125,7 +125,40 @@ var dockMenu = Menu.buildFromTemplate([ { label: 'Pro' } ] }, - { label: 'New Command...' } + { label: 'New Command...' }, + { + label: 'Edit', + submenu: [ + { + label: 'Undo', + accelerator: 'CmdOrCtrl+Z', + role: 'undo' + }, + { + label: 'Redo', + accelerator: 'Shift+CmdOrCtrl+Z', + role: 'redo' + }, + { + type: 'separator' + }, + { + label: 'Cut', + accelerator: 'CmdOrCtrl+X', + role: 'cut' + }, + { + label: 'Copy', + accelerator: 'CmdOrCtrl+C', + role: 'copy' + }, + { + label: 'Paste', + accelerator: 'CmdOrCtrl+V', + role: 'paste' + }, + ] + }, ]); app.dock.setMenu(dockMenu); diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index d4ab0099f0..679cc6700d 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -880,6 +880,10 @@ declare module GitHubElectron { * a given menu. */ position?: string; + /** + * Define the action of the menu item, when specified the click property will be ignored + */ + role?: string; } class BrowserWindowProxy {