remove some dead code

This commit is contained in:
Mike Griese
2025-11-20 16:49:01 -06:00
parent 640c1a8388
commit b8c024ac07
2 changed files with 3 additions and 70 deletions

View File

@@ -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;
}

View File

@@ -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<string, object> 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