mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
plugin/pkiller: fix context menu results
do not show the "kill all instances" context menu option when the context menu itself is triggered from the "kill all X processes" result
This commit is contained in:
parent
82ebbcb811
commit
01f98b16fa
1 changed files with 14 additions and 11 deletions
|
|
@ -52,21 +52,24 @@ namespace Flow.Launcher.Plugin.ProcessKiller
|
|||
// get all non-system processes whose file path matches that of the given result (processPath)
|
||||
var similarProcesses = processHelper.GetSimilarProcesses(processPath);
|
||||
|
||||
menuOptions.Add(new Result
|
||||
if (similarProcesses.Count() > 0)
|
||||
{
|
||||
Title = _context.API.GetTranslation("flowlauncher_plugin_processkiller_kill_instances"),
|
||||
SubTitle = processPath,
|
||||
Action = _ =>
|
||||
menuOptions.Add(new Result
|
||||
{
|
||||
foreach (var p in similarProcesses)
|
||||
Title = _context.API.GetTranslation("flowlauncher_plugin_processkiller_kill_instances"),
|
||||
SubTitle = processPath,
|
||||
Action = _ =>
|
||||
{
|
||||
processHelper.TryKill(p);
|
||||
}
|
||||
foreach (var p in similarProcesses)
|
||||
{
|
||||
processHelper.TryKill(p);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
IcoPath = processPath
|
||||
});
|
||||
return true;
|
||||
},
|
||||
IcoPath = processPath
|
||||
});
|
||||
}
|
||||
|
||||
return menuOptions;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue