Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fae59489
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fae59489
编写于
9月 06, 2018
作者:
R
Rachel Macfarlane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update integrity once, not on each window create
上级
6c3c08c4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
15 deletion
+8
-15
src/vs/platform/integrity/node/integrityServiceImpl.ts
src/vs/platform/integrity/node/integrityServiceImpl.ts
+5
-1
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
+2
-4
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+1
-9
src/vs/workbench/services/title/common/titleService.ts
src/vs/workbench/services/title/common/titleService.ts
+0
-1
未找到文件。
src/vs/platform/integrity/node/integrityServiceImpl.ts
浏览文件 @
fae59489
...
@@ -15,6 +15,7 @@ import Severity from 'vs/base/common/severity';
...
@@ -15,6 +15,7 @@ import Severity from 'vs/base/common/severity';
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
ILifecycleService
,
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
ILifecycleService
,
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IWindowsService
}
from
'
vs/platform/windows/common/windows
'
;
interface
IStorageData
{
interface
IStorageData
{
dontShowPrompt
:
boolean
;
dontShowPrompt
:
boolean
;
...
@@ -64,7 +65,8 @@ export class IntegrityServiceImpl implements IIntegrityService {
...
@@ -64,7 +65,8 @@ export class IntegrityServiceImpl implements IIntegrityService {
constructor
(
constructor
(
@
INotificationService
private
notificationService
:
INotificationService
,
@
INotificationService
private
notificationService
:
INotificationService
,
@
IStorageService
storageService
:
IStorageService
,
@
IStorageService
storageService
:
IStorageService
,
@
ILifecycleService
private
lifecycleService
:
ILifecycleService
@
ILifecycleService
private
lifecycleService
:
ILifecycleService
,
@
IWindowsService
private
windowsService
:
IWindowsService
)
{
)
{
this
.
_storage
=
new
IntegrityStorage
(
storageService
);
this
.
_storage
=
new
IntegrityStorage
(
storageService
);
...
@@ -76,6 +78,8 @@ export class IntegrityServiceImpl implements IIntegrityService {
...
@@ -76,6 +78,8 @@ export class IntegrityServiceImpl implements IIntegrityService {
return
;
return
;
}
}
this
.
_prompt
();
this
.
_prompt
();
this
.
windowsService
.
updateIntegrity
(
r
.
isPure
);
});
});
}
}
...
...
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
浏览文件 @
fae59489
...
@@ -86,7 +86,7 @@ export class TitlebarPart extends Part implements ITitleService {
...
@@ -86,7 +86,7 @@ export class TitlebarPart extends Part implements ITitleService {
)
{
)
{
super
(
id
,
{
hasTitle
:
false
},
themeService
);
super
(
id
,
{
hasTitle
:
false
},
themeService
);
this
.
properties
=
{
is
Pure
:
true
,
is
Admin
:
false
};
this
.
properties
=
{
isAdmin
:
false
};
this
.
activeEditorListeners
=
[];
this
.
activeEditorListeners
=
[];
this
.
registerListeners
();
this
.
registerListeners
();
...
@@ -193,11 +193,9 @@ export class TitlebarPart extends Part implements ITitleService {
...
@@ -193,11 +193,9 @@ export class TitlebarPart extends Part implements ITitleService {
updateProperties
(
properties
:
ITitleProperties
):
void
{
updateProperties
(
properties
:
ITitleProperties
):
void
{
const
isAdmin
=
typeof
properties
.
isAdmin
===
'
boolean
'
?
properties
.
isAdmin
:
this
.
properties
.
isAdmin
;
const
isAdmin
=
typeof
properties
.
isAdmin
===
'
boolean
'
?
properties
.
isAdmin
:
this
.
properties
.
isAdmin
;
const
isPure
=
typeof
properties
.
isPure
===
'
boolean
'
?
properties
.
isPure
:
this
.
properties
.
isPure
;
if
(
isAdmin
!==
this
.
properties
.
isAdmin
||
isPure
!==
this
.
properties
.
isPure
)
{
if
(
isAdmin
!==
this
.
properties
.
isAdmin
)
{
this
.
properties
.
isAdmin
=
isAdmin
;
this
.
properties
.
isAdmin
=
isAdmin
;
this
.
properties
.
isPure
=
isPure
;
this
.
setTitle
(
this
.
getWindowTitle
());
this
.
setTitle
(
this
.
getWindowTitle
());
}
}
...
...
src/vs/workbench/electron-browser/window.ts
浏览文件 @
fae59489
...
@@ -37,7 +37,6 @@ import { RunOnceScheduler } from 'vs/base/common/async';
...
@@ -37,7 +37,6 @@ import { RunOnceScheduler } from 'vs/base/common/async';
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
LifecyclePhase
,
ILifecycleService
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
LifecyclePhase
,
ILifecycleService
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
IWorkspaceFolderCreationData
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
{
IWorkspaceFolderCreationData
}
from
'
vs/platform/workspaces/common/workspaces
'
;
import
{
IIntegrityService
}
from
'
vs/platform/integrity/common/integrity
'
;
import
{
AccessibilitySupport
,
isRootUser
,
isWindows
,
isMacintosh
}
from
'
vs/base/common/platform
'
;
import
{
AccessibilitySupport
,
isRootUser
,
isWindows
,
isMacintosh
}
from
'
vs/base/common/platform
'
;
import
product
from
'
vs/platform/node/product
'
;
import
product
from
'
vs/platform/node/product
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
...
@@ -84,8 +83,7 @@ export class ElectronWindow extends Themable {
...
@@ -84,8 +83,7 @@ export class ElectronWindow extends Themable {
@
IWorkspaceEditingService
private
workspaceEditingService
:
IWorkspaceEditingService
,
@
IWorkspaceEditingService
private
workspaceEditingService
:
IWorkspaceEditingService
,
@
IFileService
private
fileService
:
IFileService
,
@
IFileService
private
fileService
:
IFileService
,
@
IMenuService
private
menuService
:
IMenuService
,
@
IMenuService
private
menuService
:
IMenuService
,
@
ILifecycleService
private
lifecycleService
:
ILifecycleService
,
@
ILifecycleService
private
lifecycleService
:
ILifecycleService
@
IIntegrityService
private
integrityService
:
IIntegrityService
)
{
)
{
super
(
themeService
);
super
(
themeService
);
...
@@ -286,12 +284,6 @@ export class ElectronWindow extends Themable {
...
@@ -286,12 +284,6 @@ export class ElectronWindow extends Themable {
ipc
.
send
(
'
vscode:workbenchLoaded
'
,
this
.
windowService
.
getCurrentWindowId
());
ipc
.
send
(
'
vscode:workbenchLoaded
'
,
this
.
windowService
.
getCurrentWindowId
());
});
});
// Integrity warning
this
.
integrityService
.
isPure
().
then
(
res
=>
{
this
.
titleService
.
updateProperties
({
isPure
:
res
.
isPure
});
this
.
windowsService
.
updateIntegrity
(
res
.
isPure
);
});
// Root warning
// Root warning
this
.
lifecycleService
.
when
(
LifecyclePhase
.
Running
).
then
(()
=>
{
this
.
lifecycleService
.
when
(
LifecyclePhase
.
Running
).
then
(()
=>
{
let
isAdminPromise
:
Promise
<
boolean
>
;
let
isAdminPromise
:
Promise
<
boolean
>
;
...
...
src/vs/workbench/services/title/common/titleService.ts
浏览文件 @
fae59489
...
@@ -9,7 +9,6 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
...
@@ -9,7 +9,6 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'
export
const
ITitleService
=
createDecorator
<
ITitleService
>
(
'
titleService
'
);
export
const
ITitleService
=
createDecorator
<
ITitleService
>
(
'
titleService
'
);
export
interface
ITitleProperties
{
export
interface
ITitleProperties
{
isPure
?:
boolean
;
isAdmin
?:
boolean
;
isAdmin
?:
boolean
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录