mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Refactoring ContextMenu
1. Remove ItemDropEvent 2. Remove ShowContextMenus from API 3. Fix context menu item can't be opened ( #535 ), bug introduced from PR #494 (commit 45dbb50) 4. Move open result command and load context menu command back to MainViewModel 5. unify load context menu logic 6. other performance enhancement and potential bug fixed
This commit is contained in:
@@ -61,7 +61,6 @@ namespace Wox.Plugin.Program
|
||||
public void Init(PluginInitContext context)
|
||||
{
|
||||
this.context = context;
|
||||
this.context.API.ResultItemDropEvent += ResultDropEvent;
|
||||
Stopwatch.Debug("Preload programs", () =>
|
||||
{
|
||||
programs = ProgramCacheStorage.Instance.Programs;
|
||||
@@ -70,12 +69,6 @@ namespace Wox.Plugin.Program
|
||||
Stopwatch.Debug("Program Index", IndexPrograms);
|
||||
}
|
||||
|
||||
void ResultDropEvent(Result result, IDataObject dropObject, DragEventArgs e)
|
||||
{
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
public static void IndexPrograms()
|
||||
{
|
||||
lock (lockObject)
|
||||
|
||||
Reference in New Issue
Block a user