Skip to content

Commit

Permalink
Settings editor - change keybinding and actions to open new editor by…
Browse files Browse the repository at this point in the history
… default (for insiders)
  • Loading branch information
roblourens committed Jul 9, 2018
1 parent ba79506 commit 8e4b4b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vs/code/electron-main/menus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export class CodeMenu {
}

private getPreferencesMenu(): Electron.MenuItem {
const settings = this.createMenuItem(nls.localize({ key: 'miOpenSettings', comment: ['&& denotes a mnemonic'] }, "&&Settings"), 'workbench.action.openSettings');
const settings = this.createMenuItem(nls.localize({ key: 'miOpenSettings', comment: ['&& denotes a mnemonic'] }, "&&Settings"), 'workbench.action.openSettings2');
const kebindingSettings = this.createMenuItem(nls.localize({ key: 'miOpenKeymap', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts"), 'workbench.action.openGlobalKeybindings');
const keymapExtensions = this.createMenuItem(nls.localize({ key: 'miOpenKeymapExtensions', comment: ['&& denotes a mnemonic'] }, "&&Keymap Extensions"), 'workbench.extensions.action.showRecommendedKeymapExtensions');
const snippetsSettings = this.createMenuItem(nls.localize({ key: 'miOpenSnippets', comment: ['&& denotes a mnemonic'] }, "User &&Snippets"), 'workbench.action.openSnippets');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@ function preferencesMenuRegistration() {
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
group: '1_settings',
command: {
id: 'workbench.action.openSettings',
id: 'workbench.action.openSettings2',
title: nls.localize({ key: 'miOpenSettings', comment: ['&& denotes a mnemonic'] }, "&&Settings")
},
order: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { PreferencesSearchService } from 'vs/workbench/parts/preferences/electron-browser/preferencesSearch';
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
import { Command } from 'vs/editor/browser/editorExtensions';
import product from 'vs/platform/node/product';

registerSingleton(IPreferencesSearchService, PreferencesSearchService);

Expand Down Expand Up @@ -191,8 +192,8 @@ Registry.as<IEditorInputFactoryRegistry>(EditorInputExtensions.EditorInputFactor
const category = nls.localize('preferences', "Preferences");
const registry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenRawDefaultSettingsAction, OpenRawDefaultSettingsAction.ID, OpenRawDefaultSettingsAction.LABEL), 'Preferences: Open Raw Default Settings', category);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenSettingsAction, OpenSettingsAction.ID, OpenSettingsAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.US_COMMA }), 'Preferences: Open Settings', category);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenSettings2Action, OpenSettings2Action.ID, OpenSettings2Action.LABEL), 'Preferences: Open Settings (Preview)', category);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenSettingsAction, OpenSettingsAction.ID, OpenSettingsAction.LABEL), 'Preferences: Open Settings', category);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenSettings2Action, OpenSettings2Action.ID, OpenSettings2Action.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.US_COMMA }), 'Preferences: Open Settings (Preview)', category);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalSettingsAction, OpenGlobalSettingsAction.ID, OpenGlobalSettingsAction.LABEL), 'Preferences: Open User Settings', category);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalKeybindingsAction, OpenGlobalKeybindingsAction.ID, OpenGlobalKeybindingsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_S) }), 'Preferences: Open Keyboard Shortcuts', category);
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalKeybindingsFileAction, OpenGlobalKeybindingsFileAction.ID, OpenGlobalKeybindingsFileAction.LABEL, { primary: null }), 'Preferences: Open Keyboard Shortcuts File', category);
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/parts/update/electron-browser/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class CommandAction extends Action {
export class UpdateContribution implements IGlobalActivity {

private static readonly showCommandsId = 'workbench.action.showCommands';
private static readonly openSettingsId = 'workbench.action.openSettings';
private static readonly openSettingsId = 'workbench.action.openSettings2';
private static readonly openKeybindingsId = 'workbench.action.openGlobalKeybindings';
private static readonly openUserSnippets = 'workbench.action.openSnippets';
private static readonly selectColorThemeId = 'workbench.action.selectTheme';
Expand Down

0 comments on commit 8e4b4b8

Please sign in to comment.