RootView deactivates extensions when it is deactivated

This commit is contained in:
Corey Johnson
2012-05-03 17:31:37 -07:00
parent f3c89240a3
commit 670717ca3b
3 changed files with 26 additions and 15 deletions

View File

@@ -88,6 +88,11 @@ class RootView extends View
@extensions[extension.name] = extension
extension.activate(this, @extensionStates[extension.name])
deactivate: ->
atom.rootViewStates[$windowNumber] = @serialize()
extension.deactivate() for name, extension of @extensions
@remove()
open: (path) ->
buffer = @project.open(path)

View File

@@ -31,8 +31,7 @@ windowAdditions =
atom.windowOpened this
shutdown: ->
@saveRootViewState()
@rootView.remove()
@rootView.deactivate()
$(window).unbind('focus')
$(window).unbind('blur')
$(window).off('before')
@@ -46,9 +45,6 @@ windowAdditions =
new RootView {pathToOpen}
$(@rootViewParentSelector).append @rootView
saveRootViewState: ->
atom.rootViewStates[$windowNumber] = @rootView.serialize()
loadUserConfiguration: ->
try
require atom.userConfigurationPath if fs.exists(atom.userConfigurationPath)