-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Option to hide the status bar implemented
This fixes #6356
- Loading branch information
1 parent
8bee53a
commit 9a7594e
Showing
7 changed files
with
90 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
'use strict'; | ||
|
||
import {TPromise} from 'vs/base/common/winjs.base'; | ||
import nls = require('vs/nls'); | ||
import {Registry} from 'vs/platform/platform'; | ||
import {Action} from 'vs/base/common/actions'; | ||
import {SyncActionDescriptor} from 'vs/platform/actions/common/actions'; | ||
import {IWorkbenchActionRegistry, Extensions} from 'vs/workbench/common/actionRegistry'; | ||
import {IPartService} from 'vs/workbench/services/part/common/partService'; | ||
|
||
const ID = 'workbench.action.toggleStatusbarVisibility'; | ||
const LABEL = nls.localize('toggleStatusbar', "Toggle Status Bar Visibility"); | ||
|
||
export class ToggleStatusbarVisibilityAction extends Action { | ||
|
||
constructor(id: string, label: string, @IPartService private partService: IPartService) { | ||
super(id, label); | ||
|
||
this.enabled = !!this.partService; | ||
} | ||
|
||
public run(): TPromise<any> { | ||
let hideStatusbar = !this.partService.isStatusBarHidden(); | ||
this.partService.setStatusBarHidden(hideStatusbar); | ||
|
||
return TPromise.as(null); | ||
} | ||
} | ||
|
||
let registry = <IWorkbenchActionRegistry>Registry.as(Extensions.WorkbenchActions); | ||
registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleStatusbarVisibilityAction, ID, LABEL), 'View: Toggle Status Bar Visibility', nls.localize('view', "View")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters