diff --git a/src/application-delegate.js b/src/application-delegate.js index 6d6d892ca..1b1dd1e9c 100644 --- a/src/application-delegate.js +++ b/src/application-delegate.js @@ -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) { diff --git a/src/atom-environment.js b/src/atom-environment.js index 6e42f88a0..70fb352e2 100644 --- a/src/atom-environment.js +++ b/src/atom-environment.js @@ -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 diff --git a/src/main-process/atom-application.js b/src/main-process/atom-application.js index 52bc1287b..372bd537c 100644 --- a/src/main-process/atom-application.js +++ b/src/main-process/atom-application.js @@ -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--) { diff --git a/src/main-process/atom-window.js b/src/main-process/atom-window.js index 77dd09b31..0492b5f8f 100644 --- a/src/main-process/atom-window.js +++ b/src/main-process/atom-window.js @@ -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 () {