Fixing the balloon & capture problem. By hiding and showing the tray-icon the Greenshot balloon disappears! A cleaner way would be to check if a balloon is still shown (close event didn't occur) but for now this should do.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1907 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-06-01 05:57:57 +00:00
commit d44ae4f713

View file

@ -156,6 +156,12 @@ namespace Greenshot.Helpers {
/// Make Capture with specified destinations
/// </summary>
private void MakeCapture() {
// This fixes a problem when a balloon is still visible and a capture needs to be taken
// forcefully removes the balloon!
if (!conf.HideTrayicon) {
MainForm.instance.notifyIcon.Visible = false;
MainForm.instance.notifyIcon.Visible = true;
}
LOG.Debug(String.Format("Capturing with mode {0} and using Cursor {1}", captureMode, captureMouseCursor));
capture.CaptureDetails.CaptureMode = captureMode;
@ -463,7 +469,7 @@ namespace Greenshot.Helpers {
surface.Modified = !outputMade;
// Register notify events if this is wanted
if (conf.ShowTrayNotification) {
if (conf.ShowTrayNotification && !conf.HideTrayicon) {
surface.SurfaceMessage += delegate(object source, SurfaceMessageEventArgs eventArgs) {
if (string.IsNullOrEmpty(eventArgs.Message)) {
return;