mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
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:
parent
565bf262db
commit
2c1a56e868
2 changed files with 6 additions and 2 deletions
|
@ -47,6 +47,10 @@ namespace GreenshotImgurPlugin {
|
||||||
public string ImgurToken;
|
public string ImgurToken;
|
||||||
[IniProperty("ImgurTokenSecret", Description = "The Imgur token secret", Encrypted=true, ExcludeIfNull=true)]
|
[IniProperty("ImgurTokenSecret", Description = "The Imgur token secret", Encrypted=true, ExcludeIfNull=true)]
|
||||||
public string ImgurTokenSecret;
|
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)")]
|
[IniProperty("ImgurUploadHistory", Description="Imgur upload history (ImgurUploadHistory.hash=deleteHash)")]
|
||||||
public Dictionary<string, string> ImgurUploadHistory;
|
public Dictionary<string, string> ImgurUploadHistory;
|
||||||
|
|
|
@ -103,11 +103,11 @@ namespace GreenshotImgurPlugin {
|
||||||
IDictionary<string, object> uploadParameters = new Dictionary<string, object>();
|
IDictionary<string, object> uploadParameters = new Dictionary<string, object>();
|
||||||
IDictionary<string, object> otherParameters = new Dictionary<string, object>();
|
IDictionary<string, object> otherParameters = new Dictionary<string, object>();
|
||||||
// add title
|
// add title
|
||||||
if (title != null) {
|
if (title != null && config.AddTitle) {
|
||||||
otherParameters.Add("title", title);
|
otherParameters.Add("title", title);
|
||||||
}
|
}
|
||||||
// add filename
|
// add filename
|
||||||
if (filename != null) {
|
if (filename != null && config.AddFilename) {
|
||||||
otherParameters.Add("name", filename);
|
otherParameters.Add("name", filename);
|
||||||
}
|
}
|
||||||
string responseString = null;
|
string responseString = null;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue