Use rootView.open to display config panel

This commit is contained in:
probablycorey
2013-07-08 10:11:11 -07:00
parent cbb6d58d1b
commit f70c6928cd
2 changed files with 9 additions and 11 deletions

View File

@@ -6,6 +6,9 @@ Pane = require 'pane'
SettingsPanel = require './settings-panel'
ThemePanel = require './theme-panel'
PackagePanel = require './package-panel'
Project = require 'project'
configUri = "atom://config"
###
# Internal #
@@ -16,16 +19,11 @@ class ConfigView extends ScrollView
registerDeserializer(this)
@activate: (state) ->
rootView.command 'config-view:toggle', ->
configView = new ConfigView()
activePane = rootView.getActivePane()
if activePane
activePane.showItem(configView)
else
activePane = new Pane(configView)
rootView.panes.append(activePane)
Project.registerOpener (filePath) ->
new ConfigView() if filePath is configUri
activePane.focus()
rootView.command 'config-view:toggle', ->
rootView.open(configUri)
@deserialize: ({activePanelName}={}) ->
new ConfigView(activePanelName)
@@ -86,7 +84,7 @@ class ConfigView extends ScrollView
"Atom Config"
getUri: ->
"atom://config"
configUri
isEqual: (other) ->
other instanceof ConfigView

View File

@@ -35,7 +35,7 @@ class SettingsPanel extends View
finally
callback()
async.map atom.getLoadedPackages(), iterator, finishedCallback
async.each atom.getLoadedPackages(), iterator, finishedCallback
appendSettings: (namespace, settings) ->
return if _.isEmpty(settings)