mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Push new window to atomApplication.windows in AtomWindow.
This commit is contained in:
@@ -12,6 +12,7 @@ atomApplication = null
|
||||
|
||||
module.exports =
|
||||
class AtomApplication
|
||||
@addWindow: (window) -> atomApplication.removeWindow(window)
|
||||
@removeWindow: (window) -> atomApplication.removeWindow(window)
|
||||
|
||||
windows: null
|
||||
@@ -45,6 +46,9 @@ class AtomApplication
|
||||
removeWindow: (window) ->
|
||||
@windows.splice @windows.indexOf(window), 1
|
||||
|
||||
addWindow: (window) ->
|
||||
@windows.push window
|
||||
|
||||
getHomeDir: ->
|
||||
process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
|
||||
|
||||
@@ -174,8 +178,6 @@ class AtomApplication
|
||||
bootstrapScript: 'window-bootstrap',
|
||||
resourcePath: @resourcePath
|
||||
|
||||
@windows.push atomWindow
|
||||
|
||||
openConfig: ->
|
||||
if @configWindow
|
||||
@configWindow.browserWindow.focus()
|
||||
@@ -187,8 +189,6 @@ class AtomApplication
|
||||
@configWindow.browserWindow.on 'destroyed', =>
|
||||
@configWindow = null
|
||||
|
||||
@windows.push @configWindow
|
||||
|
||||
runSpecs: (exitWhenDone) ->
|
||||
specWindow = new AtomWindow
|
||||
bootstrapScript: 'spec-bootstrap',
|
||||
@@ -197,4 +197,3 @@ class AtomApplication
|
||||
isSpec: true
|
||||
|
||||
specWindow.browserWindow.show()
|
||||
@windows.push specWindow
|
||||
|
||||
Reference in New Issue
Block a user