diff options
author | Lluis Sanchez <lluis@novell.com> | 2010-05-21 20:49:25 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2010-05-21 20:49:25 +0400 |
commit | 378764376a90e8c31a74ea2c40bc7ca03a0872aa (patch) | |
tree | 886b3a7b5a49f13b972ef9d1a8a7a64578198cbc /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands | |
parent | 2a4bf178338609f72d5455db3d3150e050d201b2 (diff) |
* MonoDevelop.Ide.Commands/EditCommands.cs: Set bypass flag if
Copy/Cut/Paste can't be handled, so that gtk can handle it.
* MonoDevelop.Components.Commands/CommandManager.cs: When executing a
command from a shortcut, don't forward the key press to gtk if the
command was disabled, but do it if the bypass flag was set. With
this change, the F10 key won't activate the main menu anymore when
the step over command is disabled.
svn path=/trunk/monodevelop/; revision=157706
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs | 8 |
1 files changed, 4 insertions, 4 deletions
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 d4afa228a3..efc36ed1d2 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs @@ -155,7 +155,7 @@ namespace MonoDevelop.Ide.Commands protected override void Update (CommandInfo info) { object focus = IdeApp.Workbench.RootWindow.HasToplevelFocus ? IdeApp.Workbench.RootWindow.Focus : null; - info.Enabled = (focus is Gtk.Editable || focus is Gtk.TextView); + info.Bypass = !(focus is Gtk.Editable || focus is Gtk.TextView); } } @@ -186,7 +186,7 @@ namespace MonoDevelop.Ide.Commands else if (focus is Gtk.TextView) info.Enabled = ((Gtk.TextView)focus).Editable; else - info.Enabled = false; + info.Bypass = true; } } @@ -215,9 +215,9 @@ namespace MonoDevelop.Ide.Commands if (focus is Gtk.Editable) info.Enabled = ((Gtk.Editable)focus).IsEditable; else if (focus is Gtk.TextView) - info.Enabled = ((Gtk.TextView)focus).Editable; + info.Enabled = ((Gtk.TextView)focus).Editable; else - info.Enabled = false; + info.Bypass = true; } } |