提交 5877b0f8 编写于 作者: S Sandeep Somavarapu

remove open keybindings file link in editor

上级 80d48da9
......@@ -44,7 +44,6 @@ import { KeybindingsEditorInput } from 'vs/workbench/services/preferences/common
import { CancellationToken } from 'vs/base/common/cancellation';
import { attachStylerCallback, attachInputBoxStyler } from 'vs/platform/theme/common/styler';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
import { InputBox, MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
import { Emitter, Event } from 'vs/base/common/event';
......@@ -106,8 +105,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
@IClipboardService private readonly clipboardService: IClipboardService,
@IInstantiationService private readonly instantiationService: IInstantiationService,
@IEditorService private readonly editorService: IEditorService,
@IStorageService storageService: IStorageService,
@IPreferencesService private readonly preferencesService: IPreferencesService
@IStorageService storageService: IStorageService
) {
super(KeybindingsEditor.ID, telemetryService, themeService, storageService);
this.delayedFiltering = new Delayer<void>(300);
......@@ -381,8 +379,6 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
}));
this.actionBar.push([this.recordKeysAction, this.sortByPrecedenceAction, clearInputAction], { label: false, icon: true });
this.createOpenKeybindingsElement(this.headerContainer);
}
private createRecordingBadge(container: HTMLElement): HTMLElement {
......@@ -402,24 +398,6 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
return recordingBadge;
}
private createOpenKeybindingsElement(parent: HTMLElement): void {
const openKeybindingsContainer = DOM.append(parent, $('.open-keybindings-container'));
DOM.append(openKeybindingsContainer, $('', undefined, localize('header-message', "For advanced customizations open and edit")));
const fileElement = DOM.append(openKeybindingsContainer, $('.file-name', undefined, localize('keybindings-file-name', "keybindings.json")));
fileElement.tabIndex = 0;
this._register(DOM.addDisposableListener(fileElement, DOM.EventType.CLICK, () => this.preferencesService.openGlobalKeybindingSettings(true)));
this._register(DOM.addDisposableListener(fileElement, DOM.EventType.KEY_UP, e => {
const keyboardEvent = new StandardKeyboardEvent(e);
switch (keyboardEvent.keyCode) {
case KeyCode.Enter:
this.preferencesService.openGlobalKeybindingSettings(true);
keyboardEvent.preventDefault();
keyboardEvent.stopPropagation();
return;
}
}));
}
private layoutSearchWidget(dimension: DOM.Dimension): void {
this.searchWidget.layout(dimension);
DOM.toggleClass(this.headerContainer, 'small', dimension.width < 400);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册