Skip to content

Commit 7f3d8fc

Browse files
author
Benjamin Pasero
committed
debt - move keyboard settings for touchbar into desktop.contribution
1 parent 3b8ce6b commit 7f3d8fc

4 files changed

Lines changed: 27 additions & 40 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,13 +647,13 @@ class NativeMenubarControl extends MenubarControl {
647647
(async () => {
648648
this.recentlyOpened = await this.workspacesService.getRecentlyOpened();
649649

650-
this.doUpdateMenubar(true);
650+
this.doUpdateMenubar();
651651
})();
652652

653653
this.registerListeners();
654654
}
655655

656-
protected doUpdateMenubar(firstTime: boolean): void {
656+
protected doUpdateMenubar(): void {
657657
// Since the native menubar is shared between windows (main process)
658658
// only allow the focused window to update the menubar
659659
if (!this.hostService.hasFocus) {

src/vs/workbench/electron-sandbox/desktop.contribution.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,31 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
314314
}
315315
}
316316
});
317+
318+
// Keybinding
319+
registry.registerConfiguration({
320+
'id': 'keyboard',
321+
'order': 15,
322+
'type': 'object',
323+
'title': nls.localize('keyboardConfigurationTitle', "Keyboard"),
324+
'properties': {
325+
'keyboard.touchbar.enabled': {
326+
'type': 'boolean',
327+
'default': true,
328+
'description': nls.localize('touchbar.enabled', "Enables the macOS touchbar buttons on the keyboard if available."),
329+
'included': isMacintosh
330+
},
331+
'keyboard.touchbar.ignored': {
332+
'type': 'array',
333+
'items': {
334+
'type': 'string'
335+
},
336+
'default': [],
337+
'markdownDescription': nls.localize('touchbar.ignored', 'A set of identifiers for entries in the touchbar that should not show up (for example `workbench.action.navigateBack`.'),
338+
'included': isMacintosh
339+
}
340+
}
341+
});
317342
})();
318343

319344
// JSON Schemas

src/vs/workbench/services/keybinding/electron-browser/keybinding.contribution.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/vs/workbench/workbench.desktop.main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import 'vs/workbench/services/output/electron-browser/outputChannelModelService'
4141
import 'vs/workbench/services/textfile/electron-browser/nativeTextFileService';
4242
import 'vs/workbench/services/dialogs/electron-browser/dialogService';
4343
import 'vs/workbench/services/keybinding/electron-browser/nativeKeymapService';
44-
import 'vs/workbench/services/keybinding/electron-browser/keybinding.contribution';
4544
import 'vs/workbench/services/extensions/electron-browser/extensionService';
4645
import 'vs/workbench/services/extensionManagement/electron-browser/extensionManagementServerService';
4746
import 'vs/workbench/services/extensionManagement/electron-browser/extensionTipsService';

0 commit comments

Comments
 (0)