Add API for configuring default events for non-editor windows

Used by collaboration for when joining fails but basic keybindings
and events should still work.
This commit is contained in:
Kevin Sawicki
2013-09-23 16:31:13 -07:00
parent b2d543b9ee
commit f5a034f38a

View File

@@ -41,6 +41,16 @@ window.setUpEnvironment = (windowMode) ->
window.pasteboard = new Pasteboard
window.keymap = new Keymap()
# Set up the default event handlers and menus for a non-editor windows.
#
# This can be used by packages to have a minimum level of keybindings and
# menus available when not using the standard editor window.
window.setUpDefaultEvents = ->
windowEventHandler = new WindowEventHandler
keymap.loadBundledKeymaps()
ipc.sendChannel 'update-application-menu', keymap.keystrokesByCommandForSelector('body')
# This method is only called when opening a real application window
window.startEditorWindow = ->
installAtomCommand()