[Monodevelop-patches-list] r671 - trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Jan 26 22:10:26 EST 2004


Author: benm
Date: 2004-01-26 22:10:26 -0500 (Mon, 26 Jan 2004)
New Revision: 671

Modified:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
Log:
more text operations support

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2004-01-27 03:01:18 UTC (rev 670)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2004-01-27 03:10:26 UTC (rev 671)
@@ -9,6 +9,8 @@
 using ICSharpCode.SharpDevelop.Services;
 using ICSharpCode.Core.AddIns.Codons;
 
+using Gtk;
+
 namespace MonoDevelop.SourceEditor.Gui {
 	public class SourceEditorDisplayBinding : IDisplayBinding
 	{
@@ -145,24 +147,32 @@
 		//
 		// TODO: All of this ;-)
 		//
+		
+		bool HasSelection {
+			get {
+				TextIter dummy, dummy2;
+				return se.buffer.GetSelectionBounds (out dummy, out dummy2);
+			}
+		}
+		
 		public bool EnableCut {
-			get { return false; }
+			get { return HasSelection; }
 		}
 		
 		public bool EnableCopy {
-			get { return false; }
+			get { return HasSelection; }
 		}
 		
 		public bool EnablePaste {
-			get { return false; }
+			get { return true; }
 		}
 		
 		public bool EnableDelete {
-			get { return false; }
+			get { return HasSelection; }
 		}
 		
 		public bool EnableSelectAll {
-			get { return false; }
+			get { return true; }
 		}
 		
 		public void Cut (object sender, EventArgs e)
@@ -179,6 +189,7 @@
 		
 		public void Delete (object sender, EventArgs e)
 		{
+			se.buffer.DeleteSelection (true, true);
 		}
 		
 		public void SelectAll (object sender, EventArgs e)




More information about the Monodevelop-patches-list mailing list