Only allow one config window.

This commit is contained in:
Cheng Zhao
2013-05-25 11:58:18 +08:00
parent 45f96ab67f
commit ddfae74ba4

View File

@@ -15,6 +15,7 @@ class AtomApplication
@removeWindow: (window) -> atomApplication.removeWindow(window)
windows: null
configWindow: null
menu: null
resourcePath: null
executedFrom: null
@@ -176,11 +177,17 @@ class AtomApplication
@windows.push atomWindow
openConfig: ->
atomWindow = new AtomWindow
if @configWindow
@configWindow.browserWindow.focus()
return
@configWindow = new AtomWindow
bootstrapScript: 'config-bootstrap',
resourcePath: @resourcePath
@configWindow.browserWindow.on 'destroyed', =>
@configWindow = null
@windows.push atomWindow
@windows.push @configWindow
runSpecs: (exitWhenDone) ->
specWindow = new AtomWindow