Permalink
Browse files

Merge branch 'master' of https://github.com/bluegill/katana

  • Loading branch information...
bluegill committed Jul 20, 2018
2 parents 7000ede + c252ec1 commit 854dd96252b404a849cdad85ccd523127c0a6d0f
Showing with 22 additions and 1 deletion.
  1. +22 −1 src/components/preferences.js
@@ -18,7 +18,7 @@
*/

const electron = require('electron')
const { app, shell, BrowserWindow } = electron
const { app, shell, BrowserWindow, Menu } = electron

const ipc = electron.ipcMain

@@ -165,6 +165,27 @@ module.exports = class {
shell.openExternal(url)
})

var template = [{
label: 'Application',
submenu: [
{ label: 'About Application', selector: 'orderFrontStandardAboutPanel:' },
{ type: 'separator' },
{ label: 'Quit', accelerator: 'Command+Q', click: function () { app.quit() }}
]}, {
label: 'Edit',
submenu: [
{ label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:' },
{ label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:' },
{ type: 'separator' },
{ label: 'Cut', accelerator: 'CmdOrCtrl+X', selector: 'cut:' },
{ label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:' },
{ label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:' },
{ label: 'Select All', accelerator: 'CmdOrCtrl+A', selector: 'selectAll:' }
]}
]

Menu.setApplicationMenu(Menu.buildFromTemplate(template))

this.window.once('ready-to-show', () => {
this.window.show()
})

0 comments on commit 854dd96

Please sign in to comment.