mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -07:00
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:
parent
ecb1b91ae7
commit
19fb98ae55
71 changed files with 4037 additions and 3542 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue