mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Move Keymap init above MenuManager init
This commit is contained in:
@@ -36,6 +36,8 @@ class Atom
|
||||
ContextMenuManager = require './context-menu-manager'
|
||||
MenuManager = require './menu-manager'
|
||||
|
||||
@config = new Config()
|
||||
@keymap = new Keymap()
|
||||
@packages = new PackageManager()
|
||||
|
||||
#TODO Remove once packages have been updated to not touch atom.packageStates directly
|
||||
@@ -43,12 +45,10 @@ class Atom
|
||||
@__defineSetter__ 'packageStates', (packageStates) => @packages.packageStates = packageStates
|
||||
|
||||
@subscribe @packages, 'loaded', => @watchThemes()
|
||||
@config = new Config()
|
||||
@themes = new ThemeManager()
|
||||
@contextMenu = new ContextMenuManager(@getLoadSettings().devMode)
|
||||
@menu = new MenuManager()
|
||||
@pasteboard = new Pasteboard()
|
||||
@keymap = new Keymap()
|
||||
@syntax = deserialize(@getWindowState('syntax')) ? new Syntax()
|
||||
|
||||
getCurrentWindow: ->
|
||||
|
||||
@@ -30,7 +30,7 @@ class MenuManager
|
||||
|
||||
# Public: Refreshes the currently visible menu.
|
||||
update: ->
|
||||
@sendToBrowserProcess()
|
||||
@sendToBrowserProcess(@template, atom.keymap.keystrokesByCommandForSelector('body'))
|
||||
|
||||
# Private
|
||||
loadCoreItems: ->
|
||||
@@ -48,7 +48,6 @@ class MenuManager
|
||||
menu.push(item)
|
||||
|
||||
# Private
|
||||
sendToBrowserProcess: ->
|
||||
return unless atom.keymap
|
||||
ipc.sendChannel 'update-application-menu', @template, atom.keymap.keystrokesByCommandForSelector('body')
|
||||
sendToBrowserProcess: (template, keystrokesByCommand) ->
|
||||
ipc.sendChannel 'update-application-menu', template, keystrokesByCommand
|
||||
|
||||
|
||||
Reference in New Issue
Block a user