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:
authorJeffrey Stedfast <jeff@xamarin.com>2011-09-26 22:19:02 +0400
committerJeffrey Stedfast <jeff@xamarin.com>2011-09-26 22:19:02 +0400
commit84c806b56d879c8385821b0fb918d603c4e49c97 (patch)
tree3e171255a5aaca9dc32da52277898b1518620f2f /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands
parentea7e6c5c22350985626bdadcd26d02232619885b (diff)
[Ide] EditCommands.cs: disable cut/copy/paste/delete on the welcome screen.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs19
1 files changed, 13 insertions, 6 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 f134c089b0..ec3a04ac47 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs
@@ -141,9 +141,11 @@ 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.Bypass = true;
+ info.Enabled = false;
+
+ info.Bypass = !info.Enabled;
}
}
@@ -169,7 +171,8 @@ namespace MonoDevelop.Ide.Commands
protected override void Update (CommandInfo info)
{
object focus = IdeApp.Workbench.RootWindow.HasToplevelFocus ? IdeApp.Workbench.RootWindow.Focus : null;
- info.Bypass = !(focus is Gtk.Editable || focus is Gtk.TextView);
+ info.Enabled = (focus is Gtk.Editable || focus is Gtk.TextView);
+ info.Bypass = !info.Enabled;
}
}
@@ -198,9 +201,11 @@ 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.Bypass = true;
+ info.Enabled = false;
+
+ info.Bypass = !info.Enabled;
}
}
@@ -231,7 +236,9 @@ namespace MonoDevelop.Ide.Commands
else if (focus is Gtk.TextView)
info.Enabled = ((Gtk.TextView)focus).Editable;
else
- info.Bypass = true;
+ info.Enabled = false;
+
+ info.Bypass = !info.Enabled;
}
}