diff --git a/spec/app/atom-spec.coffee b/spec/app/atom-spec.coffee index a6528b78e..268691dde 100644 --- a/spec/app/atom-spec.coffee +++ b/spec/app/atom-spec.coffee @@ -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", -> diff --git a/spec/fixtures/packages/package-with-activate-config/index.coffee b/spec/fixtures/packages/package-with-activate-config/index.coffee deleted file mode 100644 index 9a63cbd44..000000000 --- a/spec/fixtures/packages/package-with-activate-config/index.coffee +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = - activate: -> @activateCalled = true - activateConfig: -> @activateConfigCalled = true diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 057986f20..4e5d6b7f5 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -42,7 +42,6 @@ beforeEach -> window.git = Git.open(window.project.getPath()) window.resetTimeouts() - atom.windowMode = 'editor' atom.packageStates = {} spyOn(atom, 'saveWindowState') syntax.clearGrammarOverrides() diff --git a/src/app/atom.coffee b/src/app/atom.coffee index 94b6fb25b..e7903b868 100644 --- a/src/app/atom.coffee +++ b/src/app/atom.coffee @@ -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() diff --git a/src/app/keymap.coffee b/src/app/keymap.coffee index 50404d037..38a0ebe3f 100644 --- a/src/app/keymap.coffee +++ b/src/app/keymap.coffee @@ -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() diff --git a/src/app/window.coffee b/src/app/window.coffee index 4bd8c0dc3..e38b123e7 100644 --- a/src/app/window.coffee +++ b/src/app/window.coffee @@ -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}"]""") diff --git a/src/atom-application.coffee b/src/atom-application.coffee index edd80fa24..0dd01bc2a 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -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 diff --git a/src/config-bootstrap.coffee b/src/config-bootstrap.coffee deleted file mode 100644 index 6e4962f65..000000000 --- a/src/config-bootstrap.coffee +++ /dev/null @@ -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}" diff --git a/src/packages/config-view/keymaps/config-view.cson b/src/packages/config-view/keymaps/config-view.cson index 84b6a7f23..a0c5ba172 100644 --- a/src/packages/config-view/keymaps/config-view.cson +++ b/src/packages/config-view/keymaps/config-view.cson @@ -1,3 +1,3 @@ # DOCUMENT: link to keymap documentation 'body': - 'meta-alt-ctrl-o': 'config-view:toggle' + 'meta-,': 'config-view:toggle'