mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
use %APPDATA%
1. Fix can't find Result.ctor bug for plugin introduced in c0889de1f9ae460b2cc189eb59e5bd90ddb7d17e 2. use %APPDATA% for all data, part of #389 3. MISC
This commit is contained in:
@@ -51,8 +51,11 @@ namespace Wox.Plugin.Folder
|
||||
x => x.Nickname.StartsWith(input, StringComparison.OrdinalIgnoreCase)).ToList();
|
||||
List<Result> results =
|
||||
userFolderLinks.Select(
|
||||
item => new Result(item.Nickname, "Images/folder.png", "Ctrl + Enter to open the directory")
|
||||
item => new Result()
|
||||
{
|
||||
Title = item.Nickname,
|
||||
IcoPath = "Images/folder.png",
|
||||
SubTitle = "Ctrl + Enter to open the directory",
|
||||
Action = c =>
|
||||
{
|
||||
if (c.SpecialKeyState.CtrlPressed)
|
||||
@@ -128,8 +131,10 @@ namespace Wox.Plugin.Folder
|
||||
string firstResult = "Open current directory";
|
||||
if (incompleteName.Length > 0)
|
||||
firstResult = "Open " + rawQuery;
|
||||
results.Add(new Result(firstResult, "Images/folder.png")
|
||||
results.Add(new Result
|
||||
{
|
||||
Title = firstResult,
|
||||
IcoPath = "Images/folder.png",
|
||||
Score = 10000,
|
||||
Action = c =>
|
||||
{
|
||||
@@ -147,8 +152,11 @@ namespace Wox.Plugin.Folder
|
||||
if (incompleteName.Length != 0 && !dir.Name.ToLower().StartsWith(incompleteName))
|
||||
continue;
|
||||
DirectoryInfo dirCopy = dir;
|
||||
var result = new Result(dir.Name, "Images/folder.png", "Ctrl + Enter to open the directory")
|
||||
var result = new Result
|
||||
{
|
||||
Title = dir.Name,
|
||||
IcoPath = "Images/folder.png",
|
||||
SubTitle = "Ctrl + Enter to open the directory",
|
||||
Action = c =>
|
||||
{
|
||||
if (c.SpecialKeyState.CtrlPressed)
|
||||
@@ -180,8 +188,10 @@ namespace Wox.Plugin.Folder
|
||||
if (incompleteName.Length != 0 && !file.Name.ToLower().StartsWith(incompleteName))
|
||||
continue;
|
||||
string filePath = file.FullName;
|
||||
var result = new Result(Path.GetFileName(filePath), "Images/file.png")
|
||||
var result = new Result
|
||||
{
|
||||
Title = Path.GetFileName(filePath),
|
||||
IcoPath = "Images/file.png",
|
||||
Action = c =>
|
||||
{
|
||||
try
|
||||
|
||||
@@ -153,7 +153,6 @@ namespace Wox.Plugin.PluginManagement
|
||||
string pluginUrl = APIBASE + "/media/" + r1.plugin_file;
|
||||
Client.DownloadFile(pluginUrl, filePath);
|
||||
context.API.InstallPlugin(filePath);
|
||||
context.API.ReloadPlugins();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user