[Monodevelop-patches-list] r535 - trunk/MonoDevelop/src/AddIns/Misc/StartPage

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 18 01:21:16 EST 2004


Author: jluke
Date: 2004-01-18 01:21:16 -0500 (Sun, 18 Jan 2004)
New Revision: 535

Modified:
   trunk/MonoDevelop/src/AddIns/Misc/StartPage/Main.cs
   trunk/MonoDevelop/src/AddIns/Misc/StartPage/Makefile
   trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs
Log:
connect OpenUri event
disable until links etc work


Modified: trunk/MonoDevelop/src/AddIns/Misc/StartPage/Main.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/StartPage/Main.cs	2004-01-18 06:04:12 UTC (rev 534)
+++ trunk/MonoDevelop/src/AddIns/Misc/StartPage/Main.cs	2004-01-18 06:21:16 UTC (rev 535)
@@ -19,9 +19,9 @@
 				}
 			}
 			//if (SharpDevelopMain.CommandLineArgs != null) {
-				StartPageView spv = new StartPageView ();
-				WorkbenchSingleton.Workbench.ShowView(spv);
-				spv.DelayedInitialize ();
+				//StartPageView spv = new StartPageView ();
+				//WorkbenchSingleton.Workbench.ShowView(spv);
+				//spv.DelayedInitialize ();
 				
 			//}
 		}

Modified: trunk/MonoDevelop/src/AddIns/Misc/StartPage/Makefile
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/StartPage/Makefile	2004-01-18 06:04:12 UTC (rev 534)
+++ trunk/MonoDevelop/src/AddIns/Misc/StartPage/Makefile	2004-01-18 06:21:16 UTC (rev 535)
@@ -12,5 +12,5 @@
 	mcs /debug /out:$(DLL) /target:library /r:System.Drawing.dll \
 		/r:../../../../build/bin/ICSharpCode.Core.dll \
 		/r:../../../../build/bin/SharpDevelop.Base.dll \
-		/r:gtk-sharp.dll \
+		/r:gtk-sharp.dll /r:gtkmozembed-sharp.dll \
 		$(SOURCES)

Modified: trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs	2004-01-18 06:04:12 UTC (rev 534)
+++ trunk/MonoDevelop/src/AddIns/Misc/StartPage/StartPage.cs	2004-01-18 06:21:16 UTC (rev 535)
@@ -13,6 +13,8 @@
 using ICSharpCode.SharpDevelop.Gui.HtmlControl;
 using ICSharpCode.Core.Services;
 
+using GtkMozEmbedSharp;
+
 namespace ICSharpCode.StartPage 
 {
 	/// <summary>
@@ -80,7 +82,7 @@
 			
 			htmlControl.Html = page.Render(curSection);
 			htmlControl.ShowAll ();
-			//htmlControl.BeforeNavigate += new BrowserNavigateEventHandler(HtmlControlBeforeNavigate);
+			htmlControl.OpenUri += new OpenUriHandler (HtmlControlBeforeNavigate);
 			
 			StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));
 			// Description of the tab shown in #develop
@@ -100,10 +102,10 @@
 			WorkbenchWindow.CloseWindow(true);
 		}
 		
-		void HtmlControlBeforeNavigate(object sender, BrowserNavigateEventArgs e)
+		void HtmlControlBeforeNavigate(object sender, OpenUriArgs e)
 		{
-			e.Cancel = true;
-			if (e.Url.StartsWith("project://")) {
+			e.RetVal = true;
+			if (e.AURI.StartsWith("project://")) {
 				try {
 					Core.Properties.DefaultProperties svc = (Core.Properties.DefaultProperties)Core.Services.ServiceManager.Services.GetService(typeof(Core.Services.PropertyService));
 					object recentOpenObj = svc.GetProperty("ICSharpCode.SharpDevelop.Gui.MainWindow.RecentOpen");
@@ -112,7 +114,7 @@
 						
 						IProjectService projectService = (IProjectService)ICSharpCode.Core.Services.ServiceManager.Services.GetService(typeof(IProjectService));
 						
-						string prjNumber = e.Url.Substring("project://".Length);
+						string prjNumber = e.AURI.Substring("project://".Length);
 						prjNumber = prjNumber.Substring(0, prjNumber.Length - 1);
 			
 						string projectFile = page.projectFiles[int.Parse(prjNumber)];
@@ -126,21 +128,21 @@
 				} catch (Exception ex) {
 					//MessageBox.Show("Could not access project service or load project:\n\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
 				}
-			} else if (e.Url.EndsWith("/opencombine")) {
+			} else if (e.AURI.EndsWith("/opencombine")) {
 				OpenBtnClicked(this, EventArgs.Empty);
-			} else if (e.Url.EndsWith("/newcombine")) {
+			} else if (e.AURI.EndsWith("/newcombine")) {
 				NewBtnClicked(this, EventArgs.Empty);
-			} else if (e.Url.EndsWith("/newcombine")) {
+			} else if (e.AURI.EndsWith("/newcombine")) {
 				NewBtnClicked(this, EventArgs.Empty);
-			} else if (e.Url.EndsWith("/opensection")) {
+			} else if (e.AURI.EndsWith("/opensection")) {
 				Regex section = new Regex(@"/(?<section>.+)/opensection", RegexOptions.Compiled);
-				Match match = section.Match(e.Url);
+				Match match = section.Match(e.AURI);
 				if (match.Success) {
 					curSection = match.Result("${section}");
 					htmlControl.Html = page.Render(curSection);
 				}
 			} else {
-				System.Diagnostics.Process.Start(e.Url);
+				System.Diagnostics.Process.Start(e.AURI);
 			}
 		}
 		




More information about the Monodevelop-patches-list mailing list