From 5f4a7c4d393ecb48dc82909fda7528cb0bdaf68a Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Mon, 9 May 2022 20:54:23 -0700 Subject: [PATCH] fixed #6373 - allow disabling dynamic title on saved layouts --- tabby-core/src/components/splitTab.component.ts | 8 ++++++++ .../src/components/editProfileModal.component.ts | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tabby-core/src/components/splitTab.component.ts b/tabby-core/src/components/splitTab.component.ts index 8c9414ea..065011a5 100644 --- a/tabby-core/src/components/splitTab.component.ts +++ b/tabby-core/src/components/splitTab.component.ts @@ -211,6 +211,11 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit /** @hidden */ _allFocusMode = false + /** + * Disables display of dynamic window/tab title provided by the shell + */ + disableDynamicTitle = false + /** @hidden */ private focusedTab: BaseTabComponent|null = null private maximizedTab: BaseTabComponent|null = null @@ -748,6 +753,9 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit } private updateTitle (): void { + if (this.disableDynamicTitle) { + return + } this.setTitle([...new Set(this.getAllTabs().map(x => x.title))].join(' | ')) } diff --git a/tabby-settings/src/components/editProfileModal.component.ts b/tabby-settings/src/components/editProfileModal.component.ts index 97e1aadf..aa950ddf 100644 --- a/tabby-settings/src/components/editProfileModal.component.ts +++ b/tabby-settings/src/components/editProfileModal.component.ts @@ -24,7 +24,7 @@ export class EditProfileModalComponent

{ @ViewChild('placeholder', { read: ViewContainerRef }) placeholder: ViewContainerRef private _profile: Profile - private settingsComponentInstance: ProfileSettingsComponent

+ private settingsComponentInstance?: ProfileSettingsComponent

constructor ( private injector: Injector, @@ -87,7 +87,7 @@ export class EditProfileModalComponent

{ save () { this.profile.group ||= undefined - this.settingsComponentInstance.save?.() + this.settingsComponentInstance?.save?.() this.profile.__cleanup() this.modalInstance.close(this._profile) }