Use ShellRun to provide unified experience

This commit is contained in:
Yeechan Lu
2014-03-21 03:53:18 +08:00
parent 25cedff47a
commit 5c6b741dc4
10 changed files with 33 additions and 52 deletions

View File

@@ -14,7 +14,7 @@ namespace Wox.Plugin.System
{
public class BrowserBookmarks : BaseSystemPlugin
{
private PluginInitContext context;
private List<Bookmark> bookmarks = new List<Bookmark>();
protected override List<Result> QueryInternal(Query query)
@@ -29,16 +29,10 @@ namespace Wox.Plugin.System
SubTitle = "Bookmark: " + c.Url,
IcoPath = Directory.GetCurrentDirectory() + @"\Images\bookmark.png",
Score = 5,
Action = (context) =>
Action = (e) =>
{
try
{
Process.Start(c.Url);
}
catch (Exception)
{
MessageBox.Show("open url failed:" + c.Url);
}
context.HideApp();
context.ShellRun(c.Url);
return true;
}
}).ToList();
@@ -57,6 +51,7 @@ namespace Wox.Plugin.System
LoadChromeBookmarks();
bookmarks = bookmarks.Distinct().ToList();
this.context = context;
}
private void ParseChromeBookmarks(String path, string source)