[Monodevelop-patches-list] r2060 - trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Tue Dec 7 15:38:58 EST 2004
Author: lluis
Date: 2004-12-07 15:38:58 -0500 (Tue, 07 Dec 2004)
New Revision: 2060
Modified:
trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/StartPage.cs
Log:
2004-12-07 Lluis Sanchez Gual <lluis at novell.com>
* StartPage.cs: Subscribe to service events using gui-thread aware
delegates. Use Runtime class to access services.
Modified: trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog 2004-12-07 20:38:11 UTC (rev 2059)
+++ trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/ChangeLog 2004-12-07 20:38:58 UTC (rev 2060)
@@ -1,3 +1,8 @@
+2004-12-07 Lluis Sanchez Gual <lluis at novell.com>
+
+ * StartPage.cs: Subscribe to service events using gui-thread aware
+ delegates. Use Runtime class to access services.
+
2004-10-20 John Luke <john.luke at gmail.com>
* ICSharpCodePage.cs: update to new RecentFiles API
Modified: trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/StartPage.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/StartPage.cs 2004-12-07 20:38:11 UTC (rev 2059)
+++ trunk/MonoDevelop/Core/src/AddIns/Misc/StartPage/StartPage.cs 2004-12-07 20:38:58 UTC (rev 2060)
@@ -73,8 +73,7 @@
public StartPageView()
{
htmlControl = new MozillaControl ();
- PropertyService propertyService = (PropertyService)ServiceManager.GetService(typeof(PropertyService));
- //htmlControl.Css = propertyService.DataDirectory + Path.DirectorySeparatorChar +
+ //htmlControl.Css = Runtime.PropertyService.DataDirectory + Path.DirectorySeparatorChar +
// "resources" + Path.DirectorySeparatorChar +
// "startpage" + Path.DirectorySeparatorChar +
// "Layout" + Path.DirectorySeparatorChar +
@@ -84,12 +83,10 @@
htmlControl.ShowAll ();
htmlControl.OpenUri += new OpenUriHandler (HtmlControlBeforeNavigate);
- StringParserService stringParserService = (StringParserService)ServiceManager.GetService(typeof(StringParserService));
// Description of the tab shown in #develop
- ContentName = stringParserService.Parse("${res:StartPage.StartPageContentName}");
+ ContentName = Runtime.StringParserService.Parse("${res:StartPage.StartPageContentName}");
- IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
- projectService.CombineOpened += new CombineEventHandler(HandleCombineOpened);
+ Runtime.ProjectService.CombineOpened += (CombineEventHandler) Runtime.DispatchService.GuiDispatch (new CombineEventHandler(HandleCombineOpened));
}
public void DelayedInitialize (string base_uri)
@@ -108,13 +105,10 @@
e.RetVal = true;
if (e.AURI.StartsWith("project://")) {
try {
- Core.Properties.DefaultProperties svc = (Core.Properties.DefaultProperties)Core.Services.ServiceManager.GetService(typeof(Core.Services.PropertyService));
- object recentOpenObj = svc.GetProperty("MonoDevelop.Gui.MainWindow.RecentOpen");
+ object recentOpenObj = Runtime.Properties.GetProperty("MonoDevelop.Gui.MainWindow.RecentOpen");
if (recentOpenObj is MonoDevelop.Services.RecentOpen) {
MonoDevelop.Services.RecentOpen recOpen = (MonoDevelop.Services.RecentOpen)recentOpenObj;
- IProjectService projectService = (IProjectService)MonoDevelop.Core.Services.ServiceManager.GetService(typeof(IProjectService));
-
string prjNumber = e.AURI.Substring("project://".Length);
// wrong (jluke)
//prjNumber = prjNumber.Substring(0, prjNumber.Length - 1);
@@ -122,7 +116,7 @@
string projectFile = page.projectFiles[int.Parse(prjNumber)];
try {
- projectService.OpenCombine(projectFile);
+ Runtime.ProjectService.OpenCombine(projectFile);
} catch (Exception ex) {
CombineLoadError.HandleError(ex, projectFile);
}
More information about the Monodevelop-patches-list
mailing list