[Monodevelop-patches-list] r469 - in trunk/MonoDevelop: . src/Main/Base/Gui/Dialogs

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 11 23:38:45 EST 2004


Author: jluke
Date: 2004-01-11 23:38:45 -0500 (Sun, 11 Jan 2004)
New Revision: 469

Modified:
   trunk/MonoDevelop/RELEASE_REQUIREMENTS
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
Log:
only allocat GC on Realized event


Modified: trunk/MonoDevelop/RELEASE_REQUIREMENTS
===================================================================
--- trunk/MonoDevelop/RELEASE_REQUIREMENTS	2004-01-12 03:53:25 UTC (rev 468)
+++ trunk/MonoDevelop/RELEASE_REQUIREMENTS	2004-01-12 04:38:45 UTC (rev 469)
@@ -10,7 +10,7 @@
 ~ Figure out why the code completion works on unsaved files to a point, and
   what exactly #D does with unsaved files (need someone with windows to play
   around)
-~ Fix HtmlControl cause its busted
+~ Finish HtmlControl
 ~ Why the hell is new file showing up as Ctrl+O?!?
 ~ Revert back to the old popup mechanism (immediate) and have an option
   'autopopup on/off' to control if it comes up or requires a ctrl+space to popup

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs	2004-01-12 03:53:25 UTC (rev 468)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs	2004-01-12 04:38:45 UTC (rev 469)
@@ -32,6 +32,7 @@
 		Pango.Font font;
 		Drawable dr;
 		bool initial = true;
+		Gdk.GC gc;
 		
 		public int ScrollY {
 			get {
@@ -73,6 +74,7 @@
 		public ScrollBox() : base (type)
 		{
 			this.RequestSize = new System.Drawing.Size (400, 220);
+			this.Realized += new EventHandler (OnRealized);
 			this.ExposeEvent += new ExposeEventHandler (OnExposed);
 			
 			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
@@ -83,6 +85,7 @@
 			//text = "\"No proper program contains an indication which as an operator-applied occurrence identifies an operator-defining occurrence which as an indication-applied occurrence identifies an indication-defining occurrence different from the one identified by the given indication as an indication- applied occurrence.\"\n   -- ALGOL 68 Report\n\n\n";
 			//text = "\"The '#pragma' command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, `#pragma' first attempts to run the game rogue; if that fails, it tries to run the game hack; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue.\"\n   --From an old GNU C Preprocessor document";
 			
+			
 			Gtk.Function ScrollHandler = new Gtk.Function (ScrollDown);
 			hndlr = Timeout.Add (30, ScrollHandler);
 		}
@@ -99,12 +102,8 @@
 		private void DrawImage ()
 		{
 			if (image != null) {
-				int xoff;
-				int yoff;
+				dr.DrawPixbuf (gc, Image, 0, 0, 0, 0, -1, -1, RgbDither.Normal,  0,  0);
 				
-				this.GdkWindow.GetInternalPaintInfo (out dr, out xoff, out yoff);
-				dr.DrawPixbuf (new Gdk.GC (dr), Image, 0, 0, 0, 0, -1, -1, RgbDither.Normal,  0,  0);
-				
 			}
 		}
 		
@@ -118,7 +117,7 @@
 			FontDescription fd = FontDescription.FromString ("Tahoma 10");
 			layout.FontDescription = fd;
 			layout.SetText (text);
-			dr.DrawLayout (new Gdk.GC (dr), 200, 0 - scroll, layout);
+			dr.DrawLayout (gc, 200, 0 - scroll, layout);
 				
 			if (scroll > 220 ) {
 				scroll = -scroll;
@@ -130,6 +129,14 @@
 			this.DrawImage ();	
 			this.DrawText ();
 		}
+
+		protected void OnRealized (object o, EventArgs args)
+		{
+			int xoff;
+			int yoff;
+			this.GdkWindow.GetInternalPaintInfo (out dr, out xoff, out yoff);
+			gc = new Gdk.GC (dr);	
+		}
 	}
 	
 	public class CommonAboutDialog : Dialog




More information about the Monodevelop-patches-list mailing list