mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
RootView deactivates extensions when it is deactivated
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user