2007-03-29 Everaldo Canuto <everaldo@simios.org>
authorEveraldo Canuto <everaldo@mono-cvs.ximian.com>
Thu, 29 Mar 2007 15:14:52 +0000 (15:14 -0000)
committerEveraldo Canuto <everaldo@mono-cvs.ximian.com>
Thu, 29 Mar 2007 15:14:52 +0000 (15:14 -0000)
* XplatUIX11.cs, ThemeWin32Classic.cs, Theme.cs: ShowBalloonWindow method
added to theme, now we can create themes that uses diferent notify engines
like notification-daemon from galago project or growl for Mac OS.

svn path=/trunk/mcs/; revision=75147

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs

index 357fe05df65340981702407d358a3532458c789d..614d3213788c0487ec09c9c3a6f5bb35902225a5 100644 (file)
@@ -1,3 +1,9 @@
+2007-03-29  Everaldo Canuto  <everaldo@simios.org>
+
+       * XplatUIX11.cs, ThemeWin32Classic.cs, Theme.cs: ShowBalloonWindow method
+       added to theme, now we can create themes that uses diferent notify engines
+       like notification-daemon from galago project or growl for Mac OS.
+
 2007-03-28  Everaldo Canuto  <everaldo@simios.org>
 
        * NotifyIcon.cs: Prevent Balloon to show in task bar.
index 398b062c9e0d50a6a1252e9c039a20698a3b204e..b08d929ae93312a65ee95705db94b14b6626adc1 100644 (file)
@@ -914,6 +914,7 @@ namespace System.Windows.Forms
                
                #region BalloonWindow
 #if NET_2_0
+               public abstract void ShowBalloonWindow (IntPtr handle, int timeout, string title, string text, ToolTipIcon icon);
                public abstract void DrawBalloonWindow (Graphics dc, Rectangle clip, NotifyIcon.BalloonWindow control);
                public abstract Rectangle BalloonWindowRect (NotifyIcon.BalloonWindow control);
 #endif
index 501556dcb916438ac3f5636764455b53e7d558fc..33a034c7bf2726a581ed6e7766a8333094e84505 100644 (file)
@@ -4859,6 +4859,27 @@ namespace System.Windows.Forms
 
                #region BalloonWindow
 #if NET_2_0
+               NotifyIcon.BalloonWindow balloon_window;
+               
+               public override void ShowBalloonWindow (IntPtr handle, int timeout, string title, string text, ToolTipIcon icon)
+               {
+                       Control control = Control.FromHandle(handle);
+                       
+                       if (control == null)
+                               return;
+
+                       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 ();
+               }
+
                public override void DrawBalloonWindow (Graphics dc, Rectangle clip, NotifyIcon.BalloonWindow control) 
                {
                        Brush solidbrush = ResPool.GetSolidBrush(this.ColorInfoText);
index d2c4b663302ea2b12b446ea662b3002c587561b9..0c3c42aca87eb807f6bf2ffff10884caf8cdae67 100644 (file)
@@ -5406,26 +5406,9 @@ namespace System.Windows.Forms {
                }
 
 #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);
-                       
-                       if (control == null)
-                               return;
-
-                       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 ();
-                       
+                       ThemeEngine.Current.ShowBalloonWindow (handle, timeout, title, text, icon);
                        SendMessage(handle, Msg.WM_USER, IntPtr.Zero, (IntPtr) Msg.NIN_BALLOONSHOW);    
                }
 #endif