提交 22fab0c7 编写于 作者: D Daniel Imms

Remove hot exit default message

Fixes #24409
上级 8ef9c4b5
......@@ -101,8 +101,6 @@ export abstract class TextFileService implements ITextFileService {
abstract confirmSave(resources?: URI[]): ConfirmResult;
abstract showHotExitMessage(): void;
public get onAutoSaveConfigurationChange(): Event<IAutoSaveConfiguration> {
return this._onAutoSaveConfigurationChange.event;
}
......@@ -143,8 +141,6 @@ export abstract class TextFileService implements ITextFileService {
// If hot exit is enabled, backup dirty files and allow to exit without confirmation
if (this.isHotExitEnabled) {
this.showHotExitMessage();
return this.backupBeforeShutdown(dirty, this.models, reason).then(result => {
if (result.didBackup) {
return this.noVeto({ cleanUpBackups: false }); // no veto and no backup cleanup (since backup was successful)
......
......@@ -306,12 +306,6 @@ export interface ITextFileService extends IDisposable {
*/
confirmSave(resources?: URI[]): ConfirmResult;
/**
* Brings up an informational message about how exit now being enabled by default. This message
* is temporary and will eventually be removed.
*/
showHotExitMessage(): void;
/**
* Convinient fast access to the current auto save mode.
*/
......
......@@ -28,7 +28,6 @@ import product from 'vs/platform/node/product';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IMessageService } from 'vs/platform/message/common/message';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { IBackupFileService } from 'vs/workbench/services/backup/common/backup';
import { IWindowsService } from 'vs/platform/windows/common/windows';
......@@ -49,7 +48,6 @@ export class TextFileService extends AbstractTextFileService {
@IEnvironmentService environmentService: IEnvironmentService,
@IMessageService messageService: IMessageService,
@IBackupFileService backupFileService: IBackupFileService,
@IStorageService private storageService: IStorageService,
@IWindowsService windowsService: IWindowsService,
@IEditorGroupService editorGroupService: IEditorGroupService
) {
......@@ -139,23 +137,6 @@ export class TextFileService extends AbstractTextFileService {
return buttons[choice].result;
}
public showHotExitMessage(): void {
const key = 'hotExit/hasShownMessage';
const hasShownMessage = !!this.storageService.get(key, StorageScope.GLOBAL);
if (!hasShownMessage) {
this.storageService.store(key, true, StorageScope.GLOBAL);
const opts: Electron.ShowMessageBoxOptions = {
title: product.nameLong,
message: nls.localize('hotExitEducationalMessage', "Hot Exit is now enabled by default"),
type: 'info',
detail: nls.localize('hotExitEducationalDetail', "Hot Exit remembers any unsaved files between sessions, so you don't have to save your files before you exit. You can disable this feature with the 'files.hotExit' setting."),
buttons: [nls.localize('ok', "OK")],
noLink: true
};
this.windowService.getWindow().showMessageBox(opts);
}
}
private mnemonicLabel(label: string): string {
if (!isWindows) {
return label.replace(/\(&&\w\)|&&/g, ''); // no mnemonic support on mac/linux
......
......@@ -191,8 +191,6 @@ export class TestTextFileService extends TextFileService {
this.cleanupBackupsBeforeShutdownCalled = true;
return TPromise.as(void 0);
}
public showHotExitMessage(): void { }
}
export function workbenchInstantiationService(): IInstantiationService {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册