From 754bbef0336711a82599fbf7e26f4fed6bfedffd Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 23 Nov 2020 11:46:31 +0100 Subject: [PATCH] more cleanup --- .../api/common/menusExtensionPoint.ts | 7 ----- .../parts/activitybar/activitybarActions.ts | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/api/common/menusExtensionPoint.ts b/src/vs/workbench/api/common/menusExtensionPoint.ts index e4c48b018b9..ae96427b105 100644 --- a/src/vs/workbench/api/common/menusExtensionPoint.ts +++ b/src/vs/workbench/api/common/menusExtensionPoint.ts @@ -86,13 +86,6 @@ const apiMenus: IAPIMenu[] = [ proposed: true, supportsSubmenus: false }, - { - key: 'menuBar/webNavigation', - id: MenuId.MenubarWebNavigationMenu, - description: localize('menus.webNavigation', "The top level navigational menu (web only)"), - proposed: true, - supportsSubmenus: false - }, { key: 'scm/title', id: MenuId.SCMTitle, diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 08c6b6cc261..6d5f6fa196e 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -191,21 +191,24 @@ export class HomeActivityActionViewItem extends MenuActivityActionViewItem { super(MenuId.MenubarWebHomeMenu, action, colors, themeService, menuService, contextMenuService, contextKeyService, configurationService, environmentService); } - protected async resolveActions(accountsMenu: IMenu, disposables: DisposableStore): Promise { - const actions = await super.resolveActions(accountsMenu, disposables); - - if (actions.length) { - actions.push(disposables.add(new Separator())); - } + protected async resolveActions(homeMenu: IMenu, disposables: DisposableStore): Promise { + const actions = []; + // Go Home actions.push(disposables.add(new Action('goHome', nls.localize('goHome', "Go Home"), undefined, true, async () => window.location.href = this.goHomeHref))); + actions.push(disposables.add(new Separator())); - actions.push( - disposables.add(new Separator()), - disposables.add(new Action('hide', nls.localize('hide', "Hide"), undefined, true, async () => { - this.storageService.store(HomeActivityActionViewItem.HOME_BAR_VISIBILITY_PREFERENCE, false, StorageScope.GLOBAL, StorageTarget.USER); - })) - ); + // Contributed + const contributedActions = await super.resolveActions(homeMenu, disposables); + actions.push(...contributedActions); + + // Hide + if (contributedActions.length > 0) { + actions.push(disposables.add(new Separator())); + } + actions.push(disposables.add(new Action('hide', nls.localize('hide', "Hide"), undefined, true, async () => { + this.storageService.store(HomeActivityActionViewItem.HOME_BAR_VISIBILITY_PREFERENCE, false, StorageScope.GLOBAL, StorageTarget.USER); + }))); return actions; } -- GitLab