Remove unnecessary lines

This commit is contained in:
Ben Ogle
2013-10-18 17:41:32 -07:00
parent 9f753cd3b9
commit 0b74dfc67a
3 changed files with 5 additions and 16 deletions

View File

@@ -42,32 +42,24 @@ class ThemeManager
activateThemes: ->
# atom.config.observe runs the callback once, then on subsequent changes.
atom.config.observe 'core.themes', (themeNames) =>
@deactivateThemes()
@packageManager.deactivatePackages()
themeNames = [themeNames] unless _.isArray(themeNames)
# Reverse so the first (top) theme is loaded after the others. We want
# the first/top theme to override later themes in the stack.
themeNames = _.clone(themeNames).reverse()
@activateTheme(themeName) for themeName in themeNames
@packageManager.activatePackage(themeName) for themeName in themeNames
@loadUserStylesheet()
@reloadBaseStylesheets()
@emit('reloaded')
# Internal-only:
activateTheme: (themeName) ->
@packageManager.activatePackage(themeName)
# Internal-only:
deactivateThemes: ->
@removeStylesheet(@userStylesheetPath) if @userStylesheetPath?
@deactivateTheme(pack.name) for pack in @getActiveThemes()
@packageManager.deactivatePackage(pack.name) for pack in @getActiveThemes()
null
# Internal-only:
deactivateTheme: (themeName) ->
@packageManager.deactivatePackage(themeName)
# Public:
getImportPaths: ->
activeThemes = @getActiveThemes()