mirror of
https://github.com/greenshot/greenshot
synced 2025-08-22 22:34:27 -07:00
Merge 560f4cbfa3
into b42514002e
This commit is contained in:
commit
adeb0b9e7e
4 changed files with 14 additions and 1 deletions
|
@ -55,6 +55,10 @@ namespace Greenshot.Addon.Imgur
|
|||
[DefaultValue(false)]
|
||||
bool UsePageLink { get; set; }
|
||||
|
||||
[Description("Add [img] BBCode tag to the link on the clipboard")]
|
||||
[DefaultValue(false)]
|
||||
bool addImgBBCode { get; set; }
|
||||
|
||||
[Description("Use anonymous access to Imgur")]
|
||||
[DefaultValue(true)]
|
||||
bool AnonymousAccess { get; set; }
|
||||
|
|
|
@ -61,6 +61,8 @@ namespace Greenshot.Addon.Imgur
|
|||
|
||||
string UsePageLink { get; }
|
||||
|
||||
string addImgBBCode { get; }
|
||||
|
||||
string AnonymousAccess { get; }
|
||||
|
||||
string ResetCredentialsButton { get; }
|
||||
|
|
|
@ -171,7 +171,13 @@ namespace Greenshot.Addon.Imgur
|
|||
using (var clipboardAccessToken = ClipboardNative.Access())
|
||||
{
|
||||
clipboardAccessToken.ClearContents();
|
||||
clipboardAccessToken.SetAsUrl(uploadUrl.AbsoluteUri);
|
||||
|
||||
// EDIT
|
||||
if (_imgurConfiguration.addImgBBCode && !_imgurConfiguration.UsePageLink) {
|
||||
clipboardAccessToken.SetAsUnicodeString("[img]" + uploadUrl.AbsoluteUri + "[/img]");
|
||||
} else {
|
||||
clipboardAccessToken.SetAsUrl(uploadUrl.AbsoluteUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<ContentControl x:Name="FileConfigPartViewModel"/>
|
||||
<CheckBox IsChecked="{Binding ImgurConfiguration.AnonymousAccess}" Content="{Binding ImgurLanguage.AnonymousAccess}"/>
|
||||
<CheckBox IsChecked="{Binding ImgurConfiguration.UsePageLink}" Content="{Binding ImgurLanguage.UsePageLink}"/>
|
||||
<CheckBox IsChecked="{Binding ImgurConfiguration.addImgBBCode}" Content="{Binding ImgurLanguage.addImgBBCode}"/>
|
||||
<Button x:Name="ShowHistory" Content="{Binding ImgurLanguage.History}"/>
|
||||
<Button Content="{Binding ImgurLanguage.ResetCredentialsButton}" x:Name="ResetCredentials" />
|
||||
</StackPanel>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue