Add back edit menu.

On OS X, applications rely on the menu to trigger native events for
various commands. Editor view doesn't need it before it listens to the
keyboard shortcuts itself. Since spec window and devtools view don't
listen to keyboard shortcuts, we should rely on the menu to make edit
commands work.

Fixed atom/atom-shell#18.
This commit is contained in:
Cheng Zhao
2013-06-06 10:15:33 +08:00
parent 7ccf2390a7
commit 01b583957e

View File

@@ -146,6 +146,18 @@ class AtomApplication
{ label: 'Open...', accelerator: 'Command+O', click: => @promptForPath() }
]
menus.push
label: 'Edit'
submenu:[
{ label: 'Undo', accelerator: 'Command+Z', selector: 'undo:' }
{ label: 'Redo', accelerator: 'Command+Shift+Z', selector: 'redo:' }
{ type: 'separator' }
{ label: 'Cut', accelerator: 'Command+X', selector: 'cut:' }
{ label: 'Copy', accelerator: 'Command+C', selector: 'copy:' }
{ label: 'Paste', accelerator: 'Command+V', selector: 'paste:' }
{ label: 'Select All', accelerator: 'Command+A', selector: 'selectAll:' }
]
menus.push
label: 'View'
submenu:[