Author: everaldo
Date: 2007-03-29 08:42:38 -0500 (Thu, 29 Mar 2007)
New Revision: 75140

Modified:
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
Log:
        * XplatUIX11-new.cs: Prevent system to open more than one balloon.

2007-03-29  Everaldo Canuto  <[EMAIL PROTECTED]>



Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
    2007-03-29 13:41:26 UTC (rev 75139)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/ChangeLog
    2007-03-29 13:42:38 UTC (rev 75140)
@@ -1,5 +1,9 @@
 2007-03-29  Everaldo Canuto  <[EMAIL PROTECTED]>
 
+       * XplatUIX11-new.cs: Prevent system to open more than one balloon.
+
+2007-03-29  Everaldo Canuto  <[EMAIL PROTECTED]>
+
        * XplatUIX11-new.cs: Implement SystrayBalloon for X11 systems. 
 
 2007-03-20  Everaldo Canuto  <[EMAIL PROTECTED]>

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
    2007-03-29 13:41:26 UTC (rev 75139)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.X11Internal/XplatUIX11-new.cs
    2007-03-29 13:42:38 UTC (rev 75140)
@@ -1013,6 +1013,8 @@
                }
 
 #if NET_2_0
+               NotifyIcon.BalloonWindow balloon_window;
+
                internal override void SystrayBalloon(IntPtr handle, int 
timeout, string title, string text, ToolTipIcon icon)
                {
                        Control control = Control.FromHandle(handle);
@@ -1020,11 +1022,16 @@
                        if (control == null)
                                return;
 
-                       NotifyIcon.BalloonWindow form = new 
NotifyIcon.BalloonWindow (handle);
-                       form.Title = title;
-                       form.Text = text;
-                       form.Timeout = timeout;
-                       form.Show ();
+                       if (balloon_window != null) {
+                               balloon_window.Close ();
+                               balloon_window.Dispose ();
+                       }
+
+                       balloon_window = new NotifyIcon.BalloonWindow (handle);
+                       balloon_window.Title = title;
+                       balloon_window.Text = text;
+                       balloon_window.Timeout = timeout;
+                       balloon_window.Show ();
                        
                        SendMessage(handle, Msg.WM_USER, IntPtr.Zero, (IntPtr) 
Msg.NIN_BALLOONSHOW);    
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to