[Monodevelop-patches-list] r425 - in trunk/MonoDevelop: samples/HtmlControl src/AddIns/Misc/StartPage src/Main/Base/Gui/BrowserDisplayBinding src/Main/Base/Gui/Dialogs src/Main/Base/Gui/HtmlControl

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat Jan 10 17:16:04 EST 2004


Author: jluke
Date: 2004-01-10 17:16:04 -0500 (Sat, 10 Jan 2004)
New Revision: 425

Modified:
   trunk/MonoDevelop/samples/HtmlControl/Test.cs
   trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs
   trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
   trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
   trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/HtmlControl.cs
Log:
make HtmlControl : Frame w/ a child
and use it directly in the various places


Modified: trunk/MonoDevelop/samples/HtmlControl/Test.cs
===================================================================
--- trunk/MonoDevelop/samples/HtmlControl/Test.cs	2004-01-10 22:09:50 UTC (rev 424)
+++ trunk/MonoDevelop/samples/HtmlControl/Test.cs	2004-01-10 22:16:04 UTC (rev 425)
@@ -28,30 +28,34 @@
 		Toolbar tbar = new Toolbar ();
 		tbar.ToolbarStyle = ToolbarStyle.Icons;
 		
-		Image back = new Image (Stock.GoBack, IconSize.SmallToolbar);
-		//tbar.AppendItem ("Back", "Go Back", "", back, OnBackClicked);
+		Button back = new Button (Stock.GoBack);
+		back.Clicked += new EventHandler (OnBackClicked);
+		tbar.AppendWidget (back, "Go Back", "");
+
 		Button forward = new Button (Stock.GoForward);
+		forward.Clicked += new EventHandler (OnForwardClicked);
 		tbar.AppendWidget (forward, "Go Forward", "");
+		
 		Button stop = new Button (Stock.Stop);
+		stop.Clicked += new EventHandler (OnStopClicked);
 		tbar.AppendWidget (stop, "Stop", "");
+
 		Button refresh = new Button (Stock.Refresh);
+		refresh.Clicked += new EventHandler (OnRefreshClicked);
 		tbar.AppendWidget (refresh, "Refresh", "");
 		
 		vbox.PackStart (tbar, false, true, 0);
 
-		HBox hbox = new HBox (false, 0);
-
 		url = new Entry ();
 		url.Activated += new EventHandler (OnUrlActivated);
-		hbox.PackStart (url, true, true, 0);		
+		tbar.AppendWidget (url, "Location", "");
 
 		go = new Button (Stock.Ok);
 		go.Clicked += new EventHandler (OnGoClicked);
-		hbox.PackStart (go, false, false, 0);
-		vbox.PackStart (hbox, false, false, 0);
+		tbar.AppendWidget (go, "Go", "");
 
 		html = new HtmlControl ();
-		//html.Title += new EventHandler (OnHtmlTitle);
+		//html.Control.Title += new EventHandler (OnHtmlTitle);
 		// this loads html from a string
 		html.Html = "<html><body>testing</body></html>";
 		
@@ -61,8 +65,8 @@
 		// set the stylesheet
 		html.CascadingStyleSheet = "";
 		
-		html.Show ();
-		vbox.PackStart (html.Control, true, true, 0);
+		html.ShowAll ();
+		vbox.PackStart (html, true, true, 0);
 
 		Statusbar status = new Statusbar ();
 		vbox.PackStart (status, false, true, 0);
@@ -96,4 +100,19 @@
 	{
 		html.GoBack ();
 	}
+	
+	void OnForwardClicked (object o, EventArgs args)
+	{
+		html.GoForward ();
+	}
+
+	void OnStopClicked (object o, EventArgs args)
+	{
+		html.Stop ();
+	}
+
+	void OnRefreshClicked (object o, EventArgs args)
+	{
+		html.Refresh ();
+	}
 }

Modified: trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs	2004-01-10 22:09:50 UTC (rev 424)
+++ trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs	2004-01-10 22:16:04 UTC (rev 425)
@@ -26,7 +26,7 @@
 		// return the panel that contains all of our controls
 		public override Gtk.Widget Control {
 			get {
-				return htmlControl.Control;
+				return htmlControl;
 			}
 		}
 		
