mirror of
https://github.com/Eugeny/tabby.git
synced 2024-09-20 01:18:39 +03:00
include titles of all panes in a split tab's title
This commit is contained in:
parent
009556f984
commit
b9c6d30678
@ -576,16 +576,20 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
|
|||||||
this.layoutInternal(this.root, 0, 0, 100, 100)
|
this.layoutInternal(this.root, 0, 0, 100, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private updateTitle (): void {
|
||||||
|
this.setTitle(this.getAllTabs().map(x => x.title).join(' | '))
|
||||||
|
}
|
||||||
|
|
||||||
private attachTabView (tab: BaseTabComponent) {
|
private attachTabView (tab: BaseTabComponent) {
|
||||||
const ref = tab.insertIntoContainer(this.viewContainer)
|
const ref = tab.insertIntoContainer(this.viewContainer)
|
||||||
this.viewRefs.set(tab, ref)
|
this.viewRefs.set(tab, ref)
|
||||||
tab.addEventListenerUntilDestroyed(ref.rootNodes[0], 'click', () => this.focus(tab))
|
tab.addEventListenerUntilDestroyed(ref.rootNodes[0], 'click', () => this.focus(tab))
|
||||||
|
|
||||||
tab.subscribeUntilDestroyed(tab.titleChange$, t => this.setTitle(t))
|
tab.subscribeUntilDestroyed(tab.titleChange$, () => this.updateTitle())
|
||||||
tab.subscribeUntilDestroyed(tab.activity$, a => a ? this.displayActivity() : this.clearActivity())
|
tab.subscribeUntilDestroyed(tab.activity$, a => a ? this.displayActivity() : this.clearActivity())
|
||||||
tab.subscribeUntilDestroyed(tab.progress$, p => this.setProgress(p))
|
tab.subscribeUntilDestroyed(tab.progress$, p => this.setProgress(p))
|
||||||
if (tab.title) {
|
if (tab.title) {
|
||||||
this.setTitle(tab.title)
|
this.updateTitle()
|
||||||
}
|
}
|
||||||
tab.subscribeUntilDestroyed(tab.recoveryStateChangedHint$, () => {
|
tab.subscribeUntilDestroyed(tab.recoveryStateChangedHint$, () => {
|
||||||
this.recoveryStateChangedHint.next()
|
this.recoveryStateChangedHint.next()
|
||||||
|
Loading…
Reference in New Issue
Block a user