diff options
author | Lluis Sanchez <lluis@novell.com> | 2010-05-21 21:49:21 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2010-05-21 21:49:21 +0400 |
commit | 9746c2960b217590502adaddab34af63ddeee321 (patch) | |
tree | 6ff560ebfa6f2cc8a799dc2cdacebab68c8c93d1 /main/src | |
parent | cf9baf1babce8016f26c2182934e83d67f2813d9 (diff) |
* MonoDevelop.Ide.addin.xml:
* MonoDevelop.Ide.Commands/EditCommands.cs: Forward the delete key to
gtk if not processed.
svn path=/trunk/monodevelop/; revision=157712
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> |