@@ -79,8 +79,7 @@
 			                                  "default.css";
 			
 			htmlControl.Html = page.Render(curSection);
-			htmlControl.Control.Show ();
-			htmlControl.DelayedInitialize ();
+			htmlControl.ShowAll ();
 			htmlControl.BeforeNavigate += new BrowserNavigateEventHandler(HtmlControlBeforeNavigate);
 			
 			StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));

Modified: trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs	2004-01-10 22:09:50 UTC (rev 424)
+++ trunk/MonoDevelop/src/Main/Base/Gui/BrowserDisplayBinding/HtmlViewPane.cs	2004-01-10 22:16:04 UTC (rev 425)
@@ -124,23 +124,24 @@
 			
 				toolBar.ToolbarStyle = ToolbarStyle.Icons;
 				toolBar.IconSize = IconSize.SmallToolbar;
-				toolBar.AppendWidget (toolBarBack, "", "");
-				toolBar.AppendWidget (toolBarForward, "", "");
-				toolBar.AppendWidget (toolBarStop, "", "");
-				toolBar.AppendWidget (toolBarRefresh, "", "");
+				toolBar.AppendWidget (toolBarBack, "Go Back", "");
+				toolBar.AppendWidget (toolBarForward, "Go Forward", "");
+				toolBar.AppendWidget (toolBarStop, "Stop Loading", "");
+				toolBar.AppendWidget (toolBarRefresh, "Refresh", "");
+				toolBar.AppendWidget (urlTextBox, "URL", "");
 				
 				topPanel.PackStart (toolBar);
 				
 				urlTextBox.Activated += new EventHandler (OnEntryActivated);
 				
-				topPanel.Add (urlTextBox);
+				//topPanel.Add (urlTextBox);
 				mainbox.PackStart (topPanel, false, false, 2);
 			} 
 			
 			htmlControl = new HtmlControl ();
-			htmlControl.Control.Show ();
+			htmlControl.ShowAll ();
 
-			mainbox.PackStart (htmlControl.Control);
+			mainbox.PackStart (htmlControl);
 			
 			this.Add (mainbox);
 			this.ShowAll ();
@@ -168,7 +169,6 @@
 		{
 			urlTextBox.Text = name;
 			htmlControl.Url = name;
-			htmlControl.Show ();
 		}
 		
 		private void OnBackClicked (object o, EventArgs args)

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs	2004-01-10 22:09:50 UTC (rev 424)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/CommonAboutDialog.cs	2004-01-10 22:16:04 UTC (rev 425)
@@ -1,97 +1,98 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Resources;
-using System.IO;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.Core.Properties;
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Resources;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.Core.Properties;
 using ICSharpCode.Core.Services;
 using ICSharpCode.SharpDevelop.Gui.HtmlControl;
-
using Gdk;
using Gtk;
+using Gdk;
+using Gtk;
 using GtkSharp;
