Added title in Imgur upload as optional to the configuration

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2510 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-27 17:19:52 +00:00
parent 565bf262db
commit 2c1a56e868
2 changed files with 6 additions and 2 deletions

View file

@ -47,6 +47,10 @@ namespace GreenshotImgurPlugin {
public string ImgurToken;
[IniProperty("ImgurTokenSecret", Description = "The Imgur token secret", Encrypted=true, ExcludeIfNull=true)]
public string ImgurTokenSecret;
[IniProperty("AddTitle", Description = "Is the title passed on to Imgur", DefaultValue = "True")]
public bool AddTitle;
[IniProperty("AddFilename", Description = "Is the filename passed on to Imgur", DefaultValue = "True")]
public bool AddFilename;
[IniProperty("ImgurUploadHistory", Description="Imgur upload history (ImgurUploadHistory.hash=deleteHash)")]
public Dictionary<string, string> ImgurUploadHistory;

View file

@ -103,11 +103,11 @@ namespace GreenshotImgurPlugin {
IDictionary<string, object> uploadParameters = new Dictionary<string, object>();
IDictionary<string, object> otherParameters = new Dictionary<string, object>();
// add title
if (title != null) {
if (title != null && config.AddTitle) {
otherParameters.Add("title", title);
}
// add filename
if (filename != null) {
if (filename != null && config.AddFilename) {
otherParameters.Add("name", filename);
}
string responseString = null;