[PTRun]Add history plugin (#19569)

* Progress!

* Progress...

* POC level.

* Added ability to delete from history using IPublicAPI

* Some sorting, works in some cases.

* Rename "Run History" back to just "History".

* Updated item from review.

* Slight change to PowerLauncher ref, set Copy Local = False

* Fixed missing history items if added to history without search term.

* Added placeholder unit test project

* Updates for new History plugin.

* Update Product.wxs, removed useless Unit Test project

* Removed actual files for "Microsoft.PowerToys.Run.Plugin.History.UnitTests"

* Added history.md, updated ESRPSigning_core.json

* Changes for review

* Removed now global CodeAnalysis/stylecop
This commit is contained in:
Jeff Lord
2022-08-23 16:27:45 -04:00
committed by GitHub
parent 8cea22aaf1
commit 4c796c0b53
21 changed files with 940 additions and 64 deletions

View File

@@ -82,6 +82,11 @@ namespace PowerLauncher.ViewModel
RegisterResultsUpdatedEvent();
}
public void RemoveUserSelectedRecord(Result result)
{
_userSelectedRecord.Remove(result);
}
public void RegisterHotkey(IntPtr hwnd)
{
Log.Info("RegisterHotkey()", GetType());
@@ -566,6 +571,7 @@ namespace PowerLauncher.ViewModel
{
var plugin = pluginQueryItem.Key;
var query = pluginQueryItem.Value;
query.SelectedItems = _userSelectedRecord.GetGenericHistory();
var results = PluginManager.QueryForPlugin(plugin, query);
resultPluginPair[plugin.Metadata] = results;
currentCancellationToken.ThrowIfCancellationRequested();
@@ -586,6 +592,7 @@ namespace PowerLauncher.ViewModel
{
var plugin = pluginQueryItem.Key;
var query = pluginQueryItem.Value;
query.SelectedItems = _userSelectedRecord.GetGenericHistory();
var results = PluginManager.QueryForPlugin(plugin, query);
resultPluginPair[plugin.Metadata] = results;
currentCancellationToken.ThrowIfCancellationRequested();