-using Pango;
-
-namespace ICSharpCode.SharpDevelop.Gui.Dialogs
-{
-	public class ScrollBox : DrawingArea
+using Pango;
+
+namespace ICSharpCode.SharpDevelop.Gui.Dialogs
+{
+	public class ScrollBox : DrawingArea
 	{
-		static GLib.GType type;
-		Pixbuf image;
-		string text;
+		static GLib.GType type;
+		Pixbuf image;
+		string text;
 		int scroll = -220;
 		uint hndlr;
 		Pango.Font font;
 		Drawable dr;
-		bool initial = true;
-		
-		public int ScrollY {
-			get {
-				return scroll;
-			}
-			set {
-				scroll = value;
-			}
-		}
-		
-		public Pixbuf Image {
-			get {
-				return image;
-			}
-			set {
-				image = value;
-			}
-		}
-		
-		public string ScrollText {
-			get {
-				return text;
-			}
-			set {
-				text =  value;
-			}
+		bool initial = true;
+		
+		public int ScrollY {
+			get {
+				return scroll;
+			}
+			set {
+				scroll = value;
+			}
 		}
 		
+		public Pixbuf Image {
+			get {
+				return image;
+			}
+			set {
+				image = value;
+			}
+		}
+		
+		public string ScrollText {
+			get {
+				return text;
+			}
+			set {
+				text =  value;
+			}
+		}
+		
 		internal uint Handler
 		{
 			get { return hndlr; }
-		}
+		}
 		
 		static ScrollBox ()
 		{
 			type = RegisterGType (typeof (ScrollBox));
 		}
-		
-		public ScrollBox() : base (type)
+		
+		public ScrollBox() : base (type)
 		{
 			this.RequestSize = new System.Drawing.Size (400, 220);
-			this.ExposeEvent += new ExposeEventHandler (OnExposed);
-			
+			this.ExposeEvent += new ExposeEventHandler (OnExposed);
+			
 			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
-			this.Image = resourceService.GetBitmap ("Icons.AboutImage");
-			
-			text = "\"The most successful method of programming is to begin a program as simply as possible, test it, and then add to the program until it performs the required job.\"\n    -- PDP8 handbook, Pg 9-64\n\n\n";
-			//text = "\"The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every\n appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.\"\n    -- FORTRAN manual for Xerox computers\n\n\n";
-			//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";
+			this.Image = resourceService.GetBitmap ("Icons.AboutImage");
 			
-			Gtk.Function ScrollHandler = new Gtk.Function (ScrollDown);
			hndlr = Timeout.Add (20, ScrollHandler);
-		}
-		
-		bool ScrollDown ()
-		{
+			text = "\"The most successful method of programming is to begin a program as simply as possible, test it, and then add to the program until it performs the required job.\"\n    -- PDP8 handbook, Pg 9-64\n\n\n";
+			//text = "\"The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every\n appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change.\"\n    -- FORTRAN manual for Xerox computers\n\n\n";
+			//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 (20, ScrollHandler);
+		}
+		
+		bool ScrollDown ()
+		{
 			++scroll;
-			// FIXME: only redraw the right side
+			// FIXME: only redraw the right side
 			this.QueueDraw ();
 			//this.QueueDrawArea (200, 0, 200, 220);
-			return true;
+			return true;
 		}
 		
 		private void DrawImage ()
@@ -102,7 +103,7 @@
 				
 				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,42 +119,42 @@
 			layout.SetText (text);
 			dr.DrawLayout (new Gdk.GC (dr), 200, 0 - scroll, layout);
 				
-			if (scroll > 220 ) {
-				scroll = -scroll;
+			if (scroll > 220 ) {
+				scroll = -scroll;
 			}
-		}
-		
-		protected void OnExposed (object o, ExposeEventArgs args)
+		}
+		
+		protected void OnExposed (object o, ExposeEventArgs args)
 		{
 			this.DrawImage ();	
-			this.DrawText ();
-		}
-	}
-	
-	public class CommonAboutDialog : Dialog
+			this.DrawText ();
+		}
+	}
+	
+	public class CommonAboutDialog : Dialog
 	{
-		static GLib.GType type;
+		static GLib.GType type;
 		static FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
 		
 		AuthorAboutTabPage aatp;
 		ChangeLogTabPage changelog;
 		ScrollBox aboutPictureScrollBox;
-		
-		public ScrollBox ScrollBox {
-			get {
-				return (ScrollBox) aboutPictureScrollBox;
-			}
-		}
-		
+		
+		public ScrollBox ScrollBox {
+			get {
+				return (ScrollBox) aboutPictureScrollBox;
+			}
+		}
+		
 		static PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
 		
 		static CommonAboutDialog ()
 		{
 			type = RegisterGType (typeof (CommonAboutDialog));
 		}
-		
-		public CommonAboutDialog() : base (type)
-		{
+		
+		public CommonAboutDialog() : base (type)
+		{
 		}
 		
 		public CommonAboutDialog(string title, Gtk.Window parent, DialogFlags flags) : base (title, parent, flags)
@@ -174,13 +175,13 @@
 			VersionInformationTabPage vinfo = new VersionInformationTabPage ();
 			
 			nb.AppendPage (new AboutSharpDevelopTabPage (), new Label ("About SharpDevelop"));
-			nb.AppendPage (aatp.Control, new Label ("Authors"));
-			nb.AppendPage (changelog.Control, new Label ("ChangeLog"));
+			nb.AppendPage (aatp, new Label ("Authors"));
+			nb.AppendPage (changelog, new Label ("ChangeLog"));
 			nb.AppendPage (vinfo, new Label ("Version Info"));
-			this.VBox.PackStart (nb);		
+			this.VBox.PackStart (nb);
 			Gtk.Button close = new Gtk.Button (Gtk.Stock.Close);
-			close.Clicked += new EventHandler (OnCloseClicked);
-			close.Show ();
+			close.Clicked += new EventHandler (OnCloseClicked);
+			close.Show ();
 			this.ActionArea.Add (close);
 			this.ShowAll ();
 		}
@@ -208,6 +209,6 @@
 			{
 				changelog.DelayedInitialize ();
 			}
-		}
-	}
-}
+		}
+	}
+}

