diff options
Diffstat (limited to 'main/src')
3 files changed, 22 insertions, 1 deletions
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 <lluis@novell.com> + + * MonoDevelop.Ide.addin.xml: + * MonoDevelop.Ide.Commands/EditCommands.cs: Forward the delete + key to gtk if not processed. + 2010-05-21 Michael Hutchinson <mhutchinson@novell.com> * 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 @@ <!-- a file in the solution pad. --> <Command id = "MonoDevelop.Ide.Commands.EditCommands.DeleteKey" _label = "_Delete" + defaultHandler = "MonoDevelop.Ide.Commands.DefaultDeleteKeyHandler" shortcut = "Delete"/> </Category> |