mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Rename pathsToNotifyWhenClosed -> pathsWithWaitSessions
This commit is contained in:
@@ -139,8 +139,8 @@ class ApplicationDelegate {
|
||||
return ipcRenderer.send('execute-javascript-in-dev-tools', code)
|
||||
}
|
||||
|
||||
didCloseInitialPath (path) {
|
||||
return ipcHelpers.call('window-method', 'didCloseInitialPath', path)
|
||||
didClosePathWithWaitSession (path) {
|
||||
return ipcHelpers.call('window-method', 'didClosePathWithWaitSession', path)
|
||||
}
|
||||
|
||||
setWindowDocumentEdited (edited) {
|
||||
|
||||
@@ -70,7 +70,7 @@ class AtomEnvironment {
|
||||
this.loadTime = null
|
||||
this.emitter = new Emitter()
|
||||
this.disposables = new CompositeDisposable()
|
||||
this.pathsToNotifyWhenClosed = new Set()
|
||||
this.pathsWithWaitSessions = new Set()
|
||||
|
||||
// Public: A {DeserializerManager} instance
|
||||
this.deserializers = new DeserializerManager(this)
|
||||
@@ -360,7 +360,7 @@ class AtomEnvironment {
|
||||
this.grammars.clear()
|
||||
this.textEditors.clear()
|
||||
this.views.clear()
|
||||
this.pathsToNotifyWhenClosed.clear()
|
||||
this.pathsWithWaitSessions.clear()
|
||||
}
|
||||
|
||||
destroy () {
|
||||
@@ -827,8 +827,8 @@ class AtomEnvironment {
|
||||
let previousProjectPaths = this.project.getPaths()
|
||||
this.disposables.add(this.project.onDidChangePaths(newPaths => {
|
||||
for (let path of previousProjectPaths) {
|
||||
if (this.pathsToNotifyWhenClosed.has(path) && !newPaths.includes(path)) {
|
||||
this.applicationDelegate.didCloseInitialPath(path)
|
||||
if (this.pathsWithWaitSessions.has(path) && !newPaths.includes(path)) {
|
||||
this.applicationDelegate.didClosePathWithWaitSession(path)
|
||||
}
|
||||
}
|
||||
previousProjectPaths = newPaths
|
||||
@@ -836,8 +836,8 @@ class AtomEnvironment {
|
||||
}))
|
||||
this.disposables.add(this.workspace.onDidDestroyPaneItem(({item}) => {
|
||||
const path = item.getPath && item.getPath()
|
||||
if (this.pathsToNotifyWhenClosed.has(path)) {
|
||||
this.applicationDelegate.didCloseInitialPath(path)
|
||||
if (this.pathsWithWaitSessions.has(path)) {
|
||||
this.applicationDelegate.didClosePathWithWaitSession(path)
|
||||
}
|
||||
}))
|
||||
|
||||
@@ -1326,7 +1326,7 @@ class AtomEnvironment {
|
||||
fileLocationsToOpen.push(location)
|
||||
}
|
||||
|
||||
if (location.notifyWhenClosed) this.pathsToNotifyWhenClosed.add(pathToOpen)
|
||||
if (location.hasWaitSession) this.pathsWithWaitSessions.add(pathToOpen)
|
||||
}
|
||||
|
||||
let restoredState = false
|
||||
|
||||
@@ -793,7 +793,7 @@ class AtomApplication extends EventEmitter {
|
||||
for (let i = 0; i < pathsToOpen.length; i++) {
|
||||
const location = this.parsePathToOpen(pathsToOpen[i], executedFrom, addToLastWindow)
|
||||
location.forceAddToWindow = addToLastWindow
|
||||
location.notifyWhenClosed = pidToKillWhenClosed != null
|
||||
location.hasWaitSession = pidToKillWhenClosed != null
|
||||
locationsToOpen.push(location)
|
||||
pathsToOpen[i] = location.pathToOpen
|
||||
}
|
||||
@@ -886,7 +886,7 @@ class AtomApplication extends EventEmitter {
|
||||
this.waitSessionsByWindow.delete(window)
|
||||
}
|
||||
|
||||
windowDidCloseInitialPath (window, initialPath) {
|
||||
windowDidClosePathWithWaitSession (window, initialPath) {
|
||||
const waitSessions = this.waitSessionsByWindow.get(window)
|
||||
if (!waitSessions) return
|
||||
for (let i = waitSessions.length - 1; i >= 0; i--) {
|
||||
|
||||
@@ -411,8 +411,8 @@ class AtomWindow extends EventEmitter {
|
||||
return this.atomApplication.saveState()
|
||||
}
|
||||
|
||||
didCloseInitialPath (path) {
|
||||
this.atomApplication.windowDidCloseInitialPath(this, path)
|
||||
didClosePathWithWaitSession (path) {
|
||||
this.atomApplication.windowDidClosePathWithWaitSession(this, path)
|
||||
}
|
||||
|
||||
copy () {
|
||||
|
||||
Reference in New Issue
Block a user