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

John Luke <jluke@cfl.rr.com> jluke at mono-cvs.ximian.com
Tue Apr 5 22:22:06 EDT 2005


Author: jluke
Date: 2005-04-05 22:22:06 -0400 (Tue, 05 Apr 2005)
New Revision: 2423

Modified:
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/SyntaxHighlightingPanel.cs
   trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs
Log:
fix some little bugs in the highlighting prefs


Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-04-05 20:06:23 UTC (rev 2422)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2005-04-06 02:22:06 UTC (rev 2423)
@@ -1,3 +1,12 @@
+2005-04-05  John Luke  <john.luke at gmail.com>
+
+	* Gui/OptionPanels/SyntaxHighlightingPanel.cs:
+	fix two buglets with the sensitivity of restore
+	apparently we have to set .IsDefault to false ourselves
+	and update the toggle/colorbutton when it is restored
+	* Services/SourceViewService.cs: add is_default to
+	store/restore
+	
 2005-04-02  John Luke  <john.luke at gmail.com>
 
 	* EditorBindings.glade: add glade part of new Panel

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/SyntaxHighlightingPanel.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/SyntaxHighlightingPanel.cs	2005-04-05 20:06:23 UTC (rev 2422)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/OptionPanels/SyntaxHighlightingPanel.cs	2005-04-06 02:22:06 UTC (rev 2423)
@@ -114,6 +114,7 @@
 				sts.Italic = italicToggle.Active;
 				sts.Underline = underlineToggle.Active;
 				sts.Strikethrough = strikeToggle.Active;
+				sts.IsDefault = false;
 				currentLanguage.SetTagStyle (styleid, sts);
 				restoreDefaultButton.Sensitive = true;
 			}
@@ -123,6 +124,7 @@
 				SourceTagStyle sts = currentStyle;
 				sts.Foreground = fgColorButton.Color;
 				sts.Background = bgColorButton.Color;
+				sts.IsDefault = false;
 				currentLanguage.SetTagStyle (styleid, sts);
 				restoreDefaultButton.Sensitive = true;
 			}
@@ -144,7 +146,7 @@
 			private void OnRestoreClicked (object sender, EventArgs a)
 			{
 				currentLanguage = svs.RestoreDefaults (currentLanguage);
-				SetSourceTagStyle ();
+				OnStyleChanged (stylesTreeView.Selection, EventArgs.Empty);
 			}
 
 			private void OnStyleChanged (object sender, EventArgs a)

Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs	2005-04-05 20:06:23 UTC (rev 2422)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Services/SourceViewService.cs	2005-04-06 02:22:06 UTC (rev 2423)
@@ -57,6 +57,7 @@
 							sts.Italic = bool.Parse (reader.GetAttribute ("italic"));
 							sts.Underline = bool.Parse (reader.GetAttribute ("underline"));
 							sts.Strikethrough = bool.Parse (reader.GetAttribute ("strikethrough"));
+							sts.IsDefault = bool.Parse (reader.GetAttribute ("is_default"));
 							ParseColor (reader.GetAttribute ("foreground"), ref sts.Foreground);
 							ParseColor (reader.GetAttribute ("background"), ref sts.Background);
 							lang.SetTagStyle (name, sts);
@@ -141,6 +142,10 @@
 						writer.WriteString (tag.TagStyle.Background.ToString ());
 					writer.WriteEndAttribute ();
 
+					writer.WriteStartAttribute (null, "is_default", null);
+						writer.WriteString (tag.TagStyle.IsDefault.ToString ());
+					writer.WriteEndAttribute ();
+
 					writer.WriteEndElement ();
 				}
 




More information about the Monodevelop-patches-list mailing list