Skip to content

Commit ae0dbb3

Browse files
author
Benjamin Pasero
committed
💄 desktop => native
1 parent ecdf439 commit ae0dbb3

16 files changed

Lines changed: 44 additions & 44 deletions

File tree

src/vs/base/browser/ui/list/listView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class ExternalElementsDragAndDropData<T> implements IDragAndDropData {
121121
}
122122
}
123123

124-
export class DesktopDragAndDropData implements IDragAndDropData {
124+
export class NativeDragAndDropData implements IDragAndDropData {
125125

126126
readonly types: any[];
127127
readonly files: any[];
@@ -976,7 +976,7 @@ export class ListView<T> implements ISpliceable<T>, IDisposable {
976976
return false;
977977
}
978978

979-
this.currentDragData = new DesktopDragAndDropData();
979+
this.currentDragData = new NativeDragAndDropData();
980980
}
981981
}
982982

src/vs/base/common/stream.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface ReadableStreamEvents<T> {
3333

3434
/**
3535
* A interface that emulates the API shape of a node.js readable
36-
* stream for use in desktop and web environments.
36+
* stream for use in native and web environments.
3737
*/
3838
export interface ReadableStream<T> extends ReadableStreamEvents<T> {
3939

@@ -60,7 +60,7 @@ export interface ReadableStream<T> extends ReadableStreamEvents<T> {
6060

6161
/**
6262
* A interface that emulates the API shape of a node.js readable
63-
* for use in desktop and web environments.
63+
* for use in native and web environments.
6464
*/
6565
export interface Readable<T> {
6666

@@ -73,7 +73,7 @@ export interface Readable<T> {
7373

7474
/**
7575
* A interface that emulates the API shape of a node.js writeable
76-
* stream for use in desktop and web environments.
76+
* stream for use in native and web environments.
7777
*/
7878
export interface WriteableStream<T> extends ReadableStream<T> {
7979

src/vs/platform/environment/common/environment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface IEnvironmentService {
2323

2424
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2525
// NOTE: DO NOT ADD ANY OTHER PROPERTY INTO THE COLLECTION HERE
26-
// UNLESS THIS PROPERTY IS SUPPORTED BOTH IN WEB AND DESKTOP!!!!
26+
// UNLESS THIS PROPERTY IS SUPPORTED BOTH IN WEB AND NATIVE!!!!
2727
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2828

2929
readonly _serviceBrand: undefined;
@@ -70,6 +70,6 @@ export interface IEnvironmentService {
7070

7171
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7272
// NOTE: DO NOT ADD ANY OTHER PROPERTY INTO THE COLLECTION HERE
73-
// UNLESS THIS PROPERTY IS SUPPORTED BOTH IN WEB AND DESKTOP!!!!
73+
// UNLESS THIS PROPERTY IS SUPPORTED BOTH IN WEB AND NATIVE!!!!
7474
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7575
}

src/vs/platform/files/common/files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ export function whenProviderRegistered(file: URI, fileService: IFileService): Pr
867867
}
868868

869869
/**
870-
* Desktop only: limits for memory sizes
870+
* Native only: limits for memory sizes
871871
*/
872872
export const MIN_MAX_MEMORY_SIZE_MB = 2048;
873873
export const FALLBACK_MAX_MEMORY_SIZE_MB = 4096;

src/vs/platform/menubar/electron-main/menubar.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import * as nls from 'vs/nls';
77
import { isMacintosh, language } from 'vs/base/common/platform';
88
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
99
import { app, shell, Menu, MenuItem, BrowserWindow, MenuItemConstructorOptions, WebContents, Event, KeyboardEvent } from 'electron';
10-
import { getTitleBarStyle, IDesktopRunActionInWindowRequest, IDesktopRunKeybindingInWindowRequest, IWindowOpenable } from 'vs/platform/windows/common/windows';
10+
import { getTitleBarStyle, INativeRunActionInWindowRequest, INativeRunKeybindingInWindowRequest, IWindowOpenable } from 'vs/platform/windows/common/windows';
1111
import { OpenContext } from 'vs/platform/windows/node/window';
1212
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
1313
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
@@ -754,10 +754,10 @@ export class Menubar {
754754
}
755755

756756
if (invocation.type === 'commandId') {
757-
const runActionPayload: IDesktopRunActionInWindowRequest = { id: invocation.commandId, from: 'menu' };
757+
const runActionPayload: INativeRunActionInWindowRequest = { id: invocation.commandId, from: 'menu' };
758758
activeWindow.sendWhenReady('vscode:runAction', runActionPayload);
759759
} else {
760-
const runKeybindingPayload: IDesktopRunKeybindingInWindowRequest = { userSettingsLabel: invocation.userSettingsLabel };
760+
const runKeybindingPayload: INativeRunKeybindingInWindowRequest = { userSettingsLabel: invocation.userSettingsLabel };
761761
activeWindow.sendWhenReady('vscode:runKeybinding', runKeybindingPayload);
762762
}
763763
} else {

src/vs/platform/windows/common/windows.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,20 +186,20 @@ export interface IOpenFileRequest {
186186
}
187187

188188
/**
189-
* Additional context for the request on desktop only.
189+
* Additional context for the request on native only.
190190
*/
191-
export interface IDesktopOpenFileRequest extends IOpenFileRequest {
191+
export interface INativeOpenFileRequest extends IOpenFileRequest {
192192
termProgram?: string;
193193
filesToWait?: IPathsToWaitForData;
194194
}
195195

196-
export interface IDesktopRunActionInWindowRequest {
196+
export interface INativeRunActionInWindowRequest {
197197
id: string;
198198
from: 'menu' | 'touchbar' | 'mouse';
199199
args?: any[];
200200
}
201201

202-
export interface IDesktopRunKeybindingInWindowRequest {
202+
export interface INativeRunKeybindingInWindowRequest {
203203
userSettingsLabel: string;
204204
}
205205

src/vs/workbench/contrib/files/browser/views/explorerViewer.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { fillResourceDataTransfers, CodeDataTransfers, extractResources, contain
3434
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
3535
import { IDragAndDropData, DataTransfers } from 'vs/base/browser/dnd';
3636
import { Schemas } from 'vs/base/common/network';
37-
import { DesktopDragAndDropData, ExternalElementsDragAndDropData, ElementsDragAndDropData } from 'vs/base/browser/ui/list/listView';
37+
import { NativeDragAndDropData, ExternalElementsDragAndDropData, ElementsDragAndDropData } from 'vs/base/browser/ui/list/listView';
3838
import { isMacintosh, isWeb } from 'vs/base/common/platform';
3939
import { IDialogService, IConfirmation, getFileNamesMessage } from 'vs/platform/dialogs/common/dialogs';
4040
import { IWorkingCopyFileService } from 'vs/workbench/services/workingCopy/common/workingCopyFileService';
@@ -839,11 +839,11 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
839839

840840
private handleDragOver(data: IDragAndDropData, target: ExplorerItem | undefined, targetIndex: number | undefined, originalEvent: DragEvent): boolean | ITreeDragOverReaction {
841841
const isCopy = originalEvent && ((originalEvent.ctrlKey && !isMacintosh) || (originalEvent.altKey && isMacintosh));
842-
const fromDesktop = data instanceof DesktopDragAndDropData;
843-
const effect = (fromDesktop || isCopy) ? ListDragOverEffect.Copy : ListDragOverEffect.Move;
842+
const isNative = data instanceof NativeDragAndDropData;
843+
const effect = (isNative || isCopy) ? ListDragOverEffect.Copy : ListDragOverEffect.Move;
844844

845-
// Desktop DND
846-
if (fromDesktop) {
845+
// Native DND
846+
if (isNative) {
847847
if (!containsDragType(originalEvent, DataTransfers.FILES, CodeDataTransfers.FILES)) {
848848
return false;
849849
}
@@ -979,7 +979,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
979979
}
980980

981981
// Desktop DND (Import file)
982-
if (data instanceof DesktopDragAndDropData) {
982+
if (data instanceof NativeDragAndDropData) {
983983
if (isWeb) {
984984
this.handleWebExternalDrop(data, target, originalEvent).then(undefined, e => this.notificationService.warn(e));
985985
} else {
@@ -992,7 +992,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
992992
}
993993
}
994994

995-
private async handleWebExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
995+
private async handleWebExternalDrop(data: NativeDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
996996
const items = (originalEvent.dataTransfer as unknown as IWebkitDataTransfer).items;
997997

998998
// Somehow the items thing is being modified at random, maybe as a security
@@ -1205,7 +1205,7 @@ export class FileDragAndDrop implements ITreeDragAndDrop<ExplorerItem> {
12051205
});
12061206
}
12071207

1208-
private async handleExternalDrop(data: DesktopDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
1208+
private async handleExternalDrop(data: NativeDragAndDropData, target: ExplorerItem, originalEvent: DragEvent): Promise<void> {
12091209

12101210
// Check for dropped external files to be folders
12111211
const droppedResources = extractResources(originalEvent, true);

src/vs/workbench/contrib/files/browser/views/openEditorsView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
3838
import { IViewletViewOptions } from 'vs/workbench/browser/parts/views/viewsViewlet';
3939
import { IDragAndDropData, DataTransfers } from 'vs/base/browser/dnd';
4040
import { memoize } from 'vs/base/common/decorators';
41-
import { ElementsDragAndDropData, DesktopDragAndDropData } from 'vs/base/browser/ui/list/listView';
41+
import { ElementsDragAndDropData, NativeDragAndDropData } from 'vs/base/browser/ui/list/listView';
4242
import { URI } from 'vs/base/common/uri';
4343
import { withUndefinedAsNull } from 'vs/base/common/types';
4444
import { isWeb } from 'vs/base/common/platform';
@@ -667,7 +667,7 @@ class OpenEditorsDragAndDrop implements IListDragAndDrop<OpenEditor | IEditorGro
667667
}
668668

669669
onDragOver(data: IDragAndDropData, _targetElement: OpenEditor | IEditorGroup, _targetIndex: number, originalEvent: DragEvent): boolean | IListDragOverReaction {
670-
if (data instanceof DesktopDragAndDropData) {
670+
if (data instanceof NativeDragAndDropData) {
671671
if (isWeb) {
672672
return false; // dropping files into editor is unsupported on web
673673
}

src/vs/workbench/contrib/terminal/electron-browser/terminalNativeContribution.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { ipcRenderer } from 'vs/base/parts/sandbox/electron-sandbox/globals';
7-
import { IDesktopOpenFileRequest } from 'vs/platform/windows/common/windows';
7+
import { INativeOpenFileRequest } from 'vs/platform/windows/common/windows';
88
import { URI } from 'vs/base/common/uri';
99
import { IFileService } from 'vs/platform/files/common/files';
1010
import { getWindowsBuildNumber, linuxDistro } from 'vs/workbench/contrib/terminal/node/terminal';
@@ -30,7 +30,7 @@ export class TerminalNativeContribution extends Disposable implements IWorkbench
3030
) {
3131
super();
3232

33-
ipcRenderer.on('vscode:openFiles', (_: unknown, request: IDesktopOpenFileRequest) => this._onOpenFileRequest(request));
33+
ipcRenderer.on('vscode:openFiles', (_: unknown, request: INativeOpenFileRequest) => this._onOpenFileRequest(request));
3434
this._register(electronService.onOSResume(() => this._onOsResume()));
3535

3636
this._terminalService.setLinuxDistro(linuxDistro);
@@ -53,7 +53,7 @@ export class TerminalNativeContribution extends Disposable implements IWorkbench
5353
activeTab.terminalInstances.forEach(instance => instance.forceRedraw());
5454
}
5555

56-
private async _onOpenFileRequest(request: IDesktopOpenFileRequest): Promise<void> {
56+
private async _onOpenFileRequest(request: INativeOpenFileRequest): Promise<void> {
5757
// if the request to open files is coming in from the integrated terminal (identified though
5858
// the termProgram variable) and we are instructed to wait for editors close, wait for the
5959
// marker file to get deleted and then focus back to the integrated terminal.

src/vs/workbench/electron-browser/desktop.main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import { IProductService } from 'vs/platform/product/common/productService';
4848
import product from 'vs/platform/product/common/product';
4949
import { NativeResourceIdentityService } from 'vs/platform/resource/node/resourceIdentityServiceImpl';
5050
import { IResourceIdentityService } from 'vs/platform/resource/common/resourceIdentityService';
51-
import { DesktopLogService } from 'vs/workbench/services/log/electron-browser/logService';
51+
import { NativeLogService } from 'vs/workbench/services/log/electron-browser/logService';
5252
import { IElectronService, ElectronService } from 'vs/platform/electron/electron-sandbox/electron';
5353

5454
class DesktopMain extends Disposable {
@@ -183,7 +183,7 @@ class DesktopMain extends Disposable {
183183
serviceCollection.set(IProductService, productService);
184184

185185
// Log
186-
const logService = this._register(new DesktopLogService(this.configuration.windowId, mainProcessService, this.environmentService));
186+
const logService = this._register(new NativeLogService(this.configuration.windowId, mainProcessService, this.environmentService));
187187
serviceCollection.set(ILogService, logService);
188188

189189
// Remote

0 commit comments

Comments
 (0)