[Monodevelop-patches-list] r2687 - in trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor: . Gui

Lluis Sanchez <lluis@ximian.com> lluis at mono-cvs.ximian.com
Wed Jul 27 10:49:08 EDT 2005


Author: lluis
Date: 2005-07-27 10:49:08 -0400 (Wed, 27 Jul 2005)
New Revision: 2687

Modified:
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
Log:
2005-07-27  Lluis Sanchez Gual  <lluis at novell.com> 

	* Gui/SourceEditorDisplayBinding.cs: Make sure the PropertyChanged
	handler runs in the gui thread.



Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-07-27 14:31:10 UTC (rev 2686)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-07-27 14:49:08 UTC (rev 2687)
@@ -1,3 +1,8 @@
+2005-07-27  Lluis Sanchez Gual  <lluis at novell.com> 
+
+	* Gui/SourceEditorDisplayBinding.cs: Make sure the PropertyChanged
+	handler runs in the gui thread.
+
 2005-07-22  John Luke  <john.luke at gmail.com>
 
 	* SourceEditor.mdp: remove completion files moved into Base assembly

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2005-07-27 14:31:10 UTC (rev 2686)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2005-07-27 14:49:08 UTC (rev 2687)
@@ -116,6 +116,8 @@
 		DateTime lastSaveTime;
 		bool warnOverwrite = false;
 		
+		PropertyEventHandler propertyHanlder;
+		
 		void UpdateFSW (object o, EventArgs e)
 		{
 			if (ContentName == null || ContentName.Length == 0 || !File.Exists (ContentName))
@@ -183,9 +185,10 @@
 			CaretModeChanged (null, null);
 			SetInitialValues ();
 			
+			propertyHanlder = (PropertyEventHandler) Runtime.DispatchService.GuiDispatch (new PropertyEventHandler (PropertiesChanged));
 			PropertyService propertyService = (PropertyService) ServiceManager.GetService (typeof (PropertyService));
 			properties = ((IProperties) propertyService.GetProperty("MonoDevelop.TextEditor.Document.Document.DefaultDocumentAggregatorProperties", new DefaultProperties()));
-			properties.PropertyChanged += new PropertyEventHandler (PropertiesChanged);
+			properties.PropertyChanged += propertyHanlder;
 			fsw = new FileSystemWatcher ();
 			fsw.Changed += (FileSystemEventHandler) Runtime.DispatchService.GuiDispatch (new FileSystemEventHandler (OnFileChanged));
 			UpdateFSW (null, null);
@@ -240,7 +243,7 @@
 			}
 
 			mainBox.Remove (se);
-			properties.PropertyChanged -= new PropertyEventHandler (PropertiesChanged);
+			properties.PropertyChanged -= propertyHanlder;
 			se.Buffer.ModifiedChanged -= new EventHandler (OnModifiedChanged);
 			se.Buffer.MarkSet -= new MarkSetHandler (OnMarkSet);
 			se.Buffer.Changed -= new EventHandler (OnChanged);




More information about the Monodevelop-patches-list mailing list