Modified: trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2004-01-10 22:09:50 UTC (rev 424)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Dialogs/SharpDevelopAboutPanels.cs	2004-01-10 22:16:04 UTC (rev 425)
@@ -1,127 +1,127 @@
-// <file>
-//     <copyright see="prj:///doc/copyright.txt"/>
-//     <license see="prj:///doc/license.txt"/>
-//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
-//     <version value="$version"/>
-// </file>
-
-using System;
-using System.Drawing;
-using Gtk;
-
-using System.Resources;
-using System.IO;
-using System.Text;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-using ICSharpCode.SharpDevelop.Gui;
-using ICSharpCode.Core.Properties;
-
-using ICSharpCode.Core.Services;
-
-using ICSharpCode.SharpDevelop.Internal.Project.Collections;
-using ICSharpCode.SharpDevelop.Internal.Project;
-using ICSharpCode.SharpDevelop.Services;
-
-namespace ICSharpCode.SharpDevelop.Gui.Dialogs
-{
-	public class AboutSharpDevelopTabPage : VBox
-	{
-		static GLib.GType type;
-		Label      buildLabel   = new Label ();
-		Label    buildTextBox = new Label ();
-		Label      versionLabel   = new Label ();
-		Label    versionTextBox = new Label ();
-		Label      sponsorLabel   = new Label ();
+// <file>
+//     <copyright see="prj:///doc/copyright.txt"/>
+//     <license see="prj:///doc/license.txt"/>
+//     <owner name="Mike Krüger" email="mike at icsharpcode.net"/>
+//     <version value="$version"/>
+// </file>
+
+using System;
+using System.Drawing;
+using Gtk;
+
+using System.Resources;
+using System.IO;
+using System.Text;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+using ICSharpCode.SharpDevelop.Gui;
+using ICSharpCode.Core.Properties;
+
+using ICSharpCode.Core.Services;
+
+using ICSharpCode.SharpDevelop.Internal.Project.Collections;
+using ICSharpCode.SharpDevelop.Internal.Project;
+using ICSharpCode.SharpDevelop.Services;
+
+namespace ICSharpCode.SharpDevelop.Gui.Dialogs
+{
+	public class AboutSharpDevelopTabPage : VBox
+	{
+		static GLib.GType type;
+		Label      buildLabel   = new Label ();
+		Label    buildTextBox = new Label ();
+		Label      versionLabel   = new Label ();
+		Label    versionTextBox = new Label ();
+		Label      sponsorLabel   = new Label ();
 		
 		static AboutSharpDevelopTabPage ()
 		{
 			type = RegisterGType (typeof (AboutSharpDevelopTabPage));
 		}
-		
-		public AboutSharpDevelopTabPage() : base (type)
+		
+		public AboutSharpDevelopTabPage() : base (type)
 		{
-			HBox hbox = new HBox (false, 0);
-			Version v = Assembly.GetEntryAssembly().GetName().Version;
-			versionTextBox.Text = v.Major + "." + v.Minor;
-			buildTextBox.Text   = v.Revision + "." + v.Build;
-			
-			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
-			versionLabel.Text = resourceService.GetString("Dialog.About.label1Text");
-			
-			//versionLabel.TabIndex = 1;
-			hbox.PackStart (versionLabel, false, false, 10);
-			
-			//versionTextBox.TabIndex = 4;
-			hbox.PackStart (versionTextBox, false, false, 10);
-			
-			buildLabel.Text = resourceService.GetString("Dialog.About.label2Text");
-			//buildLabel.TabIndex = 2;
-			hbox.PackStart (buildLabel, false, false, 10);
+			HBox hbox = new HBox (false, 0);
+			Version v = Assembly.GetEntryAssembly().GetName().Version;
+			versionTextBox.Text = v.Major + "." + v.Minor;
+			buildTextBox.Text   = v.Revision + "." + v.Build;
 			
-			//buildTextBox.TabIndex = 3;
-			hbox.PackStart (buildTextBox, false, false, 10);
+			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
+			versionLabel.Text = resourceService.GetString("Dialog.About.label1Text");
+			
+			//versionLabel.TabIndex = 1;
+			hbox.PackStart (versionLabel, false, false, 10);
+			
+			//versionTextBox.TabIndex = 4;
+			hbox.PackStart (versionTextBox, false, false, 10);
+			
+			buildLabel.Text = resourceService.GetString("Dialog.About.label2Text");
+			//buildLabel.TabIndex = 2;
+			hbox.PackStart (buildLabel, false, false, 10);
+			
+			//buildTextBox.TabIndex = 3;
+			hbox.PackStart (buildTextBox, false, false, 10);
 			this.PackStart (hbox, false, false, 5);
-			
-			sponsorLabel.Text = "Released under the GNU General Public license.\n\n" + 
-				                "Sponsored by AlphaSierraPapa\n" +
-			                    "                   http://www.AlphaSierraPapa.com";
-			//sponsorLabel.TabIndex = 8;
-			this.PackStart (sponsorLabel, false, false, 5);
-			this.ShowAll ();
-		}
-	}
-	
-	public class AuthorAboutTabPage : ICSharpCode.SharpDevelop.Gui.HtmlControl.HtmlControl
-	{
-		public AuthorAboutTabPage()
-		{
-			try {
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
-				PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
-				
-				string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
-				                   System.IO.Path.DirectorySeparatorChar + "doc" +
-				                   System.IO.Path.DirectorySeparatorChar + "AUTHORS.xml",
-				                   
-				                   propertyService.DataDirectory +
-				                   System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" + 
-				                   System.IO.Path.DirectorySeparatorChar + "ShowAuthors.xsl");
-				
-				
-				base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
-				                           "resources" + System.IO.Path.DirectorySeparatorChar +
-				                           "css" + System.IO.Path.DirectorySeparatorChar +
-				                           "SharpDevelopStandard.css";
-				base.Html = html;
-			} catch (Exception e) {
-				IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
-				messageService.ShowError(e);
-			}
-		}
-	}
-	
-	public class ChangeLogTabPage : ICSharpCode.SharpDevelop.Gui.HtmlControl.HtmlControl
-	{
-		public ChangeLogTabPage()
-		{
-			try {
-				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
-				PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
-				
-				string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
-				                   System.IO.Path.DirectorySeparatorChar + "doc" +
-				                   System.IO.Path.DirectorySeparatorChar + "ChangeLog.xml",
-				                   
-				                   propertyService.DataDirectory +
-				                   System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" + 
-				                   System.IO.Path.DirectorySeparatorChar + "ShowChangeLog.xsl");
-				
-				base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
-				                           "resources" + System.IO.Path.DirectorySeparatorChar +
-				                           "css" + System.IO.Path.DirectorySeparatorChar +
-				                           "SharpDevelopStandard.css";
+			
+			sponsorLabel.Text = "Released under the GNU General Public license.\n\n" + 
+				                "Sponsored by AlphaSierraPapa\n" +
+			                    "                   http://www.AlphaSierraPapa.com";
+			//sponsorLabel.TabIndex = 8;
+			this.PackStart (sponsorLabel, false, false, 5);
+			this.ShowAll ();
+		}
+	}
+	
+	public class AuthorAboutTabPage : ICSharpCode.SharpDevelop.Gui.HtmlControl.HtmlControl
+	{
+		public AuthorAboutTabPage()
+		{
+			try {
+				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+				PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+				
+				string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
+				                   System.IO.Path.DirectorySeparatorChar + "doc" +
+				                   System.IO.Path.DirectorySeparatorChar + "AUTHORS.xml",
+				                   
+				                   propertyService.DataDirectory +
+				                   System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" + 
+				                   System.IO.Path.DirectorySeparatorChar + "ShowAuthors.xsl");
+				
+				
+				base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
+				                           "resources" + System.IO.Path.DirectorySeparatorChar +
+				                           "css" + System.IO.Path.DirectorySeparatorChar +
+				                           "SharpDevelopStandard.css";
+				base.Html = html;
+			} catch (Exception e) {
+				IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
+				messageService.ShowError(e);
+			}
+		}
+	}
+	
+	public class ChangeLogTabPage : ICSharpCode.SharpDevelop.Gui.HtmlControl.HtmlControl
+	{
+		public ChangeLogTabPage()
+		{
+			try {
+				FileUtilityService fileUtilityService = (FileUtilityService)ServiceManager.Services.GetService(typeof(FileUtilityService));
+				PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
+				
+				string html = ConvertXml.ConvertToString(fileUtilityService.SharpDevelopRootPath +
+				                   System.IO.Path.DirectorySeparatorChar + "doc" +
+				                   System.IO.Path.DirectorySeparatorChar + "ChangeLog.xml",
+				                   
+				                   propertyService.DataDirectory +
+				                   System.IO.Path.DirectorySeparatorChar + "ConversionStyleSheets" + 
+				                   System.IO.Path.DirectorySeparatorChar + "ShowChangeLog.xsl");
+				
+				base.CascadingStyleSheet = propertyService.DataDirectory + System.IO.Path.DirectorySeparatorChar +
+				                           "resources" + System.IO.Path.DirectorySeparatorChar +
+				                           "css" + System.IO.Path.DirectorySeparatorChar +
+				                           "SharpDevelopStandard.css";
 				//base.Html = html;
 				
 				// feel free to add your name and email here
@@ -138,28 +138,28 @@
 				+ "<li>nricciar</li>"
 				+ "<li>jba</li>"
 				+ "</ul></body></html>";
-				
-			} catch (Exception e) {
-				IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
-				messageService.ShowError(e);
-			}
-		}
-	}
-	
-	
-	public class VersionInformationTabPage : VBox
+				
+			} catch (Exception e) {
+				IMessageService messageService = (IMessageService)ServiceManager.Services.GetService(typeof(IMessageService));
+				messageService.ShowError(e);
+			}
+		}
+	}
+	
+	
+	public class VersionInformationTabPage : VBox
 	{
-		private static GLib.GType type;
-		private TreeView listView;
+		private static GLib.GType type;
+		private TreeView listView;
 		private Button button;
 		private TreeStore store;
 		
 		static VersionInformationTabPage ()
 		{
 			type = RegisterGType (typeof (VersionInformationTabPage));
-		}
-
-		public VersionInformationTabPage() : base (type)
+		}
+
+		public VersionInformationTabPage() : base (type)
 		{
 			ResourceService resourceService = (ResourceService)ServiceManager.Services.GetService(typeof(IResourceService));
 			
@@ -168,7 +168,7 @@
 			listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.NameColumn"), new CellRendererText (), "text", 0);
 			listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.VersionColumn"), new CellRendererText (), "text", 1);
 			listView.AppendColumn (resourceService.GetString("Dialog.About.VersionInfoTabName.PathColumn"), new CellRendererText (), "text", 2);
-			
+			
 			FillListView ();
 			ScrolledWindow sw = new ScrolledWindow ();
 			sw.Add (listView);
@@ -182,49 +182,49 @@
 			hbox.PackStart (new Label (), false, true, 3);
 			this.PackStart (hbox, false, false, 6);
 			
-			listView.Model = store;
-		}
-		
-		void FillListView()
+			listView.Model = store;
+		}
+		
+		void FillListView()
 		{
 			store = new TreeStore (typeof (string), typeof (string), typeof (string));
-			
-			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
-				AssemblyName name = asm.GetName();
-				
+			
+			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
+				AssemblyName name = asm.GetName();
+				
 				string loc;
-				
-				try {
-					loc = asm.Location;
-				} catch (Exception) {
-					loc = "dynamic";
+				
+				try {
+					loc = asm.Location;
+				} catch (Exception) {
+					loc = "dynamic";
 				}
 				
-				store.AppendValues (name.Name, name.Version.ToString(), loc);
+				store.AppendValues (name.Name, name.Version.ToString(), loc);
 			}
 			
-			store.SetSortColumnId (0, SortType.Ascending);
-		}
-		
-		void CopyButtonClick(object o, EventArgs args)
-		{
-			StringBuilder versionInfo = new StringBuilder();
-			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
-				AssemblyName name = asm.GetName();
-				versionInfo.Append(name.Name);
-				versionInfo.Append(",");
-				versionInfo.Append(name.Version.ToString());
-				versionInfo.Append(",");
-				try {
-					versionInfo.Append(asm.Location);
-				} catch (Exception) {
-					versionInfo.Append("dynamic");
-				}
-				
-				versionInfo.Append(Environment.NewLine);
-			}
-			
-			//Clipboard.SetDataObject(new DataObject(System.Windows.Forms.DataFormats.Text, versionInfo.ToString()), true);
-		}
-	}
-}
+			store.SetSortColumnId (0, SortType.Ascending);
+		}
+		
+		void CopyButtonClick(object o, EventArgs args)
+		{
+			StringBuilder versionInfo = new StringBuilder();
+			foreach (Assembly asm in AppDomain.CurrentDomain.GetAssemblies()) {
+				AssemblyName name = asm.GetName();
+				versionInfo.Append(name.Name);
+				versionInfo.Append(",");
+				versionInfo.Append(name.Version.ToString());
+				versionInfo.Append(",");
+				try {
+					versionInfo.Append(asm.Location);
+				} catch (Exception) {
+					versionInfo.Append("dynamic");
+				}
+				
+				versionInfo.Append(Environment.NewLine);
+			}
+			
+			//Clipboard.SetDataObject(new DataObject(System.Windows.Forms.DataFormats.Text, versionInfo.ToString()), true);
+		}
+	}
+}

