Load themes after packages, since we depend on them

This commit is contained in:
Matt Colyer
2013-08-30 15:59:41 -07:00
parent a4dedeb92d
commit b1675714e6
3 changed files with 6 additions and 4 deletions

View File

@@ -66,8 +66,10 @@ window.atom =
if packagePath = @resolvePackagePath(name)
return pack if pack = @getLoadedPackage(name)
pack = Package.load(packagePath, options)
@loadedPackages[pack.name] = pack
@themes.register(pack) if pack.metadata.theme?
if pack.metadata.theme
@themes.register(pack)
else
@loadedPackages[pack.name] = pack
pack
else
throw new Error("Could not resolve '#{name}' to a package path")

View File

@@ -38,7 +38,7 @@ class ThemeManager
@trigger('reloaded')
activateTheme: (name) ->
theme = _.find(@registeredTheme, (t) -> t.metadata.name == name)
theme = _.find(@registeredThemes, (t) -> t.metadata.name == name)
return console.warn("Theme '#{name}' not found.") unless theme
try

View File

@@ -54,8 +54,8 @@ window.startEditorWindow = ->
config.load()
keymap.loadBundledKeymaps()
atom.loadBaseStylesheets()
atom.loadThemes()
atom.loadPackages()
atom.loadThemes()
deserializeEditorWindow()
atom.activatePackages()
keymap.loadUserKeymaps()