Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Pasero <benjamin.pasero@microsoft.com>2022-07-05 09:57:02 +0300
committerGitHub <noreply@github.com>2022-07-05 09:57:02 +0300
commitd529b0d77ce60cbc362c6a9e1e22ea076ae2329f (patch)
tree642c3df696113946ea079436f3a0755788a069d6 /src/vs/workbench
parent363133fa3e21955efb7d50290ce181d1323d5780 (diff)
macOS: adjust traffic lights when command center is visible #154131 (#154132)
Diffstat (limited to 'src/vs/workbench')
-rw-r--r--src/vs/workbench/electron-sandbox/window.ts15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/vs/workbench/electron-sandbox/window.ts b/src/vs/workbench/electron-sandbox/window.ts
index 571cd3a5f0f..af2e33d72d2 100644
--- a/src/vs/workbench/electron-sandbox/window.ts
+++ b/src/vs/workbench/electron-sandbox/window.ts
@@ -68,8 +68,6 @@ import { dirname } from 'vs/base/common/resources';
export class NativeWindow extends Disposable {
- private static REMEMBER_PROXY_CREDENTIALS_KEY = 'window.rememberProxyCredentials';
-
private touchBarMenu: IMenu | undefined;
private readonly touchBarDisposables = this._register(new DisposableStore());
private lastInstalledTouchedBar: ICommandAction[][] | undefined;
@@ -215,7 +213,8 @@ export class NativeWindow extends Disposable {
// Proxy Login Dialog
ipcRenderer.on('vscode:openProxyAuthenticationDialog', async (event: unknown, payload: { authInfo: AuthInfo; username?: string; password?: string; replyChannel: string }) => {
- const rememberCredentials = this.storageService.getBoolean(NativeWindow.REMEMBER_PROXY_CREDENTIALS_KEY, StorageScope.APPLICATION);
+ const rememberCredentialsKey = 'window.rememberProxyCredentials';
+ const rememberCredentials = this.storageService.getBoolean(rememberCredentialsKey, StorageScope.APPLICATION);
const result = await this.dialogService.input(Severity.Warning, localize('proxyAuthRequired', "Proxy Authentication Required"),
[
localize({ key: 'loginButton', comment: ['&& denotes a mnemonic'] }, "&&Log In"),
@@ -245,9 +244,9 @@ export class NativeWindow extends Disposable {
// Update state based on checkbox
if (result.checkboxChecked) {
- this.storageService.store(NativeWindow.REMEMBER_PROXY_CREDENTIALS_KEY, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
+ this.storageService.store(rememberCredentialsKey, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
} else {
- this.storageService.remove(NativeWindow.REMEMBER_PROXY_CREDENTIALS_KEY, StorageScope.APPLICATION);
+ this.storageService.remove(rememberCredentialsKey, StorageScope.APPLICATION);
}
// Reply back to main side with credentials
@@ -286,7 +285,7 @@ export class NativeWindow extends Disposable {
const file = EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.PRIMARY, filterByScheme: Schemas.file });
// Represented Filename
- this.updateRepresentedFilename(file?.fsPath);
+ this.nativeHostService.setRepresentedFilename(file?.fsPath ?? '');
// Custom title menu
this.provideCustomTitleContextMenu(file?.fsPath);
@@ -573,10 +572,6 @@ export class NativeWindow extends Disposable {
}
}
- private updateRepresentedFilename(filePath: string | undefined): void {
- this.nativeHostService.setRepresentedFilename(filePath ? filePath : '');
- }
-
private provideCustomTitleContextMenu(filePath: string | undefined): void {
// Clear old menu