AtomApplication creates the initial AtomWindow

This commit is contained in:
probablycorey
2013-05-17 13:57:27 -07:00
parent be2cfb3252
commit bab80e0089

View File

@@ -34,10 +34,6 @@ bootstrapApplication = ->
setupNodePaths()
atomApplication = new AtomApplication
new AtomWindow
bootstrapScript: 'window-bootstrap',
resourcePath: resourcePath
delegate.browserMainParts.preMainMessageLoopRun = bootstrapApplication
app = require 'app'
@@ -56,6 +52,7 @@ class AtomApplication
@setupJavaScriptArguments()
@buildApplicationMenu()
@handleEvents()
@createAtomWindow()
setupJavaScriptArguments: ->
app.commandLine.appendSwitch 'js-flags', '--harmony_collections'
@@ -107,12 +104,14 @@ class AtomApplication
window.removeAllListeners 'close'
window.close()
ipc.on 'open-folder', ->
ipc.on 'open-folder', =>
currentWindow = BrowserWindow.getFocusedWindow()
dialog.openFolder currentWindow, {}, (result, paths...) =>
new AtomWindow
bootstrapScript: 'window-bootstrap',
resourcePath: resourcePath
dialog.openFolder currentWindow, {}, (result, paths...) => @createAtomWindow()
createAtomWindow: ->
new AtomWindow
bootstrapScript: 'window-bootstrap',
resourcePath: resourcePath
class AtomWindow
@windows = []