提交 23e41cc6 编写于 作者: B Benjamin Pasero

Revert "inform mac users on title change"

This reverts commit 35ee5c27.
上级 1f769867
......@@ -6,16 +6,10 @@
'use strict';
import 'vs/css!./media/titlebarpart';
import * as nls from 'vs/nls';
import { TPromise } from 'vs/base/common/winjs.base';
import { Builder, $, Dimension } from 'vs/base/browser/builder';
import { Part } from 'vs/workbench/browser/part';
import { ITitleService } from 'vs/workbench/services/title/common/titleService';
import { getZoomFactor } from 'vs/base/browser/browser';
import { Action } from 'vs/base/common/actions';
import { IMessageService, Severity, IMessageWithAction } from 'vs/platform/message/common/message';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { isMacintosh } from 'vs/base/common/platform';
export class TitlebarPart extends Part implements ITitleService {
......@@ -26,50 +20,6 @@ export class TitlebarPart extends Part implements ITitleService {
private pendingTitle: string;
private initialTitleFontSize: number;
constructor(
id: string,
@IMessageService private messageService: IMessageService,
@IStorageService private storageService: IStorageService
) {
super(id);
this.informUser(); // TODO@Ben remove me
}
private informUser(): void {
if (isMacintosh && !this.storageService.getBoolean('customTitleBarInformUser', StorageScope.GLOBAL)) {
this.storageService.store('customTitleBarInformUser', true, StorageScope.GLOBAL);
const okAction = new Action(
'customTitle.ok',
nls.localize('customTitle.ok', "OK"),
null,
true,
() => TPromise.as(true)
);
const moreInfoAction = new Action(
'customTitle.moreInfo',
nls.localize('customTitle.moreInfo', "More information"),
null,
true,
() => {
window.open('https://github.com/Microsoft/vscode/issues/15098');
return TPromise.as(true);
}
);
this.messageService.show(Severity.Info, <IMessageWithAction>{
message: nls.localize('customTitleBarInformUser', "We have enabled a new custom title bar style on Mac. The related setting is called **window.titleBarStyle**."),
actions: [
okAction,
moreInfoAction
]
});
}
}
public createContentArea(parent: Builder): Builder {
this.titleContainer = $(parent);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册