mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Use rootView.open to display config panel
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user