From 9746c2960b217590502adaddab34af63ddeee321 Mon Sep 17 00:00:00 2001 From: Lluis Sanchez Date: Fri, 21 May 2010 17:49:21 +0000 Subject: * MonoDevelop.Ide.addin.xml: * MonoDevelop.Ide.Commands/EditCommands.cs: Forward the delete key to gtk if not processed. svn path=/trunk/monodevelop/; revision=157712 --- main/src/core/MonoDevelop.Ide/ChangeLog | 6 ++++++ .../MonoDevelop.Ide.Commands/EditCommands.cs | 16 +++++++++++++++- main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) (limited to 'main/src/core/MonoDevelop.Ide') diff --git a/main/src/core/MonoDevelop.Ide/ChangeLog b/main/src/core/MonoDevelop.Ide/ChangeLog index 9a4f83b19b..4a170fe678 100644 --- a/main/src/core/MonoDevelop.Ide/ChangeLog +++ b/main/src/core/MonoDevelop.Ide/ChangeLog @@ -1,3 +1,9 @@ +2010-05-21 Lluis Sanchez Gual + + * MonoDevelop.Ide.addin.xml: + * MonoDevelop.Ide.Commands/EditCommands.cs: Forward the delete + key to gtk if not processed. + 2010-05-21 Michael Hutchinson * MonoDevelop.Components.Commands/KeyBindingManager.cs: More diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs index efc36ed1d2..78acb23889 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs @@ -88,6 +88,20 @@ namespace MonoDevelop.Ide.Commands } } + internal class DefaultDeleteKeyHandler: CommandHandler + { + protected override void Run () + { + // Nothing. Will be forwarded to gtk + } + + protected override void Update (CommandInfo info) + { + // Forward to gtk + info.Bypass = true; + } + } + internal class DefaultDeleteHandler: CommandHandler { protected override void Run () @@ -129,7 +143,7 @@ namespace MonoDevelop.Ide.Commands else if (focus is Gtk.TextView) info.Enabled = ((Gtk.TextView)focus).Editable; else - info.Enabled = false; + info.Bypass = true; } } diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml index 6d793ed33b..ccd424b091 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml @@ -671,6 +671,7 @@ -- cgit v1.2.3