Author: mkrueger
Date: 2008-01-22 10:05:17 -0500 (Tue, 22 Jan 2008)
New Revision: 93530

Modified:
   trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
   
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs
   
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
   
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
Log:
* Mono.TextEditor/TextEditor.cs, Mono.TextEditor/TextEditorOptions.cs,
  Mono.TextEditor/GutterMargin.cs: Added some text editor options -
  options are now virtual.

Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-01-22 
14:20:18 UTC (rev 93529)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-01-22 
15:05:17 UTC (rev 93530)
@@ -1,3 +1,15 @@
+2008-01-22  Mike Krüger <[EMAIL PROTECTED]> 
+
+       * Mono.TextEditor/TextEditor.cs, Mono.TextEditor/TextEditorOptions.cs,
+         Mono.TextEditor/GutterMargin.cs: Added some text editor options -
+         options are now virtual.
+
+2008-01-22  Mike Krüger <[EMAIL PROTECTED]> 
+
+       * Mono.TextEditor/TextEditor.cs, Mono.TextEditor/TextEditorOptions.cs,
+         Mono.TextEditor/GutterMargin.cs: Added some text editor options -
+         options are now virtual.
+
 2008-01-21  Mike Krüger <[EMAIL PROTECTED]> 
 
        * Mono.TextEditor.mdp, Mono.TextEditor.mds: Added changelogs to the 
project

Modified: 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs
   2008-01-22 14:20:18 UTC (rev 93529)
+++ 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/GutterMargin.cs
   2008-01-22 15:05:17 UTC (rev 93530)
@@ -40,7 +40,7 @@
                {
                        this.editor = editor;
                        layout = new Pango.Layout (editor.PangoContext);
-                       layout.FontDescription = 
Pango.FontDescription.FromString ("Monospace 10");
+                       layout.FontDescription = TextEditorOptions.Options.Font;
                }
                
                public override int Width {

Modified: 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs 
    2008-01-22 14:20:18 UTC (rev 93529)
+++ 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditor.cs 
    2008-01-22 15:05:17 UTC (rev 93530)
@@ -146,7 +146,7 @@
                        
                        layout = new Pango.Layout (this.PangoContext);
                        layout.Alignment = Pango.Alignment.Left;
-                       layout.FontDescription = 
Pango.FontDescription.FromString ("Monospace 10");
+                       layout.FontDescription = TextEditorOptions.Options.Font;
                        
                        keyBindings.Add (GetKeyCode (Gdk.Key.Left), new 
CaretMoveLeft ());
                        keyBindings.Add (GetKeyCode (Gdk.Key.Left, 
Gdk.ModifierType.ShiftMask), new SelectionMoveLeft ());

Modified: 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
      2008-01-22 14:20:18 UTC (rev 93529)
+++ 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/TextEditorOptions.cs
      2008-01-22 15:05:17 UTC (rev 93530)
@@ -31,7 +31,9 @@
 {
        public class TextEditorOptions
        {
+               const string DEFAULT_FONT = "Mono 10";
                static TextEditorOptions options = new TextEditorOptions ();
+               
                public static TextEditorOptions Options {
                        get {
                                return options;
@@ -59,8 +61,9 @@
                bool showEolMarkers = false;
                
                bool highlightCaretLine = false;
+               string fontName = DEFAULT_FONT;
                
-               public bool TabsToSpaces {
+               public virtual bool TabsToSpaces {
                        get {
                                return tabsToSpaces;
                        }
@@ -69,7 +72,7 @@
                        }
                }
 
-               public int IndentationSize {
+               public virtual int IndentationSize {
                        get {
                                return indentationSize;
                        }
@@ -78,7 +81,7 @@
                        }
                }
 
-               public int TabSize {
+               public virtual int TabSize {
                        get {
                                return tabSize;
                        }
@@ -87,7 +90,7 @@
                        }
                }
 
-               public bool ShowIconMargin {
+               public virtual bool ShowIconMargin {
                        get {
                                return showIconMargin;
                        }
@@ -96,7 +99,7 @@
                        }
                }
 
-               public bool ShowLineNumberMargin {
+               public virtual bool ShowLineNumberMargin {
                        get {
                                return showLineNumberMargin;
                        }
@@ -105,7 +108,7 @@
                        }
                }
 
-               public bool ShowFoldMargin {
+               public virtual bool ShowFoldMargin {
                        get {
                                return showFoldMargin;
                        }
@@ -114,7 +117,7 @@
                        }
                }
 
-               public bool ShowInvalidLines {
+               public virtual bool ShowInvalidLines {
                        get {
                                return showInvalidLines;
                        }
@@ -123,7 +126,7 @@
                        }
                }
 
-               public bool ShowTabs {
+               public virtual bool ShowTabs {
                        get {
                                return showTabs;
                        }
@@ -132,7 +135,7 @@
                        }
                }
 
-               public bool ShowEolMarkers {
+               public virtual bool ShowEolMarkers {
                        get {
                                return showEolMarkers;
                        }
@@ -141,7 +144,7 @@
                        }
                }
 
-               public bool HighlightCaretLine {
+               public virtual bool HighlightCaretLine {
                        get {
                                return highlightCaretLine;
                        }
@@ -150,7 +153,7 @@
                        }
                }
 
-               public bool ShowSpaces {
+               public virtual bool ShowSpaces {
                        get {
                                return showSpaces;
                        }
@@ -159,7 +162,7 @@
                        }
                }
 
-               public int RulerColumn {
+               public virtual int RulerColumn {
                        get {
                                return rulerColumn;
                        }
@@ -168,7 +171,7 @@
                        }
                }
 
-               public bool ShowRuler {
+               public virtual bool ShowRuler {
                        get {
                                return showRuler;
                        }
@@ -177,7 +180,7 @@
                        }
                }
 
-               public bool AutoIndent {
+               public virtual bool AutoIndent {
                        get {
                                return autoIndent;
                        }
@@ -186,5 +189,19 @@
                        }
                }
                
+               public virtual string FontName {
+                       get {
+                               return fontName;
+                       }
+                       set {
+                               fontName = !String.IsNullOrEmpty (value) ? 
value : DEFAULT_FONT;
+                       }
+               }
+               
+               public virtual Pango.FontDescription Font {
+                       get {
+                               return Pango.FontDescription.FromString 
(FontName);
+                       }
+               }               
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to