Modified: trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/HtmlControl.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/HtmlControl.cs	2004-01-10 22:09:50 UTC (rev 424)
+++ trunk/MonoDevelop/src/Main/Base/Gui/HtmlControl/HtmlControl.cs	2004-01-10 22:16:04 UTC (rev 425)
@@ -4,7 +4,7 @@
 
 namespace ICSharpCode.SharpDevelop.Gui.HtmlControl
 {
-	public class HtmlControl : Bin, IWebBrowserEvents
+	public class HtmlControl : Frame, IWebBrowserEvents
 	{
 		private static GLib.GType type;
 				
@@ -69,9 +69,10 @@
 			}
 			set {
 				this.url = value;
-				Console.WriteLine ("setting html url");
 				if (control_type == ControlType.GtkMozilla)
+				{
 					((MozillaControl) control).LoadUrl (value);
+				}
 				else
 					Console.WriteLine ("unable to load url");
 			}
@@ -83,8 +84,7 @@
 			}
 			set {
 				this.html = value;
-				Console.WriteLine ("setting html content");
-				ApplyBody(html);
+				//ApplyBody(html);
 			}
 		}
 		
@@ -113,9 +113,9 @@
 					break;
 				case ControlType.GtkMozilla:
 					this.control = new MozillaControl ();
