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:
bao-qian
2016-03-26 01:20:42 +00:00
parent 6274b617f4
commit dc9908eac1
11 changed files with 199 additions and 314 deletions

View File

@@ -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)