Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build/gulpfile.vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ function packageTask(platform: string, arch: string, sourceFolderName: string, d
'resources/win32/react.ico',
'resources/win32/ruby.ico',
'resources/win32/sass.ico',
'resources/win32/sessions.ico',
'resources/win32/shell.ico',
'resources/win32/sql.ico',
'resources/win32/typescript.ico',
Expand Down
Binary file removed resources/win32/sessions.ico
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ export class NativeHostMainService extends Disposable implements INativeHostMain
workspace: window.openedWorkspace ?? toWorkspaceIdentifier(window.backupPath, window.isExtensionDevelopmentHost),
title: window.win?.getTitle() ?? '',
filename: window.getRepresentedFilename(),
dirty: window.isDocumentEdited(),
iconPath: window.iconPath
dirty: window.isDocumentEdited()
}));

const auxiliaryWindows = [];
Expand Down
1 change: 0 additions & 1 deletion src/vs/platform/window/common/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ interface IOpenedWindow {
export interface IOpenedMainWindow extends IOpenedWindow {
readonly workspace?: IAnyWorkspaceIdentifier;
readonly dirty: boolean;
readonly iconPath?: URI;
}

export interface IOpenedAuxiliaryWindow extends IOpenedWindow {
Expand Down
3 changes: 0 additions & 3 deletions src/vs/platform/window/electron-main/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import electron from 'electron';
import { CancellationToken } from '../../../base/common/cancellation.js';
import { Event } from '../../../base/common/event.js';
import { IDisposable } from '../../../base/common/lifecycle.js';
import { URI } from '../../../base/common/uri.js';
import { ISerializableCommandAction } from '../../action/common/action.js';
import { NativeParsedArgs } from '../../environment/common/argv.js';
import { FocusMode, IApplicationBadge } from '../../native/common/native.js';
Expand Down Expand Up @@ -64,8 +63,6 @@ export interface ICodeWindow extends IBaseWindow {

readonly remoteAuthority?: string;

readonly iconPath?: URI;

readonly isExtensionDevelopmentHost: boolean;
readonly isExtensionTestHost: boolean;

Expand Down
9 changes: 0 additions & 9 deletions src/vs/platform/windows/electron-main/windowImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { toErrorMessage } from '../../../base/common/errorMessage.js';
import { Emitter, Event } from '../../../base/common/event.js';
import { Disposable, DisposableStore, IDisposable, MutableDisposable, toDisposable } from '../../../base/common/lifecycle.js';
import { FileAccess, Schemas } from '../../../base/common/network.js';
import { join } from '../../../base/common/path.js';
import { getMarks, mark } from '../../../base/common/performance.js';
import { isTahoeOrNewer, isLinux, isMacintosh, isWindows } from '../../../base/common/platform.js';
import { URI } from '../../../base/common/uri.js';
Expand Down Expand Up @@ -702,9 +701,6 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {

get remoteAuthority(): string | undefined { return this._config?.remoteAuthority; }

private readonly _iconPath: URI | undefined;
get iconPath(): URI | undefined { return this._iconPath; }

private _config: INativeWindowConfiguration | undefined;
get config(): INativeWindowConfiguration | undefined { return this._config; }

Expand Down Expand Up @@ -781,11 +777,6 @@ export class CodeWindow extends BaseWindow implements ICodeWindow {
}

const options = instantiationService.invokeFunction(defaultBrowserWindowOptions, this.windowState, undefined, webPreferences);
const iconPath = config.isSessionsWindow && isWindows ? join(this.environmentMainService.appRoot, 'resources/win32/sessions.ico') : undefined;
if (iconPath) {
options.icon = iconPath;
}
this._iconPath = iconPath ? URI.file(iconPath) : undefined;

// Create the browser window
mark('code/willCreateCodeBrowserWindow');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ suite('WindowsFinder', () => {
openedWorkspace = options.openedFolderUri ? { id: '', uri: options.openedFolderUri } : options.openedWorkspace;
backupPath?: string | undefined;
remoteAuthority?: string | undefined;
iconPath?: URI | undefined;
isExtensionDevelopmentHost = false;
isExtensionTestHost = false;
lastFocusTime = options.lastFocusTime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Emitter, Event as CommonEvent } from '../../../base/common/event.js';
import { normalizeDriveLetter, splitRecentLabel } from '../../../base/common/labels.js';
import { Disposable } from '../../../base/common/lifecycle.js';
import { Schemas } from '../../../base/common/network.js';
import { join } from '../../../base/common/path.js';
import { isMacintosh, isWindows } from '../../../base/common/platform.js';
import { basename, dirname, extUriBiasedIgnorePathCase, isEqual, originalFSPath } from '../../../base/common/resources.js';
import { URI } from '../../../base/common/uri.js';
Expand Down Expand Up @@ -373,7 +372,6 @@ export class WorkspacesHistoryMainService extends Disposable implements IWorkspa
}

const jumpList: JumpListCategory[] = [];
let recentWorkspaces = this.getWindowsJumpListWorkspaces((await this.getRecentlyOpened()).workspaces);

// Tasks
jumpList.push({
Expand All @@ -387,21 +385,12 @@ export class WorkspacesHistoryMainService extends Disposable implements IWorkspa
args: '-n', // force new window
iconPath: process.execPath,
iconIndex: 0
},
{
type: 'task',
title: localize('agentsWindow', "Agents Window"),
description: localize('openAgentsWindowDesc', "Opens the Agents Window"),
program: process.execPath,
args: '--agents',
iconPath: join(this.environmentMainService.appRoot, 'resources/win32/sessions.ico'),
iconIndex: 0
}
]
});

// Recent Workspaces
if (recentWorkspaces.length > 0) {
if ((await this.getRecentlyOpened()).workspaces.length > 0) {

// The user might have meanwhile removed items from the jump list and we have to respect that
// so we need to update our list of recent paths with the choice of the user to not add them again
Expand All @@ -419,11 +408,10 @@ export class WorkspacesHistoryMainService extends Disposable implements IWorkspa
}
}
await this.removeRecentlyOpened(toRemove);
recentWorkspaces = this.getWindowsJumpListWorkspaces((await this.getRecentlyOpened()).workspaces);

// Add entries up to the slot count Explorer requested (jumpListSettings.minItems).
let hasWorkspaces = false;
const items: JumpListItem[] = coalesce(recentWorkspaces.slice(0, jumpListSettings.minItems).map(recent => {
const items: JumpListItem[] = coalesce((await this.getRecentlyOpened()).workspaces.slice(0, jumpListSettings.minItems).map(recent => {
const workspace = isRecentWorkspace(recent) ? recent.workspace : recent.folderUri;

const { title, description } = this.getWindowsJumpListLabel(workspace, recent.label);
Expand Down Expand Up @@ -470,10 +458,6 @@ export class WorkspacesHistoryMainService extends Disposable implements IWorkspa
}
}

private getWindowsJumpListWorkspaces(workspaces: Array<IRecentWorkspace | IRecentFolder>): Array<IRecentWorkspace | IRecentFolder> {
return workspaces.filter(recent => isRecentFolder(recent) || !this.isAgentSessionsWorkspace(recent.workspace));
}

private getWindowsJumpListLabel(workspace: IWorkspaceIdentifier | URI, recentLabel: string | undefined): { title: string; description: string } {

// Prefer recent label
Expand Down
3 changes: 1 addition & 2 deletions src/vs/workbench/electron-browser/actions/windowActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ abstract class BaseSwitchWindow extends Action2 {
windowId: window.id,
label: window.title,
ariaLabel: window.dirty ? localize('windowDirtyAriaLabel', "{0}, window with unsaved changes", window.title) : window.title,
iconPath: window.iconPath ? { dark: window.iconPath } : undefined,
iconClasses: window.iconPath ? undefined : getIconClasses(modelService, languageService, resource, fileKind),
iconClasses: getIconClasses(modelService, languageService, resource, fileKind),
description: (currentWindowId === window.id) ? localize('current', "Current Window") : undefined,
buttons: window.dirty ? [this.closeDirtyWindowAction] : currentWindowId === window.id ? [this.closeActiveWindowAction] : [this.closeWindowAction]
};
Expand Down