Add modifier key support when user action items.

This commit is contained in:
qianlifeng
2014-02-09 20:55:18 +08:00
parent 953adadd62
commit fcdb9e39c6
23 changed files with 84 additions and 133 deletions

View File

@@ -135,7 +135,7 @@ namespace Wox.Plugin.Doc
Title = name,
SubTitle = doc.Name.Replace(".docset", ""),
IcoPath = doc.IconPath,
Action = () =>
Action = (c) =>
{
string url = string.Format(@"{0}\{1}\Contents\Resources\Documents\{2}#{3}", docsetBasePath,
doc.Name, docPath, name);

View File

@@ -25,7 +25,9 @@ def query(key):
results.append(res)
return json.dumps(results)
def openUrl(url):
def openUrl(context,url):
#shift + enter
#if context["SpecialKeyState"]["ShiftPressed"] == "True":
webbrowser.open(url)
if __name__ == "__main__":

View File

@@ -22,7 +22,7 @@ namespace Wox.Plugin.Everything
Result r = new Result();
r.Title = Path.GetFileName(s);
r.SubTitle = s;
r.Action = () =>
r.Action = (c) =>
{
context.HideApp();
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo();

View File

@@ -76,7 +76,7 @@ namespace Wox.Plugin.Fanyi
Title = dst,
SubTitle = "Copy to clipboard",
IcoPath = "Images\\translate.png",
Action = () =>
Action = (c) =>
{
Clipboard.SetText(dst);
context.ShowMsg("translation has been copyed to your clipboard.", "",