提交 0268b334 编写于 作者: B Benjamin Pasero

enable enableExperimentalProxyLoginDialog per default

上级 5956564b
......@@ -118,9 +118,7 @@ export class CodeApplication extends Disposable {
// Accessibility change event
app.on('accessibility-support-changed', (event, accessibilitySupportEnabled) => {
if (this.windowsMainService) {
this.windowsMainService.sendToAll('vscode:accessibilitySupportChanged', accessibilitySupportEnabled);
}
this.windowsMainService?.sendToAll('vscode:accessibilitySupportChanged', accessibilitySupportEnabled);
});
// macOS dock activate
......@@ -128,8 +126,8 @@ export class CodeApplication extends Disposable {
this.logService.trace('app#activate');
// Mac only event: open new window when we get activated
if (!hasVisibleWindows && this.windowsMainService) {
this.windowsMainService.openEmptyWindow({ context: OpenContext.DOCK });
if (!hasVisibleWindows) {
this.windowsMainService?.openEmptyWindow({ context: OpenContext.DOCK });
}
});
......@@ -214,9 +212,7 @@ export class CodeApplication extends Disposable {
contents.on('new-window', (event, url) => {
event.preventDefault(); // prevent code that wants to open links
if (this.nativeHostMainService) {
this.nativeHostMainService.openExternal(undefined, url);
}
this.nativeHostMainService?.openExternal(undefined, url);
});
session.defaultSession.setPermissionRequestHandler((webContents, permission /* 'media' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' */, callback) => {
......@@ -247,25 +243,21 @@ export class CodeApplication extends Disposable {
// Handle paths delayed in case more are coming!
runningTimeout = setTimeout(() => {
if (this.windowsMainService) {
this.windowsMainService.open({
context: OpenContext.DOCK /* can also be opening from finder while app is running */,
cli: this.environmentService.args,
urisToOpen: macOpenFileURIs,
gotoLineMode: false,
preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */
});
macOpenFileURIs = [];
runningTimeout = null;
}
this.windowsMainService?.open({
context: OpenContext.DOCK /* can also be opening from finder while app is running */,
cli: this.environmentService.args,
urisToOpen: macOpenFileURIs,
gotoLineMode: false,
preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */
});
macOpenFileURIs = [];
runningTimeout = null;
}, 100);
});
app.on('new-window-for-tab', () => {
if (this.windowsMainService) {
this.windowsMainService.openEmptyWindow({ context: OpenContext.DESKTOP }); //macOS native tab "+" button
}
this.windowsMainService?.openEmptyWindow({ context: OpenContext.DESKTOP }); //macOS native tab "+" button
});
ipc.on('vscode:fetchShellEnv', async (event: IpcMainEvent) => {
......@@ -298,9 +290,7 @@ export class CodeApplication extends Disposable {
// Keyboard layout changes (after window opened)
const nativeKeymap = await import('native-keymap');
nativeKeymap.onDidChangeKeyboardLayout(() => {
if (this.windowsMainService) {
this.windowsMainService.sendToAll('vscode:keyboardLayoutChanged');
}
this.windowsMainService?.sendToAll('vscode:keyboardLayoutChanged');
});
})();
}
......@@ -315,9 +305,7 @@ export class CodeApplication extends Disposable {
};
// handle on client side
if (this.windowsMainService) {
this.windowsMainService.sendToFocused('vscode:reportError', JSON.stringify(friendlyError));
}
this.windowsMainService?.sendToFocused('vscode:reportError', JSON.stringify(friendlyError));
}
this.logService.error(`[uncaught exception in main]: ${err}`);
......@@ -391,7 +379,7 @@ export class CodeApplication extends Disposable {
this._register(server);
}
// Setup Auth Handler
// Setup Auth Handler (TODO@ben remove old auth handler eventually)
if (this.configurationService.getValue('window.enableExperimentalProxyLoginDialog') !== true) {
this._register(new ProxyAuthHandler());
} else {
......@@ -502,14 +490,12 @@ export class CodeApplication extends Disposable {
const path = await contentTracing.stopRecording(joinPath(this.environmentService.userHome, `${product.applicationName}-${Math.random().toString(16).slice(-4)}.trace.txt`).fsPath);
if (!timeout) {
if (this.dialogMainService) {
this.dialogMainService.showMessageBox({
type: 'info',
message: localize('trace.message', "Successfully created trace."),
detail: localize('trace.detail', "Please create an issue and manually attach the following file:\n{0}", path),
buttons: [localize('trace.ok', "OK")]
}, withNullAsUndefined(BrowserWindow.getFocusedWindow()));
}
this.dialogMainService?.showMessageBox({
type: 'info',
message: localize('trace.message', "Successfully created trace."),
detail: localize('trace.detail', "Please create an issue and manually attach the following file:\n{0}", path),
buttons: [localize('trace.ok', "OK")]
}, withNullAsUndefined(BrowserWindow.getFocusedWindow()));
} else {
this.logService.info(`Tracing: data recorded (after 30s timeout) to ${path}`);
}
......
......@@ -295,7 +295,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
},
'window.enableExperimentalProxyLoginDialog': {
'type': 'boolean',
'default': false,
'default': true,
'scope': ConfigurationScope.APPLICATION,
'description': nls.localize('window.enableExperimentalProxyLoginDialog', "Enables a new login dialog for proxy authentication. Requires a restart to take effect."),
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册