[Monodevelop-patches-list] r1814 - in trunk/MonoDevelop/src: Libraries/Gdl Main/Base Main/Base/Services/File Main/Base/Services/Project
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Wed Jun 23 19:08:38 EDT 2004
Author: tberman
Date: 2004-06-23 19:08:38 -0400 (Wed, 23 Jun 2004)
New Revision: 1814
Modified:
trunk/MonoDevelop/src/Libraries/Gdl/Makefile.Gdl
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Services/File/DefaultFileService.cs
trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs
Log:
using the dispatcher to make solution loading gui-freeze-free
Modified: trunk/MonoDevelop/src/Libraries/Gdl/Makefile.Gdl
===================================================================
--- trunk/MonoDevelop/src/Libraries/Gdl/Makefile.Gdl 2004-06-23 19:06:07 UTC (rev 1813)
+++ trunk/MonoDevelop/src/Libraries/Gdl/Makefile.Gdl 2004-06-23 23:08:38 UTC (rev 1814)
@@ -33,7 +33,7 @@
Gdl.dll: $(SOURCES)
mcs $(MCS_OPTIONS) -target:library -out:"Gdl.dll" $(PKG_REFERENCES_BUILD) $(SOURCES) \
- && cp "Gdl.dll" ./build/bin
+ && cp "Gdl.dll" ./build/bin/.
clean:
rm -f Gdl.dll
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-23 19:06:07 UTC (rev 1813)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-23 23:08:38 UTC (rev 1814)
@@ -1,5 +1,12 @@
2004-06-23 Todd Berman <tberman at off.net>
+ * Services/Project/DefaultProjectService.cs: make solution loading take
+ place without any gui locks.
+ * Service/File/DefaultFileService.cs: proxy OpenFile to a real method
+ that gets called in the idle handler.
+
+2004-06-23 Todd Berman <tberman at off.net>
+
* Services/DispatchService/DispatchService.cs: change up a bit
to allow a void blah () delegate and a void blah (object) delegate.
Added overloads to hit those.
Modified: trunk/MonoDevelop/src/Main/Base/Services/File/DefaultFileService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/File/DefaultFileService.cs 2004-06-23 19:06:07 UTC (rev 1813)
+++ trunk/MonoDevelop/src/Main/Base/Services/File/DefaultFileService.cs 2004-06-23 23:08:38 UTC (rev 1814)
@@ -83,6 +83,13 @@
public void OpenFile (string fileName)
{
+ DispatchService dispatcher = (DispatchService)ServiceManager.Services.GetService (typeof (DispatchService));
+ dispatcher.GuiDispatch (new StatefulMessageHandler (realOpenFile), fileName);
+ }
+
+ void realOpenFile (object file)
+ {
+ string fileName = file as string;
if (fileName == null)
return;
Modified: trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs 2004-06-23 19:06:07 UTC (rev 1813)
+++ trunk/MonoDevelop/src/Main/Base/Services/Project/DefaultProjectService.cs 2004-06-23 23:08:38 UTC (rev 1814)
@@ -157,6 +157,13 @@
void LoadCombine(string filename)
{
+ DispatchService dispatcher = (DispatchService)ServiceManager.Services.GetService (typeof (DispatchService));
+ dispatcher.BackgroundDispatch (new StatefulMessageHandler (backgroundLoadCombine), filename);
+ }
+
+ void backgroundLoadCombine (object arg)
+ {
+ string filename = arg as string;
if (!fileUtilityService.TestFileExists(filename)) {
return;
}
@@ -479,6 +486,7 @@
void RestoreCombinePreferences(Combine combine, string combinefilename)
{
+ DispatchService dispatcher = (DispatchService)ServiceManager.Services.GetService (typeof (DispatchService));
PropertyService propertyService = (PropertyService)ServiceManager.Services.GetService(typeof(PropertyService));
string directory = propertyService.ConfigDirectory + "CombinePreferences";
if (!Directory.Exists(directory)) {
@@ -517,10 +525,9 @@
IProperties properties = (IProperties)new DefaultProperties().FromXmlElement((XmlElement)root["Properties"].ChildNodes[0]);
string name = properties.GetProperty("ActiveWindow", "");
foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection) {
- // WINDOWS DEPENDENCY : ToUpper
if (content.ContentName != null &&
- content.ContentName.ToUpper() == name.ToUpper()) {
- content.WorkbenchWindow.SelectWindow();
+ content.ContentName == name) {
+ dispatcher.GuiDispatch (new MessageHandler (content.WorkbenchWindow.SelectWindow));
break;
}
}
@@ -590,11 +597,18 @@
//********* own events
protected virtual void OnCombineOpened(CombineEventArgs e)
{
+ DispatchService dispatcher = (DispatchService)ServiceManager.Services.GetService (typeof (DispatchService));
GenerateMakefiles ();
if (CombineOpened != null) {
- CombineOpened(this, e);
+ dispatcher.GuiDispatch (new StatefulMessageHandler (dispatchOpened), e);
+ //CombineOpened(this, e);
}
}
+
+ void dispatchOpened (object args)
+ {
+ CombineOpened (this, (CombineEventArgs)args);
+ }
protected virtual void OnCombineClosed(CombineEventArgs e)
{
More information about the Monodevelop-patches-list
mailing list