From b8c024ac0763ed66f3bf1f7dcdc4239746ed781a Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 20 Nov 2025 16:49:01 -0600 Subject: [PATCH] remove some dead code --- .../Commands/BuiltInsCommandProvider.cs | 2 +- .../ClipboardHistoryCommandsProvider.cs | 71 +------------------ 2 files changed, 3 insertions(+), 70 deletions(-) diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltInsCommandProvider.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltInsCommandProvider.cs index 1a392ad731..52b85239e8 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltInsCommandProvider.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/BuiltInsCommandProvider.cs @@ -40,7 +40,7 @@ public sealed partial class BuiltInsCommandProvider : CommandProvider, IExtended { Id = "com.microsoft.cmdpal.builtin.core"; DisplayName = Properties.Resources.builtin_display_name; - Icon = IconHelpers.FromRelativePath("Assets\\StoreLogo.scale-200.png"); + Icon = IconHelpers.FromRelativePath("Assets\\Square44x44Logo.altform-unplated_targetsize-256.png"); _rootPageService = rootPageService; } diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.ClipboardHistory/ClipboardHistoryCommandsProvider.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.ClipboardHistory/ClipboardHistoryCommandsProvider.cs index 7387b2f060..ab94a3a6a2 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.ClipboardHistory/ClipboardHistoryCommandsProvider.cs +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.ClipboardHistory/ClipboardHistoryCommandsProvider.cs @@ -1,20 +1,16 @@ -// Copyright (c) Microsoft Corporation +// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -using System.Collections.Generic; -using System.Linq; using Microsoft.CmdPal.Ext.ClipboardHistory.Helpers; using Microsoft.CmdPal.Ext.ClipboardHistory.Pages; using Microsoft.CommandPalette.Extensions; using Microsoft.CommandPalette.Extensions.Toolkit; -using Windows.Foundation.Collections; namespace Microsoft.CmdPal.Ext.ClipboardHistory; -public partial class ClipboardHistoryCommandsProvider : CommandProvider, IExtendedAttributesProvider +public partial class ClipboardHistoryCommandsProvider : CommandProvider { - private readonly CommandItem _bandItem; private readonly ListItem _clipboardHistoryListItem; private readonly SettingsManager _settingsManager = new(); @@ -30,7 +26,6 @@ public partial class ClipboardHistoryCommandsProvider : CommandProvider, IExtend new CommandContextItem(_settingsManager.Settings.SettingsPage), ], }; - _bandItem = new ClipboardHistoryBand(page); DisplayName = Properties.Resources.provider_display_name; Icon = Icons.ClipboardListIcon; Id = "Windows.ClipboardHistory"; @@ -42,66 +37,4 @@ public partial class ClipboardHistoryCommandsProvider : CommandProvider, IExtend { return [_clipboardHistoryListItem]; } - - public IDictionary GetProperties() - { - return new PropertySet() - { - { "DockBands", new ICommandItem[] { _bandItem } }, - }; - } } -#pragma warning disable SA1402 // File may only contain a single type - -internal sealed partial class ClipboardHistoryBand : CommandItem -{ - public ClipboardHistoryBand(ClipboardHistoryListPage page) - { - var item = new WrappedItem(page) - { - Icon = Icons.ClipboardListIcon, - }; - Command = new WrappedDockList(item) - { - Icon = Icons.ClipboardListIcon, - Name = string.Empty, - }; - Title = string.Empty; - } - - private sealed partial class WrappedItem : CommandItem - { - public override string Title => string.Empty; - - public WrappedItem(ICommand command) - { - Command = command; - } - } - - private sealed partial class WrappedDockList : ListPage - { - public override string Name => "TODO!"; - - public override string Id => "com.microsoft.cmdpal.clipboardHistory.Band"; - - private ICommandItem[] _items; - - public WrappedDockList(ICommandItem item) - { - _items = new ICommandItem[] { item }; - Name = string.Empty; - } - - public override IListItem[] GetItems() - { - // TODO! We're using a space here, because if we use the empty string, - // then CommandItemViewModel will fall back to the Command's name, - // and we don't want to have to modify the page (since we're using the - // same Page instance for the command and the band) - // return _items.Select(i => new ListItem(i) { Title = " " }).ToArray(); - return _items.Select(i => new ListItem(i)).ToArray(); - } - } -} -#pragma warning restore SA1402 // File may only contain a single type