-					//Console.WriteLine ("new MozillaControl");
 					((MozillaControl) this.control).Show ();
-					//this.Add ((MozillaControl) this.control);
+					this.Add ((MozillaControl) this.control);
+					Console.WriteLine ("added MozillaControl to HtmlControl");
 					break;
 				default:
 					throw new NotImplementedException (control_type.ToString ());
@@ -154,6 +154,8 @@
 			initialized = true;
 			if (html.Length > 0) {
 				ApplyBody(html);
+			} else {
+				Console.WriteLine ("no html to apply");
 			}
 			UIActivate();
 			ApplyCascadingStyleSheet();
@@ -170,7 +172,10 @@
 				if (control != null) {
 					if (control_type == ControlType.GtkMozilla)
 					{
+						Console.WriteLine ("rendering");
+						((MozillaControl) control).Show ();
 						((MozillaControl) control).RenderData (val, "file://", "text/html");
+						Console.WriteLine ("rendered");
 						return;
 					}
 					else
@@ -199,7 +204,11 @@
 				{
 					Console.WriteLine ("control is null");
 				}
-			} catch {}
+			}
+			catch (Exception e)
+			{
+				Console.WriteLine (e.ToString ());
+			} 
 		}
 		
 		void ApplyCascadingStyleSheet()




More information about the Monodevelop-patches-list mailing list