Skip to content
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
57a2d99
Fix #205836, multiple menubar instances register same command twice.
yiliang114 Feb 21, 2024
d51703b
Merge remote-tracking branch 'origin/main' into puny-whitefish
yiliang114 Feb 21, 2024
d117a0d
Aggressive caching with Open Current File as Release Notes (#205846)
alexr00 Feb 21, 2024
6d0764f
Improves softAssert function
hediet Feb 21, 2024
1a7181f
Something should happen when the flashing microphone is clicked (fix …
bpasero Feb 21, 2024
0f4eacc
make sure LM provider error bubble all the way, reject response strea…
jrieken Feb 21, 2024
ad0879a
Git - fix reopen closed repositories action visibility issue (#205851)
lszomoru Feb 21, 2024
c16d8cb
Fix issue with settings not being respected in release notes (#205852)
alexr00 Feb 21, 2024
7bf0d5b
"Try Feature" tooltip sounds awkward (#205841)
alexr00 Feb 21, 2024
2db24cc
actionbar - `animated` is an obsolete property (#205854)
bpasero Feb 21, 2024
8245a85
editors - use `canSerialize` properly (#205856)
bpasero Feb 21, 2024
1404b83
Sets focus border for focused editors
hediet Feb 21, 2024
7d37a87
Merge remote-tracking branch 'origin/main' into puny-whitefish
yiliang114 Feb 21, 2024
9dd843f
Fix #205836, multiple menubar instances register same command twice.
yiliang114 Feb 22, 2024
6b0cf57
Merge remote-tracking branch 'origin/main' into puny-whitefish
yiliang114 Feb 22, 2024
ee4011e
Fix #205836, multiple menubar instances register same command twice.
yiliang114 Feb 22, 2024
6804078
Merge branch 'main' into puny-whitefish
yiliang114 Feb 26, 2024
54e0c8b
Merge branch 'main' into puny-whitefish
yiliang114 Feb 27, 2024
888bcad
Merge branch 'main' into puny-whitefish
yiliang114 Mar 13, 2024
0d39aca
Merge branch 'main' into puny-whitefish
yiliang114 Mar 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/vs/workbench/browser/parts/titlebar/menubarControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ export class CustomMenubarControl extends MenubarControl {
private visible: boolean = true;
private actionRunner: IActionRunner;
private readonly webNavigationMenu = this._register(this.menuService.createMenu(MenuId.MenubarHomeMenu, this.contextKeyService));
private static singleInstance: CustomMenubarControl | undefined = undefined;

private readonly _onVisibilityChange: Emitter<boolean>;
private readonly _onFocusStateChange: Emitter<boolean>;
Expand All @@ -401,6 +402,12 @@ export class CustomMenubarControl extends MenubarControl {
@IHostService hostService: IHostService,
@ICommandService commandService: ICommandService
) {
// If there is a previous instance that has not been destroyed, you need to destroy it first and then record the initialization of the new instance.
if (CustomMenubarControl.singleInstance) {
CustomMenubarControl.singleInstance.dispose();
CustomMenubarControl.singleInstance = undefined;
}

super(menuService, workspacesService, contextKeyService, keybindingService, configurationService, labelService, updateService, storageService, notificationService, preferencesService, environmentService, accessibilityService, hostService, commandService);

this._onVisibilityChange = this._register(new Emitter<boolean>());
Expand All @@ -418,6 +425,8 @@ export class CustomMenubarControl extends MenubarControl {
this.registerListeners();

this.registerActions();

CustomMenubarControl.singleInstance = this;
}

protected doUpdateMenubar(firstTime: boolean): void {
Expand Down