mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Remove unnecessary lines
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user