fix auto save menu enablement
This commit is contained in:
parent
dcc36a8f02
commit
67175a9bcb
|
@ -309,7 +309,8 @@ export class VSCodeMenu {
|
|||
const saveFileAs = this.createMenuItem(nls.localize({ key: 'miSaveAs', comment: ['&& denotes a mnemonic'] }, "Save &&As..."), 'workbench.action.files.saveAs', this.windowsService.getWindowCount() > 0);
|
||||
const saveAllFiles = this.createMenuItem(nls.localize({ key: 'miSaveAll', comment: ['&& denotes a mnemonic'] }, "Save A&&ll"), 'workbench.action.files.saveAll', this.windowsService.getWindowCount() > 0);
|
||||
|
||||
const autoSave = new MenuItem({ label: mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: this.currentAutoSaveSetting !== AutoSaveConfiguration.OFF, enabled: this.windowsService.getWindowCount() > 0, click: () => this.windowsService.sendToFocused('vscode.toggleAutoSave') });
|
||||
const autoSaveEnabled = [AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE].some(s => this.currentAutoSaveSetting === s);
|
||||
const autoSave = new MenuItem({ label: mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: autoSaveEnabled, enabled: this.windowsService.getWindowCount() > 0, click: () => this.windowsService.sendToFocused('vscode.toggleAutoSave') });
|
||||
|
||||
const preferences = this.getPreferencesMenu();
|
||||
|
||||
|
|
|
@ -752,8 +752,6 @@ export class ChangeModeAction extends Action {
|
|||
});
|
||||
|
||||
TPromise.timeout(50 /* quick open is sensitive to being opened so soon after another */).done(() => {
|
||||
|
||||
|
||||
this.quickOpenService.pick(picks, { placeHolder: nls.localize('pickLanguageToConfigure', "Select Language Mode to Associate with '{0}'", extension || basename) }).done(language => {
|
||||
if (language) {
|
||||
const fileAssociationsConfig = this.configurationService.lookup(ChangeModeAction.FILE_ASSOCIATION_KEY);
|
||||
|
|
|
@ -117,7 +117,7 @@ export class ExplorerView extends CollapsibleViewletView {
|
|||
public renderBody(container: HTMLElement): void {
|
||||
this.treeContainer = super.renderViewTree(container);
|
||||
DOM.addClass(this.treeContainer, 'explorer-folders-view');
|
||||
DOM.addClass(this.treeContainer, 'show-file-icons'); // always on, for now
|
||||
DOM.addClass(this.treeContainer, 'show-file-icons'); // enable to show file icons if configured
|
||||
|
||||
this.tree = this.createViewer($(this.treeContainer));
|
||||
|
||||
|
|
Loading…
Reference in a new issue