Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
727f4bbb
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
727f4bbb
编写于
12月 23, 2016
作者:
D
David Terry
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unused code related to old menu bar toggling mechanism
上级
6b2fcaaa
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
4 addition
and
51 deletion
+4
-51
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+0
-1
src/vs/code/electron-main/windows.ts
src/vs/code/electron-main/windows.ts
+0
-23
src/vs/platform/windows/common/windows.ts
src/vs/platform/windows/common/windows.ts
+0
-2
src/vs/platform/windows/common/windowsIpc.ts
src/vs/platform/windows/common/windowsIpc.ts
+1
-7
src/vs/platform/windows/electron-browser/windowService.ts
src/vs/platform/windows/electron-browser/windowService.ts
+1
-4
src/vs/platform/windows/electron-main/windowsService.ts
src/vs/platform/windows/electron-main/windowsService.ts
+1
-6
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+1
-8
未找到文件。
src/vs/code/electron-main/window.ts
浏览文件 @
727f4bbb
...
...
@@ -126,7 +126,6 @@ export interface IVSCodeWindow {
export
class
VSCodeWindow
implements
IVSCodeWindow
{
public
static
menuBarHiddenKey
=
'
menuBarHidden
'
;
public
static
colorThemeStorageKey
=
'
theme
'
;
private
static
MIN_WIDTH
=
200
;
...
...
src/vs/code/electron-main/windows.ts
浏览文件 @
727f4bbb
...
...
@@ -117,7 +117,6 @@ export interface IWindowsMainService {
removeFromRecentPathsList
(
path
:
string
):
void
;
removeFromRecentPathsList
(
paths
:
string
[]):
void
;
clearRecentPathsList
():
void
;
toggleMenuBar
(
windowId
:
number
):
void
;
quit
():
void
;
}
...
...
@@ -1159,28 +1158,6 @@ export class WindowsManager implements IWindowsMainService {
return
pathA
===
pathB
;
}
public
toggleMenuBar
(
windowId
:
number
):
void
{
// Update in settings
const
menuBarHidden
=
this
.
storageService
.
getItem
(
VSCodeWindow
.
menuBarHiddenKey
,
false
);
const
newMenuBarHidden
=
!
menuBarHidden
;
const
windowConfig
=
this
.
configurationService
.
getConfiguration
<
IWindowSettings
>
(
'
window
'
);
let
menuBarVisibility
=
windowConfig
&&
windowConfig
.
menuBarVisibility
;
this
.
storageService
.
setItem
(
VSCodeWindow
.
menuBarHiddenKey
,
newMenuBarHidden
);
// Update across windows
WindowsManager
.
WINDOWS
.
forEach
(
w
=>
w
.
setMenuBarVisibility
(
menuBarVisibility
));
// Inform user if menu bar is now hidden
if
(
newMenuBarHidden
&&
menuBarVisibility
===
'
toggle
'
)
{
const
vscodeWindow
=
this
.
getWindowById
(
windowId
);
if
(
vscodeWindow
)
{
vscodeWindow
.
send
(
'
vscode:showInfoMessage
'
,
nls
.
localize
(
'
hiddenMenuBar
'
,
"
You can still access the menu bar by pressing the **Alt** key.
"
));
}
}
}
private
updateWindowsJumpList
():
void
{
if
(
!
platform
.
isWindows
)
{
return
;
// only on windows
...
...
src/vs/platform/windows/common/windows.ts
浏览文件 @
727f4bbb
...
...
@@ -36,7 +36,6 @@ export interface IWindowsService {
maximizeWindow
(
windowId
:
number
):
TPromise
<
void
>
;
unmaximizeWindow
(
windowId
:
number
):
TPromise
<
void
>
;
setDocumentEdited
(
windowId
:
number
,
flag
:
boolean
):
TPromise
<
void
>
;
toggleMenuBar
(
windowId
:
number
):
TPromise
<
void
>
;
quit
():
TPromise
<
void
>
;
// Global methods
...
...
@@ -80,7 +79,6 @@ export interface IWindowService {
getRecentlyOpen
():
TPromise
<
{
files
:
string
[];
folders
:
string
[];
}
>
;
focusWindow
():
TPromise
<
void
>
;
setDocumentEdited
(
flag
:
boolean
):
TPromise
<
void
>
;
toggleMenuBar
():
TPromise
<
void
>
;
isMaximized
():
TPromise
<
boolean
>
;
maximizeWindow
():
TPromise
<
void
>
;
unmaximizeWindow
():
TPromise
<
void
>
;
...
...
src/vs/platform/windows/common/windowsIpc.ts
浏览文件 @
727f4bbb
...
...
@@ -29,7 +29,6 @@ export interface IWindowsChannel extends IChannel {
call
(
command
:
'
maximizeWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
unmaximizeWindow
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
setDocumentEdited
'
,
arg
:
[
number
,
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
toggleMenuBar
'
,
arg
:
number
):
TPromise
<
void
>
;
call
(
command
:
'
quit
'
):
TPromise
<
void
>
;
call
(
command
:
'
windowOpen
'
,
arg
:
[
string
[],
boolean
]):
TPromise
<
void
>
;
call
(
command
:
'
openNewWindow
'
):
TPromise
<
void
>
;
...
...
@@ -75,7 +74,6 @@ export class WindowsChannel implements IWindowsChannel {
case
'
maximizeWindow
'
:
return
this
.
service
.
maximizeWindow
(
arg
);
case
'
unmaximizeWindow
'
:
return
this
.
service
.
unmaximizeWindow
(
arg
);
case
'
setDocumentEdited
'
:
return
this
.
service
.
setDocumentEdited
(
arg
[
0
],
arg
[
1
]);
case
'
toggleMenuBar
'
:
return
this
.
service
.
toggleMenuBar
(
arg
);
case
'
windowOpen
'
:
return
this
.
service
.
windowOpen
(
arg
[
0
],
arg
[
1
]);
case
'
openNewWindow
'
:
return
this
.
service
.
openNewWindow
();
case
'
showWindow
'
:
return
this
.
service
.
showWindow
(
arg
);
...
...
@@ -171,10 +169,6 @@ export class WindowsChannelClient implements IWindowsService {
return
this
.
channel
.
call
(
'
setDocumentEdited
'
,
[
windowId
,
flag
]);
}
toggleMenuBar
(
windowId
:
number
):
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
toggleMenuBar
'
,
windowId
);
}
quit
():
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
quit
'
);
}
...
...
@@ -218,4 +212,4 @@ export class WindowsChannelClient implements IWindowsService {
startCrashReporter
(
config
:
Electron
.
CrashReporterStartOptions
):
TPromise
<
void
>
{
return
this
.
channel
.
call
(
'
startCrashReporter
'
,
config
);
}
}
\ No newline at end of file
}
src/vs/platform/windows/electron-browser/windowService.ts
浏览文件 @
727f4bbb
...
...
@@ -89,7 +89,4 @@ export class WindowService implements IWindowService {
return
this
.
windowsService
.
setDocumentEdited
(
this
.
windowId
,
flag
);
}
toggleMenuBar
():
TPromise
<
void
>
{
return
this
.
windowsService
.
toggleMenuBar
(
this
.
windowId
);
}
}
\ No newline at end of file
}
src/vs/platform/windows/electron-main/windowsService.ts
浏览文件 @
727f4bbb
...
...
@@ -193,11 +193,6 @@ export class WindowsService implements IWindowsService, IDisposable {
return
TPromise
.
as
(
null
);
}
toggleMenuBar
(
windowId
:
number
):
TPromise
<
void
>
{
this
.
windowsMainService
.
toggleMenuBar
(
windowId
);
return
TPromise
.
as
(
null
);
}
windowOpen
(
paths
:
string
[],
forceNewWindow
?:
boolean
):
TPromise
<
void
>
{
if
(
!
paths
||
!
paths
.
length
)
{
return
TPromise
.
as
(
null
);
...
...
@@ -278,4 +273,4 @@ export class WindowsService implements IWindowsService, IDisposable {
dispose
():
void
{
this
.
disposables
=
dispose
(
this
.
disposables
);
}
}
\ No newline at end of file
}
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
727f4bbb
...
...
@@ -690,10 +690,6 @@ export class TestWindowService implements IWindowService {
return
TPromise
.
as
(
void
0
);
}
toggleMenuBar
():
TPromise
<
void
>
{
return
TPromise
.
as
(
void
0
);
}
isMaximized
():
TPromise
<
boolean
>
{
return
TPromise
.
as
(
void
0
);
}
...
...
@@ -795,9 +791,6 @@ export class TestWindowsService implements IWindowsService {
setDocumentEdited
(
windowId
:
number
,
flag
:
boolean
):
TPromise
<
void
>
{
return
TPromise
.
as
(
void
0
);
}
toggleMenuBar
(
windowId
:
number
):
TPromise
<
void
>
{
return
TPromise
.
as
(
void
0
);
}
quit
():
TPromise
<
void
>
{
return
TPromise
.
as
(
void
0
);
}
...
...
@@ -840,4 +833,4 @@ export class TestWindowsService implements IWindowsService {
startCrashReporter
(
config
:
Electron
.
CrashReporterStartOptions
):
TPromise
<
void
>
{
return
TPromise
.
as
(
void
0
);
}
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录