|
@@ -111,6 +111,7 @@ class DocumentWidgetManager implements IDisposable {
|
|
|
|
|
|
this.adoptWidget(context, widget);
|
|
|
context.fileChanged.connect(this._onFileChanged, this);
|
|
|
+ context.pathChanged.connect(this._onPathChanged, this);
|
|
|
context.ready.then(() => {
|
|
|
this.setCaption(widget);
|
|
|
});
|
|
@@ -331,6 +332,14 @@ class DocumentWidgetManager implements IDisposable {
|
|
|
each(widgets, widget => { this.setCaption(widget); });
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Handle a path changed signal for a context.
|
|
|
+ */
|
|
|
+ private _onPathChanged(context: DocumentRegistry.Context): void {
|
|
|
+ let widgets = Private.widgetsProperty.get(context);
|
|
|
+ each(widgets, widget => { this.setCaption(widget); });
|
|
|
+ }
|
|
|
+
|
|
|
private _closeGuard = false;
|
|
|
private _registry: DocumentRegistry = null;
|
|
|
}
|