Get rid of embedded browser (#255)

This change makes it possible to use Box, DropBox and Imgur with the default browser, instead of the embedded which causes many issues. Other plugins need to follow.
This commit is contained in:
Robin Krom 2021-03-27 00:11:06 +01:00 committed by GitHub
commit 19fb98ae55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 4037 additions and 3542 deletions

View file

@ -266,33 +266,6 @@ namespace GreenshotPlugin.Core
}
}
/// <summary>
/// Retrieve all windows with a certain title or classname
/// </summary>
/// <param name="windows">IEnumerable</param>
/// <param name="titlePattern">The regexp to look for in the title</param>
/// <param name="classnamePattern">The regexp to look for in the classname</param>
/// <returns>IEnumerable WindowDetails with all the found windows</returns>
private static IEnumerable<WindowDetails> FindWindow(IEnumerable<WindowDetails> windows, string titlePattern, string classnamePattern) {
Regex titleRegexp = null;
Regex classnameRegexp = null;
if (titlePattern != null && titlePattern.Trim().Length > 0) {
titleRegexp = new Regex(titlePattern);
}
if (classnamePattern != null && classnamePattern.Trim().Length > 0) {
classnameRegexp = new Regex(classnamePattern);
}
foreach(WindowDetails window in windows) {
if (titleRegexp != null && titleRegexp.IsMatch(window.Text)) {
yield return window;
} else if (classnameRegexp != null && classnameRegexp.IsMatch(window.ClassName)) {
yield return window;
}
}
}
/// <summary>
/// Retrieve the child with matching classname
/// </summary>