Skip to content

Commit 141ecfb

Browse files
committed
mac specific actions should not respect web
1 parent 820e70a commit 141ecfb

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/vs/workbench/contrib/debug/browser/welcomeView.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
1919
import { IOpenerService } from 'vs/platform/opener/common/opener';
2020
import { WorkbenchStateContext } from 'vs/workbench/browser/contextkeys';
2121
import { OpenFolderAction, OpenFileAction, OpenFileFolderAction } from 'vs/workbench/browser/actions/workspaceActions';
22-
import { isMacintosh } from 'vs/base/common/platform';
22+
import { isMacintosh, isWeb } from 'vs/base/common/platform';
2323
import { isCodeEditor } from 'vs/editor/browser/editorBrowser';
2424
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
2525
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
@@ -108,7 +108,7 @@ export class WelcomeView extends ViewPane {
108108
const viewsRegistry = Registry.as<IViewsRegistry>(Extensions.ViewsRegistry);
109109
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
110110
content: localize({ key: 'openAFileWhichCanBeDebugged', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] },
111-
"[Open a file](command:{0}) which can be debugged or run.", isMacintosh ? OpenFileFolderAction.ID : OpenFileAction.ID),
111+
"[Open a file](command:{0}) which can be debugged or run.", (isMacintosh && !isWeb) ? OpenFileFolderAction.ID : OpenFileAction.ID),
112112
when: ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_DEBUGGER_INTERESTED_IN_ACTIVE_EDITOR.toNegated()),
113113
group: ViewContentGroups.Open
114114
});
@@ -138,7 +138,7 @@ viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
138138

139139
viewsRegistry.registerViewWelcomeContent(WelcomeView.ID, {
140140
content: localize({ key: 'customizeRunAndDebugOpenFolder', comment: ['Please do not translate the word "commmand", it is part of our internal syntax which must not change'] },
141-
"To customize Run and Debug, [open a folder](command:{0}) and create a launch.json file.", isMacintosh ? OpenFileFolderAction.ID : OpenFolderAction.ID),
141+
"To customize Run and Debug, [open a folder](command:{0}) and create a launch.json file.", (isMacintosh && !isWeb) ? OpenFileFolderAction.ID : OpenFolderAction.ID),
142142
when: ContextKeyExpr.and(CONTEXT_DEBUGGERS_AVAILABLE, WorkbenchStateContext.isEqualTo('empty')),
143143
group: ViewContentGroups.Debug
144144
});

src/vs/workbench/contrib/files/browser/fileActions.contribution.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { openWindowCommand, COPY_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID,
1414
import { CommandsRegistry, ICommandHandler } from 'vs/platform/commands/common/commands';
1515
import { ContextKeyExpr, ContextKeyExpression } from 'vs/platform/contextkey/common/contextkey';
1616
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
17-
import { isMacintosh } from 'vs/base/common/platform';
17+
import { isMacintosh, isWeb } from 'vs/base/common/platform';
1818
import { FilesExplorerFocusCondition, ExplorerRootContext, ExplorerFolderContext, ExplorerResourceNotReadonlyContext, ExplorerResourceCut, ExplorerResourceMoveableToTrash, ExplorerViewletVisibleContext, ExplorerResourceAvailableEditorIdsContext } from 'vs/workbench/contrib/files/common/files';
1919
import { ADD_ROOT_FOLDER_COMMAND_ID, ADD_ROOT_FOLDER_LABEL } from 'vs/workbench/browser/actions/workspaceCommands';
2020
import { CLOSE_SAVED_EDITORS_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID } from 'vs/workbench/browser/parts/editor/editorCommands';
@@ -47,7 +47,7 @@ const workspacesCategory = nls.localize('workspaces', "Workspaces");
4747
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenWorkspaceAction), 'Workspaces: Open Workspace...', workspacesCategory);
4848

4949
const fileCategory = nls.localize('file', "File");
50-
if (isMacintosh) {
50+
if (isMacintosh && !isWeb) {
5151
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenFileFolderAction, { primary: KeyMod.CtrlCmd | KeyCode.KEY_O }), 'File: Open...', fileCategory);
5252
} else {
5353
registry.registerWorkbenchAction(SyncActionDescriptor.from(OpenFileAction, { primary: KeyMod.CtrlCmd | KeyCode.KEY_O }), 'File: Open File...', fileCategory);
@@ -618,7 +618,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
618618
order: 3
619619
});
620620

621-
if (isMacintosh) {
621+
if (isMacintosh && !isWeb) {
622622
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
623623
group: '2_open',
624624
command: {

src/vs/workbench/contrib/watermark/browser/watermark.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import 'vs/css!./watermark';
77
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
8-
import { isMacintosh, OS } from 'vs/base/common/platform';
8+
import { isMacintosh, isWeb, OS } from 'vs/base/common/platform';
99
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
1010
import * as nls from 'vs/nls';
1111
import { Registry } from 'vs/platform/registry/common/platform';
@@ -131,7 +131,7 @@ export class WatermarkContribution extends Disposable implements IWorkbenchContr
131131
const box = dom.append(this.watermark, $('.watermark-box'));
132132
const folder = this.workbenchState !== WorkbenchState.EMPTY;
133133
const selected = folder ? folderEntries : noFolderEntries
134-
.filter(entry => !('mac' in entry) || entry.mac === isMacintosh)
134+
.filter(entry => !('mac' in entry) || entry.mac === (isMacintosh && !isWeb))
135135
.filter(entry => !!CommandsRegistry.getCommand(entry.id));
136136

137137
const keybindingLabelStylers = this.watermarkDisposable.add(new DisposableStore());

0 commit comments

Comments
 (0)