fix(linux): Additional menu fixes

This commit is contained in:
Ben Gotow 2016-05-15 00:31:29 -05:00
parent 5625713419
commit 5e1c9bf28a
2 changed files with 6 additions and 6 deletions

View file

@ -162,10 +162,10 @@ class ApplicationMenu
label: "N1"
submenu: [
{ label: "Check for Update", metadata: {autoUpdate: true}}
{ label: 'Reload', accelerator: 'Command+R', click: => BrowserWindow.getFocusedWindow()?.reload() }
{ label: 'Close Window', accelerator: 'Command+Shift+W', click: => BrowserWindow.getFocusedWindow()?.close() }
{ label: 'Toggle Dev Tools', accelerator: 'Command+Alt+I', click: => BrowserWindow.getFocusedWindow()?.toggleDevTools() }
{ label: 'Quit', accelerator: 'Command+Q', click: -> app.quit() }
{ label: 'Reload', accelerator: 'CmdOrCtrl+R', click: => BrowserWindow.getFocusedWindow()?.reload() }
{ label: 'Close Window', accelerator: 'CmdOrCtrl+Shift+W', click: => BrowserWindow.getFocusedWindow()?.close() }
{ label: 'Toggle Dev Tools', accelerator: 'CmdOrCtrl+Alt+I', click: => BrowserWindow.getFocusedWindow()?.toggleDevTools() }
{ label: 'Quit', accelerator: 'CmdOrCtrl+Q', click: -> app.quit() }
]
]

View file

@ -82,8 +82,8 @@ class MenuManager
filtered = {}
for key, bindings of keystrokesByCommand
for binding in bindings
continue if binding.indexOf(' ') != -1
continue unless /(cmd|ctrl|shift|alt|mod)/.test(binding)
continue unless binding.indexOf(' ') is -1
continue unless /(cmd|ctrl|shift|alt|mod)/.test(binding) or /f\d+/.test(binding)
filtered[key] ?= []
filtered[key].push(binding)
filtered