|
@@ -16,10 +16,6 @@ import {
|
|
DockPanel
|
|
DockPanel
|
|
} from 'phosphor/lib/ui/dockpanel';
|
|
} from 'phosphor/lib/ui/dockpanel';
|
|
|
|
|
|
-import {
|
|
|
|
- FocusTracker
|
|
|
|
-} from 'phosphor/lib/ui/focustracker';
|
|
|
|
-
|
|
|
|
import {
|
|
import {
|
|
each
|
|
each
|
|
} from 'phosphor/lib/algorithm/iteration';
|
|
} from 'phosphor/lib/algorithm/iteration';
|
|
@@ -145,8 +141,7 @@ class ApplicationShell extends Widget {
|
|
|
|
|
|
this.layout = rootLayout;
|
|
this.layout = rootLayout;
|
|
|
|
|
|
- this._tracker = new FocusTracker<Widget>();
|
|
|
|
- this._tracker.currentChanged.connect((sender, args) => {
|
|
|
|
|
|
+ this._dockPanel.currentChanged.connect((sender, args) => {
|
|
if (args.newValue) {
|
|
if (args.newValue) {
|
|
args.newValue.title.className += ` ${CURRENT_CLASS}`;
|
|
args.newValue.title.className += ` ${CURRENT_CLASS}`;
|
|
}
|
|
}
|
|
@@ -216,7 +211,6 @@ class ApplicationShell extends Widget {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this._dockPanel.addWidget(widget, { mode: 'tab-after' });
|
|
this._dockPanel.addWidget(widget, { mode: 'tab-after' });
|
|
- this._tracker.add(widget);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -262,9 +256,7 @@ class ApplicationShell extends Widget {
|
|
* Close all tracked widgets.
|
|
* Close all tracked widgets.
|
|
*/
|
|
*/
|
|
closeAll(): void {
|
|
closeAll(): void {
|
|
- each(this._tracker.widgets, widget => {
|
|
|
|
- widget.close();
|
|
|
|
- });
|
|
|
|
|
|
+ each(this._dockPanel.widgets, widget => { widget.close(); });
|
|
}
|
|
}
|
|
|
|
|
|
private _topPanel: Panel;
|
|
private _topPanel: Panel;
|
|
@@ -273,7 +265,6 @@ class ApplicationShell extends Widget {
|
|
private _hsplitPanel: SplitPanel;
|
|
private _hsplitPanel: SplitPanel;
|
|
private _leftHandler: SideBarHandler;
|
|
private _leftHandler: SideBarHandler;
|
|
private _rightHandler: SideBarHandler;
|
|
private _rightHandler: SideBarHandler;
|
|
- private _tracker: FocusTracker<Widget>;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -321,6 +312,7 @@ class SideBarHandler {
|
|
let widget = this._findWidgetByID(id);
|
|
let widget = this._findWidgetByID(id);
|
|
if (widget) {
|
|
if (widget) {
|
|
this._sideBar.currentTitle = widget.title;
|
|
this._sideBar.currentTitle = widget.title;
|
|
|
|
+ widget.activate();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|