mirror of
https://github.com/greenshot/greenshot
synced 2025-08-23 06:36:20 -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)]
|
[DefaultValue(false)]
|
||||||
bool UsePageLink { get; set; }
|
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")]
|
[Description("Use anonymous access to Imgur")]
|
||||||
[DefaultValue(true)]
|
[DefaultValue(true)]
|
||||||
bool AnonymousAccess { get; set; }
|
bool AnonymousAccess { get; set; }
|
||||||
|
|
|
@ -61,6 +61,8 @@ namespace Greenshot.Addon.Imgur
|
||||||
|
|
||||||
string UsePageLink { get; }
|
string UsePageLink { get; }
|
||||||
|
|
||||||
|
string addImgBBCode { get; }
|
||||||
|
|
||||||
string AnonymousAccess { get; }
|
string AnonymousAccess { get; }
|
||||||
|
|
||||||
string ResetCredentialsButton { get; }
|
string ResetCredentialsButton { get; }
|
||||||
|
|
|
@ -171,7 +171,13 @@ namespace Greenshot.Addon.Imgur
|
||||||
using (var clipboardAccessToken = ClipboardNative.Access())
|
using (var clipboardAccessToken = ClipboardNative.Access())
|
||||||
{
|
{
|
||||||
clipboardAccessToken.ClearContents();
|
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)
|
catch (Exception ex)
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<ContentControl x:Name="FileConfigPartViewModel"/>
|
<ContentControl x:Name="FileConfigPartViewModel"/>
|
||||||
<CheckBox IsChecked="{Binding ImgurConfiguration.AnonymousAccess}" Content="{Binding ImgurLanguage.AnonymousAccess}"/>
|
<CheckBox IsChecked="{Binding ImgurConfiguration.AnonymousAccess}" Content="{Binding ImgurLanguage.AnonymousAccess}"/>
|
||||||
<CheckBox IsChecked="{Binding ImgurConfiguration.UsePageLink}" Content="{Binding ImgurLanguage.UsePageLink}"/>
|
<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 x:Name="ShowHistory" Content="{Binding ImgurLanguage.History}"/>
|
||||||
<Button Content="{Binding ImgurLanguage.ResetCredentialsButton}" x:Name="ResetCredentials" />
|
<Button Content="{Binding ImgurLanguage.ResetCredentialsButton}" x:Name="ResetCredentials" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue