mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Customize select funtionality in win32 except globally in program, and make code more readable
This commit is contained in:
parent
ead4c9a99b
commit
3d06adebaa
2 changed files with 13 additions and 4 deletions
|
|
@ -140,10 +140,19 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
Title = api.GetTranslation("flowlauncher_plugin_program_open_containing_folder"),
|
||||
Action = _ =>
|
||||
{
|
||||
var args = !string.IsNullOrWhiteSpace(Main._settings.CustomizedArgs)
|
||||
?Main._settings.CustomizedArgs
|
||||
.Replace("%s",$"\"{ParentDirectory}\"")
|
||||
.Replace("%f",$"\"{FullPath}\""):
|
||||
Main._settings.CustomizedExplorer==Settings.Explorer
|
||||
? $"/select,\"{FullPath}\""
|
||||
: Settings.ExplorerArgs;
|
||||
|
||||
Main.StartProcess(Process.Start, new ProcessStartInfo(
|
||||
!string.IsNullOrWhiteSpace(Main._settings.CustomizedExplorer) ? Main._settings.CustomizedExplorer:Settings.Explorer,
|
||||
!string.IsNullOrWhiteSpace(Main._settings.CustomizedArgs)?Main._settings.CustomizedArgs.Replace("%s",$"\"{ParentDirectory}\"").Replace("%f",$"\"{FullPath}\""):
|
||||
Settings.ExplorerArgs));
|
||||
!string.IsNullOrWhiteSpace(Main._settings.CustomizedExplorer)
|
||||
? Main._settings.CustomizedExplorer
|
||||
: Settings.Explorer,
|
||||
args));
|
||||
return true;
|
||||
},
|
||||
IcoPath = "Images/folder.png"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Flow.Launcher.Plugin.Program
|
|||
|
||||
internal const string Explorer = "explorer";
|
||||
|
||||
internal const string ExplorerArgs = "/select,%f";
|
||||
internal const string ExplorerArgs = "%s";
|
||||
|
||||
/// <summary>
|
||||
/// Contains user added folder location contents as well as all user disabled applications
|
||||
|
|
|
|||
Loading…
Reference in a new issue