mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Remove references to windowed config panel
This commit is contained in:
@@ -217,18 +217,6 @@ describe "the `atom` global", ->
|
||||
runs ->
|
||||
expect(syntax.getProperty(['.source.pref'], 'editor.increaseIndentPattern')).toBe '^abc$'
|
||||
|
||||
describe ".activatePackageConfig(id)", ->
|
||||
it "calls the optional .activateConfigMenu method on the package's main module", ->
|
||||
pack = atom.activatePackageConfig('package-with-activate-config')
|
||||
expect(pack.mainModule.activateCalled).toBeFalsy()
|
||||
expect(pack.mainModule.activateConfigCalled).toBeTruthy()
|
||||
|
||||
it "loads the package's config defaults", ->
|
||||
expect(config.get('package-with-config-defaults.numbers.one')).toBeUndefined()
|
||||
atom.activatePackageConfig('package-with-config-defaults')
|
||||
expect(config.get('package-with-config-defaults.numbers.one')).toBe 1
|
||||
expect(config.get('package-with-config-defaults.numbers.two')).toBe 2
|
||||
|
||||
describe ".deactivatePackage(id)", ->
|
||||
describe "atom packages", ->
|
||||
it "calls `deactivate` on the package's main module", ->
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
module.exports =
|
||||
activate: -> @activateCalled = true
|
||||
activateConfig: -> @activateConfigCalled = true
|
||||
@@ -42,7 +42,6 @@ beforeEach ->
|
||||
window.git = Git.open(window.project.getPath())
|
||||
|
||||
window.resetTimeouts()
|
||||
atom.windowMode = 'editor'
|
||||
atom.packageStates = {}
|
||||
spyOn(atom, 'saveWindowState')
|
||||
syntax.clearGrammarOverrides()
|
||||
|
||||
@@ -54,15 +54,6 @@ window.atom =
|
||||
getActivePackages: ->
|
||||
_.values(@activePackages)
|
||||
|
||||
activatePackageConfigs: ->
|
||||
@activatePackageConfig(pack.name) for pack in @getLoadedPackages()
|
||||
|
||||
activatePackageConfig: (name, options) ->
|
||||
if pack = @loadPackage(name, options)
|
||||
@activePackages[pack.name] = pack
|
||||
pack.activateConfig()
|
||||
pack
|
||||
|
||||
loadPackages: ->
|
||||
@loadPackage(name) for name in @getAvailablePackageNames() when not @isPackageDisabled(name)
|
||||
|
||||
@@ -172,9 +163,6 @@ window.atom =
|
||||
newWindow: ->
|
||||
ipc.sendChannel('new-window')
|
||||
|
||||
openConfig: ->
|
||||
ipc.sendChannel('open-config')
|
||||
|
||||
openWindow: (windowSettings) ->
|
||||
ipc.sendChannel('open-window', windowSettings)
|
||||
|
||||
@@ -237,7 +225,7 @@ window.atom =
|
||||
|
||||
getWindowStatePath: ->
|
||||
switch @windowMode
|
||||
when 'config', 'spec'
|
||||
when 'spec'
|
||||
filename = @windowMode
|
||||
when 'editor'
|
||||
{initialPath} = @getLoadSettings()
|
||||
|
||||
@@ -31,7 +31,6 @@ class Keymap
|
||||
|
||||
bindDefaultKeys: ->
|
||||
$(document).command 'new-window', => atom.newWindow()
|
||||
$(document).command 'open-user-configuration', => atom.openConfig()
|
||||
$(document).command 'open', => atom.open()
|
||||
$(document).command 'open-dev', => atom.openDev()
|
||||
$(document).command 'toggle-dev-tools', => atom.toggleDevTools()
|
||||
|
||||
@@ -60,20 +60,6 @@ window.startEditorWindow = ->
|
||||
atom.show()
|
||||
atom.focus()
|
||||
|
||||
window.startConfigWindow = ->
|
||||
restoreDimensions()
|
||||
windowEventHandler = new WindowEventHandler
|
||||
config.load()
|
||||
keymap.loadBundledKeymaps()
|
||||
atom.loadThemes()
|
||||
atom.loadPackages()
|
||||
deserializeConfigWindow()
|
||||
atom.activatePackageConfigs()
|
||||
keymap.loadUserKeymaps()
|
||||
$(window).on 'unload', -> unloadConfigWindow(); false
|
||||
atom.show()
|
||||
atom.focus()
|
||||
|
||||
window.unloadEditorWindow = ->
|
||||
return if not project and not rootView
|
||||
windowState = atom.getWindowState()
|
||||
@@ -98,13 +84,6 @@ window.installApmCommand = (callback) ->
|
||||
commandPath = path.join(window.resourcePath, 'node_modules', '.bin', 'apm')
|
||||
require('command-installer').install(commandPath, callback)
|
||||
|
||||
window.unloadConfigWindow = ->
|
||||
return if not configView
|
||||
atom.getWindowState().set('configView', configView.serialize())
|
||||
configView.remove()
|
||||
windowEventHandler?.unsubscribe()
|
||||
window.configView = null
|
||||
|
||||
window.onDrop = (e) ->
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
@@ -140,11 +119,6 @@ window.deserializeEditorWindow = ->
|
||||
window.git?.destroy()
|
||||
window.git = Git.open(projectPath)
|
||||
|
||||
window.deserializeConfigWindow = ->
|
||||
ConfigView = require 'config-view'
|
||||
window.configView = deserialize(atom.getWindowState('configView')) ? new ConfigView()
|
||||
$(rootViewParentSelector).append(configView)
|
||||
|
||||
window.stylesheetElementForId = (id) ->
|
||||
$("""head style[id="#{id}"]""")
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ class AtomApplication
|
||||
client.on 'error', createAtomApplication
|
||||
|
||||
windows: null
|
||||
configWindow: null
|
||||
menu: null
|
||||
resourcePath: null
|
||||
installUpdate: null
|
||||
@@ -93,7 +92,7 @@ class AtomApplication
|
||||
submenu: [
|
||||
{ label: 'About Atom', selector: 'orderFrontStandardAboutPanel:' }
|
||||
{ type: 'separator' }
|
||||
{ label: 'Preferences...', accelerator: 'Command+,', click: => @openConfig() }
|
||||
{ label: 'Preferences...', accelerator: 'Command+,', click: => console.error("preferences not setup yet") }
|
||||
{ type: 'separator' }
|
||||
{ label: 'Hide Atom', accelerator: 'Command+H', selector: 'hide:' }
|
||||
{ label: 'Hide Others', accelerator: 'Command+Shift+H', selector: 'hideOtherApplications:' }
|
||||
@@ -177,8 +176,10 @@ class AtomApplication
|
||||
@installUpdate = quitAndUpdate
|
||||
@buildApplicationMenu version, quitAndUpdate
|
||||
|
||||
ipc.on 'open-config', =>
|
||||
@openConfig()
|
||||
ipc.on 'close-without-confirm', (processId, routingId) ->
|
||||
window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
|
||||
window.removeAllListeners 'close'
|
||||
window.close()
|
||||
|
||||
ipc.on 'open', (processId, routingId, pathsToOpen) =>
|
||||
if pathsToOpen?.length > 0
|
||||
@@ -241,17 +242,6 @@ class AtomApplication
|
||||
console.log("Killing process #{pid} failed: #{error.code}")
|
||||
delete @pidsToOpenWindows[pid]
|
||||
|
||||
openConfig: ->
|
||||
if @configWindow
|
||||
@configWindow.focus()
|
||||
return
|
||||
|
||||
@configWindow = new AtomWindow
|
||||
bootstrapScript: 'config-bootstrap'
|
||||
resourcePath: @resourcePath
|
||||
@configWindow.browserWindow.on 'destroyed', =>
|
||||
@configWindow = null
|
||||
|
||||
runSpecs: ({exitWhenDone, resourcePath}) ->
|
||||
if resourcePath isnt @resourcePath and not fs.existsSync(resourcePath)
|
||||
resourcePath = @resourcePath
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
date = new Date().getTime()
|
||||
require 'atom'
|
||||
require 'window'
|
||||
|
||||
window.setUpEnvironment('config')
|
||||
window.startConfigWindow()
|
||||
console.log "Load time: #{new Date().getTime() - date}"
|
||||
@@ -1,3 +1,3 @@
|
||||
# DOCUMENT: link to keymap documentation
|
||||
'body':
|
||||
'meta-alt-ctrl-o': 'config-view:toggle'
|
||||
'meta-,': 'config-view:toggle'
|
||||
|
||||
Reference in New Issue
Block a user