Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@novell.com>2010-05-21 20:49:25 +0400
committerLluis Sanchez <lluis@novell.com>2010-05-21 20:49:25 +0400
commit378764376a90e8c31a74ea2c40bc7ca03a0872aa (patch)
tree886b3a7b5a49f13b972ef9d1a8a7a64578198cbc /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands
parent2a4bf178338609f72d5455db3d3150e050d201b2 (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.Components.Commands')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
index 1e34b8694f..7efd3b8fe5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs
@@ -210,13 +210,21 @@ namespace MonoDevelop.Components.Commands
return;
}
+ bool bypass = false;
for (int i = 0; i < commands.Count; i++) {
CommandInfo cinfo = GetCommandInfo (commands[i].Id, new CommandTargetRoute ());
+ if (cinfo.Bypass) {
+ bypass = true;
+ continue;
+ }
if (cinfo.Enabled && cinfo.Visible && DispatchCommand (commands[i].Id, CommandSource.Keybinding))
return;
}
+
+ // The command has not been handled.
+ // If there is at least a handler that sets the bypass flag, allow gtk to execute the default action
- e.RetVal = false;
+ e.RetVal = commands.Count > 0 && !bypass;
mode = null;
}