Author: mkrueger
Date: 2008-02-04 06:41:12 -0500 (Mon, 04 Feb 2008)
New Revision: 94733

Modified:
   trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
   trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs
Log:
* Mono.TextEditor/Document.cs: Implemented Bug 323946 - Undo/Redo
  functionality are not context sensitive.

Modified: trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-04 
10:53:06 UTC (rev 94732)
+++ trunk/monodevelop/main/src/addins/Mono.Texteditor/ChangeLog 2008-02-04 
11:41:12 UTC (rev 94733)
@@ -1,3 +1,8 @@
+2008-02-04  Mike Krüger <[EMAIL PROTECTED]> 
+
+       * Mono.TextEditor/Document.cs: Implemented Bug 323946 - Undo/Redo
+         functionality are not context sensitive.
+
 2008-02-03  Mike Krüger <[EMAIL PROTECTED]> 
 
        * Mono.TextEditor/Document.cs, Mono.TextEditor/LineSplitter.cs,

Modified: 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs   
    2008-02-04 10:53:06 UTC (rev 94732)
+++ 
trunk/monodevelop/main/src/addins/Mono.Texteditor/Mono.TextEditor/Document.cs   
    2008-02-04 11:41:12 UTC (rev 94733)
@@ -164,6 +164,13 @@
                Stack<UndoOperation> undoStack = new Stack<UndoOperation> ();
                Stack<UndoOperation> redoStack = new Stack<UndoOperation> ();
                AtomicUndoOperation currentAtomicOperation = null;
+                       
+               public bool CanUndo {
+                       get {
+                               return this.undoStack.Count > 0;
+                       }
+               }
+               
                public void Undo ()
                {
                        if (undoStack.Count <= 0)
@@ -176,6 +183,12 @@
                        this.RequestUpdate (new UpdateAll ());
                        this.CommitDocumentUpdate ();
                }
+                               
+               public bool CanRedo {
+                       get {
+                               return this.redoStack.Count > 0;
+                       }
+               }
                
                public void Redo ()
                {

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

Reply via email to