Skip to content

Commit 1a5b66a

Browse files
authored
macos - restore ability to reveal any path segment in os from titlebar context menu (microsoft#199503)
1 parent 8df51ff commit 1a5b66a

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

src/vs/platform/actions/common/actions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ export class MenuId {
126126
static readonly TestPeekTitle = new MenuId('TestPeekTitle');
127127
static readonly TouchBarContext = new MenuId('TouchBarContext');
128128
static readonly TitleBarContext = new MenuId('TitleBarContext');
129-
static readonly TitleBarTitleContext = new MenuId('TitleBarTitleContext');
130129
static readonly TunnelContext = new MenuId('TunnelContext');
131130
static readonly TunnelPrivacy = new MenuId('TunnelPrivacy');
132131
static readonly TunnelProtocol = new MenuId('TunnelProtocol');

src/vs/workbench/browser/actions/layoutActions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ if (isWindows || isLinux || isWeb) {
765765
title: localize('miMenuBarNoMnemonic', "Menu Bar"),
766766
toggled: ContextKeyExpr.and(IsMacNativeContext.toNegated(), ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'hidden'), ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'toggle'), ContextKeyExpr.notEquals('config.window.menuBarVisibility', 'compact'))
767767
},
768+
group: '2_config',
768769
when: IsAuxiliaryWindowFocusedContext.toNegated(),
769770
order: 0
770771
});

src/vs/workbench/browser/parts/titlebar/titlebarActions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class ToggleConfigAction extends Action2 {
2424
menu: {
2525
id: MenuId.TitleBarContext,
2626
when: mainWindowOnly ? IsAuxiliaryWindowFocusedContext.toNegated() : undefined,
27-
order
27+
order,
28+
group: '2_config'
2829
}
2930
});
3031
}
@@ -55,7 +56,7 @@ registerAction2(class ToggleEditorActions extends Action2 {
5556
id: `toggle.${ToggleEditorActions.settingsID}`,
5657
title: localize('toggle.editorActions', 'Editor Actions'),
5758
toggled: ContextKeyExpr.equals(`config.${ToggleEditorActions.settingsID}`, 'hidden').negate(),
58-
menu: { id: MenuId.TitleBarContext, order: 3, when: ContextKeyExpr.equals(`config.workbench.editor.showTabs`, 'none') }
59+
menu: { id: MenuId.TitleBarContext, order: 3, when: ContextKeyExpr.equals(`config.workbench.editor.showTabs`, 'none'), group: '2_config' }
5960
});
6061
}
6162

src/vs/workbench/browser/parts/titlebar/titlebarPart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ export class BrowserTitlebarPart extends Part implements ITitlebarPart {
418418
if (e.type === EventType.CONTEXT_MENU || (e.target === this.title && e.metaKey)) {
419419
EventHelper.stop(e);
420420

421-
this.onContextMenu(e, e.target === this.title ? MenuId.TitleBarTitleContext : MenuId.TitleBarContext);
421+
this.onContextMenu(e, MenuId.TitleBarContext);
422422
}
423423
}));
424424
});

src/vs/workbench/electron-sandbox/window.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,11 @@ export class NativeWindow extends BaseWindow {
660660

661661
const commandId = `workbench.action.revealPathInFinder${i}`;
662662
this.customTitleContextMenuDisposable.add(CommandsRegistry.registerCommand(commandId, () => this.nativeHostService.showItemInFolder(path.fsPath)));
663-
this.customTitleContextMenuDisposable.add(MenuRegistry.appendMenuItem(MenuId.TitleBarTitleContext, { command: { id: commandId, title: label || posix.sep }, order: -i }));
663+
this.customTitleContextMenuDisposable.add(MenuRegistry.appendMenuItem(MenuId.TitleBarContext, {
664+
command: { id: commandId, title: label || posix.sep },
665+
order: -i,
666+
group: '1_file'
667+
}));
664668
}
665669
}
666670

0 commit comments

Comments
 (0)