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

John Luke <jluke@cfl.rr.com> jluke at mono-cvs.ximian.com
Wed Apr 6 14:27:00 EDT 2005


Author: jluke
Date: 2005-04-06 14:27:00 -0400 (Wed, 06 Apr 2005)
New Revision: 2429

Modified:
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs
Log:
improve the serialization of colors and fix a bug


Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-04-06 17:22:06 UTC (rev 2428)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-04-06 18:27:00 UTC (rev 2429)
@@ -1,3 +1,9 @@
+2005-04-06  John Luke  <john.luke at gmail.com>
+
+	* Services/SourceViewService.cs: dont serialize
+	the defaults, add some logging, and use SourceTag.Id
+	not the .Name
+
 2005-04-06  Alexandre Gomes  <alexmipego at gmail.com>
 	
 	* Services/SourceViewService.cs: Fix a small problem that can occur

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs	2005-04-06 17:22:06 UTC (rev 2428)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs	2005-04-06 18:27:00 UTC (rev 2429)
@@ -57,11 +57,11 @@
 							sts.Italic = bool.Parse (reader.GetAttribute ("italic"));
 							sts.Underline = bool.Parse (reader.GetAttribute ("underline"));
 							sts.Strikethrough = bool.Parse (reader.GetAttribute ("strikethrough"));
-							// we can remove the "==null ? "false" : "true"" later, just to make sure transaction is smooth for svn users we let it for now.
-							sts.IsDefault = bool.Parse (reader.GetAttribute ("is_default")==null ? "false" : "true");
+							sts.IsDefault = false;
 							ParseColor (reader.GetAttribute ("foreground"), ref sts.Foreground);
 							ParseColor (reader.GetAttribute ("background"), ref sts.Background);
 							lang.SetTagStyle (name, sts);
+							Runtime.LoggingService.InfoFormat ("Overrode style {0} {1}", lang.Name, name);
 							break;
 						case "SourceLanguage":
 							lang = FindLanguage (reader.GetAttribute ("name"));
@@ -113,10 +113,12 @@
 
 				foreach (SourceTag tag in sl.Tags)
 				{
+					if (tag.TagStyle.IsDefault)
+						continue;
 					writer.WriteStartElement (null, "SourceTag", null);
 
 					writer.WriteStartAttribute (null, "name", null);
-						writer.WriteString (tag.Name);
+						writer.WriteString (tag.Id);
 					writer.WriteEndAttribute ();
 
 					writer.WriteStartAttribute (null, "bold", null);
@@ -143,11 +145,8 @@
 						writer.WriteString (tag.TagStyle.Background.ToString ());
 					writer.WriteEndAttribute ();
 
-					writer.WriteStartAttribute (null, "is_default", null);
-						writer.WriteString (tag.TagStyle.IsDefault.ToString ());
-					writer.WriteEndAttribute ();
-
 					writer.WriteEndElement ();
+					Runtime.LoggingService.InfoFormat ("Preserved style {0} {1}", sl.Name, tag.Id);
 				}
 
 				writer.WriteEndElement ();




More information about the Monodevelop-patches-list mailing list