提交 9fec3ed7 编写于 作者: I isidor

Add zenMode.restore configuraiton

fixes #19431
上级 e747ed2a
...@@ -314,6 +314,11 @@ configurationRegistry.registerConfiguration({ ...@@ -314,6 +314,11 @@ configurationRegistry.registerConfiguration({
'type': 'boolean', 'type': 'boolean',
'default': true, 'default': true,
'description': nls.localize('zenMode.hideStatusBar', "Controls if turning on Zen Mode also hides the status bar at the bottom of the workbench.") 'description': nls.localize('zenMode.hideStatusBar', "Controls if turning on Zen Mode also hides the status bar at the bottom of the workbench.")
},
'zenMode.restore': {
'type': 'boolean',
'default': false,
'description': nls.localize('zenMode.restore', "Controls if a window should restore to zen mode if it was exited in zen mode.")
} }
} }
}); });
\ No newline at end of file
...@@ -103,6 +103,7 @@ interface IZenModeSettings { ...@@ -103,6 +103,7 @@ interface IZenModeSettings {
fullScreen: boolean; fullScreen: boolean;
hideTabs: boolean; hideTabs: boolean;
hideStatusBar: boolean; hideStatusBar: boolean;
restore: boolean;
} }
export interface IWorkbenchStartedInfo { export interface IWorkbenchStartedInfo {
...@@ -820,8 +821,10 @@ export class Workbench implements IPartService { ...@@ -820,8 +821,10 @@ export class Workbench implements IPartService {
if (reason === ShutdownReason.RELOAD) { if (reason === ShutdownReason.RELOAD) {
this.storageService.store(Workbench.sidebarRestoreSettingKey, 'true', StorageScope.WORKSPACE); this.storageService.store(Workbench.sidebarRestoreSettingKey, 'true', StorageScope.WORKSPACE);
} }
const zenConfig = this.configurationService.getConfiguration<IZenModeSettings>('zenMode');
// Preserve zen mode only on reload. Real quit gets out of zen mode so novice users do not get stuck in zen mode. // Preserve zen mode only on reload. Real quit gets out of zen mode so novice users do not get stuck in zen mode.
this.storageService.store(Workbench.zenModeActiveSettingKey, reason === ShutdownReason.RELOAD && this.zenMode.active, StorageScope.WORKSPACE); this.storageService.store(Workbench.zenModeActiveSettingKey, (zenConfig.restore || reason === ShutdownReason.RELOAD) && this.zenMode.active, StorageScope.WORKSPACE);
// Pass shutdown on to each participant // Pass shutdown on to each participant
this.toShutdown.forEach(s => s.shutdown()); this.toShutdown.forEach(s => s.shutdown());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册