fix auto save menu enablement

This commit is contained in:
Benjamin Pasero 2016-09-16 15:53:12 +02:00
parent dcc36a8f02
commit 67175a9bcb
3 changed files with 3 additions and 4 deletions

View file

@ -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();

View file

@ -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);

View file

@ -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));