mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 20:27:36 +02:00
Remove obsolete bool return
because hiding is now delegated to MainWindow.xaml's OnDeactivated()
This commit is contained in:
@@ -191,22 +191,19 @@ namespace Wox.Plugin.Program
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool StartProcess(Func<ProcessStartInfo, Process> runProcess, ProcessStartInfo info)
|
public static void StartProcess(Func<ProcessStartInfo, Process> runProcess, ProcessStartInfo info)
|
||||||
{
|
{
|
||||||
bool hide;
|
bool hide;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
runProcess(info);
|
runProcess(info);
|
||||||
hide = true;
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
var name = "Plugin: Program";
|
var name = "Plugin: Program";
|
||||||
var message = $"Can't start: {info.FileName}";
|
var message = $"Unable to start: {info.FileName}";
|
||||||
_context.API.ShowMsg(name, message, string.Empty);
|
_context.API.ShowMsg(name, message, string.Empty);
|
||||||
hide = false;
|
|
||||||
}
|
}
|
||||||
return hide;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReloadData()
|
public void ReloadData()
|
||||||
|
|||||||
@@ -319,11 +319,14 @@ namespace Wox.Plugin.Program.Programs
|
|||||||
new Result
|
new Result
|
||||||
{
|
{
|
||||||
Title = api.GetTranslation("wox_plugin_program_open_containing_folder"),
|
Title = api.GetTranslation("wox_plugin_program_open_containing_folder"),
|
||||||
|
|
||||||
Action = _ =>
|
Action = _ =>
|
||||||
{
|
{
|
||||||
var hide = Main.StartProcess(Process.Start, new ProcessStartInfo(Package.Location));
|
Main.StartProcess(Process.Start, new ProcessStartInfo(Package.Location));
|
||||||
return hide;
|
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
IcoPath = "Images/folder.png"
|
IcoPath = "Images/folder.png"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -64,8 +64,10 @@ namespace Wox.Plugin.Program.Programs
|
|||||||
FileName = FullPath,
|
FileName = FullPath,
|
||||||
WorkingDirectory = ParentDirectory
|
WorkingDirectory = ParentDirectory
|
||||||
};
|
};
|
||||||
var hide = Main.StartProcess(Process.Start, info);
|
|
||||||
return hide;
|
Main.StartProcess(Process.Start, info);
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -129,8 +131,9 @@ namespace Wox.Plugin.Program.Programs
|
|||||||
Title = api.GetTranslation("wox_plugin_program_open_containing_folder"),
|
Title = api.GetTranslation("wox_plugin_program_open_containing_folder"),
|
||||||
Action = _ =>
|
Action = _ =>
|
||||||
{
|
{
|
||||||
var hide = Main.StartProcess(Process.Start, new ProcessStartInfo(ParentDirectory));
|
Main.StartProcess(Process.Start, new ProcessStartInfo(ParentDirectory));
|
||||||
return hide;
|
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
IcoPath = "Images/folder.png"
|
IcoPath = "Images/folder.png"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user