mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Added some support for opening the url when an upload is made from a Destination (currently Jira & Picasa) and the tooltip is clicked.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1797 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
05f9fb930e
commit
9bf5e44c94
12 changed files with 169 additions and 135 deletions
|
@ -438,6 +438,7 @@ namespace Greenshot.Helpers {
|
|||
MainForm.instance.notifyIcon.ShowBalloonTip(10000, "Greenshot", eventArgs.Message, ToolTipIcon.Info);
|
||||
break;
|
||||
case SurfaceMessageTyp.FileSaved:
|
||||
case SurfaceMessageTyp.UploadedUrl:
|
||||
EventHandler balloonTipClickedHandler = null;
|
||||
EventHandler balloonTipClosedHandler = null;
|
||||
balloonTipClosedHandler = delegate(object sender, EventArgs e) {
|
||||
|
@ -447,13 +448,19 @@ namespace Greenshot.Helpers {
|
|||
};
|
||||
|
||||
balloonTipClickedHandler = delegate(object sender, EventArgs e) {
|
||||
if (surface.LastSaveFullPath != null) {
|
||||
ProcessStartInfo psi = new ProcessStartInfo("explorer");
|
||||
psi.Arguments = Path.GetDirectoryName(eventArgs.Surface.LastSaveFullPath);
|
||||
psi.UseShellExecute = false;
|
||||
Process p = new Process();
|
||||
p.StartInfo = psi;
|
||||
p.Start();
|
||||
if (eventArgs.MessageType == SurfaceMessageTyp.FileSaved) {
|
||||
if (!string.IsNullOrEmpty(surface.LastSaveFullPath)) {
|
||||
ProcessStartInfo psi = new ProcessStartInfo("explorer");
|
||||
psi.Arguments = Path.GetDirectoryName(surface.LastSaveFullPath);
|
||||
psi.UseShellExecute = false;
|
||||
Process p = new Process();
|
||||
p.StartInfo = psi;
|
||||
p.Start();
|
||||
}
|
||||
} else {
|
||||
if (!string.IsNullOrEmpty(surface.UploadURL)) {
|
||||
System.Diagnostics.Process.Start(surface.UploadURL);
|
||||
}
|
||||
}
|
||||
LOG.DebugFormat("Deregistering the BalloonTipClicked");
|
||||
MainForm.instance.notifyIcon.BalloonTipClicked -= balloonTipClickedHandler;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue