Refactored the "thumbnail" preview code to ThumbnailForm.cs, this removes some complexity from the MainForm. Also fixed an Imgur issue, which I noticed as they currently have maintenance. And I added a missing key to the language-en-US.xml

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1909 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-06-08 10:36:07 +00:00
commit e274a08a1e
7 changed files with 143 additions and 100 deletions

View file

@ -156,8 +156,12 @@ namespace GreenshotImgurPlugin {
}
public static void RetrieveImgurThumbnail(ImgurInfo imgurInfo) {
LOG.InfoFormat("Retrieving Imgur image for {0} with url {1}", imgurInfo.Hash, imgurInfo);
HttpWebRequest webRequest = (HttpWebRequest)NetworkHelper.CreateWebRequest(imgurInfo.SmallSquare);
if (imgurInfo.SmallSquare == null) {
LOG.Warn("Imgur URL was null, not retrieving thumbnail.");
return;
}
LOG.InfoFormat("Retrieving Imgur image for {0} with url {1}", imgurInfo.Hash, imgurInfo);
HttpWebRequest webRequest = (HttpWebRequest)NetworkHelper.CreateWebRequest(imgurInfo.SmallSquare);
webRequest.Method = "GET";
webRequest.ServicePoint.Expect100Continue = false;