Disable custom title bar popup on Linux (#4478)

This commit is contained in:
Matt Irvine
2019-03-14 09:28:19 -07:00
committed by GitHub
parent 11f0ca371b
commit 7973f0f178

View File

@@ -203,38 +203,40 @@ export class MenubarControl extends Disposable {
} }
private detectAndRecommendCustomTitlebar(): void { private detectAndRecommendCustomTitlebar(): void {
if (!isLinux) { // {{SQL CARBON EDIT}} - Disable the custom titlebar recommendation
return; // if (!isLinux) {
} // return;
// }
if (!this.storageService.getBoolean('menubar/electronFixRecommended', StorageScope.GLOBAL, false)) { // if (!this.storageService.getBoolean('menubar/electronFixRecommended', StorageScope.GLOBAL, false)) {
if (this.currentMenubarVisibility === 'hidden' || this.currentTitlebarStyleSetting === 'custom') { // if (this.currentMenubarVisibility === 'hidden' || this.currentTitlebarStyleSetting === 'custom') {
// Issue will not arise for user, abort notification // // Issue will not arise for user, abort notification
return; // return;
} // }
const message = nls.localize('menubar.electronFixRecommendation', "If you experience hard to read text in the menu bar, we recommend trying out the custom title bar."); // const message = nls.localize('menubar.electronFixRecommendation', "If you experience hard to read text in the menu bar, we recommend trying out the custom title bar.");
this.notificationService.prompt(Severity.Info, message, [ // this.notificationService.prompt(Severity.Info, message, [
{ // {
label: nls.localize('goToSetting', "Open Settings"), // label: nls.localize('goToSetting', "Open Settings"),
run: () => { // run: () => {
return this.preferencesService.openGlobalSettings(undefined, { query: 'window.titleBarStyle' }); // return this.preferencesService.openGlobalSettings(undefined, { query: 'window.titleBarStyle' });
} // }
}, // },
{ // {
label: nls.localize('moreInfo', "More Info"), // label: nls.localize('moreInfo', "More Info"),
run: () => { // run: () => {
window.open('https://go.microsoft.com/fwlink/?linkid=2038566'); // window.open('https://go.microsoft.com/fwlink/?linkid=2038566');
} // }
}, // },
{ // {
label: nls.localize('neverShowAgain', "Don't Show Again"), // label: nls.localize('neverShowAgain', "Don't Show Again"),
run: () => { // run: () => {
this.storageService.store('menubar/electronFixRecommended', true, StorageScope.GLOBAL); // this.storageService.store('menubar/electronFixRecommended', true, StorageScope.GLOBAL);
} // }
} // }
]); // ]);
} // }
// {{SQL CARBON EDIT}} - End
} }
private registerListeners(): void { private registerListeners(): void {