mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Added tool-tip click support for imgur
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1801 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ca14e8365c
commit
3bbbc49c5e
2 changed files with 7 additions and 3 deletions
|
@ -64,9 +64,11 @@ namespace GreenshotImgurPlugin {
|
|||
|
||||
public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||
using (Image image = surface.GetImageForExport()) {
|
||||
bool uploaded = plugin.Upload(captureDetails, image);
|
||||
string uploadURL = null;
|
||||
bool uploaded = plugin.Upload(captureDetails, image, out uploadURL);
|
||||
if (uploaded) {
|
||||
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString("imgur", "exported_to", Description));
|
||||
surface.UploadURL = uploadURL;
|
||||
surface.SendMessageEvent(this, SurfaceMessageTyp.UploadedUrl, Language.GetFormattedString("exported_to", Designation));
|
||||
surface.Modified = false;
|
||||
}
|
||||
return uploaded;
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace GreenshotImgurPlugin {
|
|||
Shutdown();
|
||||
}
|
||||
|
||||
public bool Upload(ICaptureDetails captureDetails, Image image) {
|
||||
public bool Upload(ICaptureDetails captureDetails, Image image, out string uploadURL) {
|
||||
using (MemoryStream stream = new MemoryStream()) {
|
||||
BackgroundForm backgroundForm = BackgroundForm.ShowAndWait(Attributes.Name, Language.GetString("imgur", LangKey.communication_wait));
|
||||
|
||||
|
@ -143,6 +143,7 @@ namespace GreenshotImgurPlugin {
|
|||
CheckHistory();
|
||||
imgurInfo.Image = ImageHelper.CreateThumbnail(image, 90, 90);
|
||||
IniConfig.Save();
|
||||
uploadURL = imgurInfo.Page;
|
||||
try {
|
||||
if (config.UsePageLink) {
|
||||
Clipboard.SetText(imgurInfo.Page);
|
||||
|
@ -159,6 +160,7 @@ namespace GreenshotImgurPlugin {
|
|||
backgroundForm.CloseDialog();
|
||||
}
|
||||
}
|
||||
uploadURL = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue