mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Optional Inprivate argument & Comment
This commit is contained in:
parent
581e84228c
commit
dbab7b6ab3
2 changed files with 10 additions and 6 deletions
|
|
@ -213,6 +213,9 @@ namespace Flow.Launcher.Plugin
|
|||
/// <param name="FileName">Extra FileName Info</param>
|
||||
public void OpenDirectory(string DirectoryPath, string FileName = null);
|
||||
|
||||
public void OpenUrl(string url);
|
||||
/// <summary>
|
||||
/// Open Url in the configured default browser for Flow's Settings.
|
||||
/// </summary>
|
||||
public void OpenUrl(string url, bool? inPrivate = null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ namespace Flow.Launcher
|
|||
var startInfo = ShellCommand.SetProcessStartInfo(filename, arguments: args, createNoWindow: true);
|
||||
ShellCommand.Execute(startInfo);
|
||||
}
|
||||
|
||||
|
||||
public void CopyToClipboard(string text)
|
||||
{
|
||||
Clipboard.SetDataObject(text);
|
||||
|
|
@ -209,7 +209,7 @@ namespace Flow.Launcher
|
|||
explorer.Start();
|
||||
}
|
||||
|
||||
public void OpenUrl(string url)
|
||||
public void OpenUrl(string url, bool? inPrivate = null)
|
||||
{
|
||||
var browserInfo = _settingsVM.Settings.CustomBrowser;
|
||||
|
||||
|
|
@ -217,10 +217,11 @@ namespace Flow.Launcher
|
|||
|
||||
if (browserInfo.OpenInTab)
|
||||
{
|
||||
url.OpenInBrowserTab(path, browserInfo.EnablePrivate, browserInfo.PrivateArg);
|
||||
}else
|
||||
url.OpenInBrowserTab(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg);
|
||||
}
|
||||
else
|
||||
{
|
||||
url.OpenInBrowserWindow(path, browserInfo.EnablePrivate, browserInfo.PrivateArg);
|
||||
url.OpenInBrowserWindow(path, inPrivate ?? browserInfo.EnablePrivate, browserInfo.PrivateArg);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue