mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge remote-tracking branch 'origin/master' into cj-keymap-cleanup
This commit is contained in:
@@ -12,7 +12,7 @@ fs = require 'fs-plus'
|
||||
module.exports =
|
||||
class MenuManager
|
||||
# Private:
|
||||
constructor: ->
|
||||
constructor: ({@resourcePath}) ->
|
||||
@template = []
|
||||
atom.keymap.on 'bundled-keymaps-loaded', => @loadCoreItems()
|
||||
|
||||
@@ -38,7 +38,8 @@ class MenuManager
|
||||
|
||||
# Private
|
||||
loadCoreItems: ->
|
||||
menuPaths = fs.listSync(atom.config.bundledMenusDirPath, ['cson', 'json'])
|
||||
menusDirPath = path.join(@resourcePath, 'menus')
|
||||
menuPaths = fs.listSync(menusDirPath, ['cson', 'json'])
|
||||
for menuPath in menuPaths
|
||||
data = CSON.readFileSync(menuPath)
|
||||
@add(data.menu)
|
||||
|
||||
Reference in New Issue
Block a user