mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
debt - move native pieces of window config into node layer
This commit is contained in:
@@ -14,10 +14,11 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { parseArgs, OPTIONS } from 'vs/platform/environment/node/argv';
|
||||
import product from 'vs/platform/product/common/product';
|
||||
import { IWindowSettings, MenuBarVisibility, IWindowConfiguration, ReadyState, getTitleBarStyle, getMenuBarVisibility } from 'vs/platform/windows/common/windows';
|
||||
import { IWindowSettings, MenuBarVisibility, ReadyState, getTitleBarStyle, getMenuBarVisibility } from 'vs/platform/windows/common/windows';
|
||||
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
import { ICodeWindow, IWindowState, WindowMode } from 'vs/platform/windows/electron-main/windows';
|
||||
import { INativeWindowConfiguration } from 'vs/platform/windows/node/window';
|
||||
import { IWorkspaceIdentifier } from 'vs/platform/workspaces/common/workspaces';
|
||||
import { IWorkspacesMainService } from 'vs/platform/workspaces/electron-main/workspacesMainService';
|
||||
import { IBackupMainService } from 'vs/platform/backup/electron-main/backup';
|
||||
@@ -85,7 +86,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
|
||||
private readonly whenReadyCallbacks: { (window: ICodeWindow): void }[];
|
||||
|
||||
private pendingLoadConfig?: IWindowConfiguration;
|
||||
private pendingLoadConfig?: INativeWindowConfiguration;
|
||||
|
||||
private marketplaceHeadersPromise: Promise<object>;
|
||||
|
||||
@@ -231,8 +232,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
this.registerListeners();
|
||||
}
|
||||
|
||||
private currentConfig: IWindowConfiguration | undefined;
|
||||
get config(): IWindowConfiguration | undefined { return this.currentConfig; }
|
||||
private currentConfig: INativeWindowConfiguration | undefined;
|
||||
get config(): INativeWindowConfiguration | undefined { return this.currentConfig; }
|
||||
|
||||
private _id: number;
|
||||
get id(): number { return this._id; }
|
||||
@@ -552,7 +553,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
}
|
||||
}
|
||||
|
||||
load(config: IWindowConfiguration, isReload?: boolean, disableExtensions?: boolean): void {
|
||||
load(config: INativeWindowConfiguration, isReload?: boolean, disableExtensions?: boolean): void {
|
||||
|
||||
// If this is the first time the window is loaded, we associate the paths
|
||||
// directly with the window because we assume the loading will just work
|
||||
@@ -612,7 +613,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
this._onLoad.fire();
|
||||
}
|
||||
|
||||
reload(configurationIn?: IWindowConfiguration, cli?: ParsedArgs): void {
|
||||
reload(configurationIn?: INativeWindowConfiguration, cli?: ParsedArgs): void {
|
||||
|
||||
// If config is not provided, copy our current one
|
||||
const configuration = configurationIn ? configurationIn : objects.mixin({}, this.currentConfig);
|
||||
@@ -639,7 +640,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
this.load(configuration, true, disableExtensions);
|
||||
}
|
||||
|
||||
private getUrl(windowConfiguration: IWindowConfiguration): string {
|
||||
private getUrl(windowConfiguration: INativeWindowConfiguration): string {
|
||||
|
||||
// Set window ID
|
||||
windowConfiguration.windowId = this._win.id;
|
||||
|
||||
Reference in New Issue
Block a user