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:
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs')
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs68
1 files changed, 35 insertions, 33 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 19fc6f5e7f..a980d23841 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/EditCommands.cs
@@ -157,6 +157,15 @@ namespace MonoDevelop.Ide.Commands
{
protected override void Run ()
{
+ #if WIN32
+ var wintv = System.Windows.Input.Keyboard.FocusedElement;
+ var cmd = System.Windows.Input.ApplicationCommands.Copy;
+ if (wintv != null && cmd.CanExecute (null, wintv)) {
+ cmd.Execute (null, wintv);
+ return;
+ }
+ #endif
+
if (IdeApp.Workbench.RootWindow.HasToplevelFocus) {
Gtk.Editable editable = IdeApp.Workbench.RootWindow.Focus as Gtk.Editable;
if (editable != null) {
@@ -177,14 +186,6 @@ namespace MonoDevelop.Ide.Commands
}
#endif
}
-#if WIN32
- var wintv = System.Windows.Input.Keyboard.FocusedElement;
- var cmd = System.Windows.Input.ApplicationCommands.Copy;
- if (wintv != null && cmd.CanExecute (null, wintv)) {
- cmd.Execute (null, wintv);
- return;
- }
-#endif
}
protected override void Update (CommandInfo info)
@@ -207,6 +208,15 @@ namespace MonoDevelop.Ide.Commands
{
protected override void Run ()
{
+ #if WIN32
+ var wintv = System.Windows.Input.Keyboard.FocusedElement;
+ var cmd = System.Windows.Input.ApplicationCommands.Cut;
+ if (wintv != null && cmd.CanExecute(null, wintv)) {
+ cmd.Execute(null, wintv);
+ return;
+ }
+ #endif
+
if (IdeApp.Workbench.RootWindow.HasToplevelFocus) {
Gtk.Editable editable = IdeApp.Workbench.RootWindow.Focus as Gtk.Editable;
if (editable != null) {
@@ -226,15 +236,7 @@ namespace MonoDevelop.Ide.Commands
return;
}
#endif
- }
-#if WIN32
- var wintv = System.Windows.Input.Keyboard.FocusedElement;
- var cmd = System.Windows.Input.ApplicationCommands.Cut;
- if (wintv != null && cmd.CanExecute(null, wintv)) {
- cmd.Execute(null, wintv);
- return;
- }
-#endif
+ }
}
protected override void Update (CommandInfo info)
@@ -265,6 +267,14 @@ namespace MonoDevelop.Ide.Commands
{
protected override void Run ()
{
+ #if WIN32
+ var wintv = System.Windows.Input.Keyboard.FocusedElement;
+ var cmd = System.Windows.Input.ApplicationCommands.Paste;
+ if (wintv != null && cmd.CanExecute (null, wintv)) {
+ cmd.Execute (null, wintv);
+ return;
+ }
+ #endif
if (IdeApp.Workbench.RootWindow.HasToplevelFocus) {
Gtk.Editable editable = IdeApp.Workbench.RootWindow.Focus as Gtk.Editable;
if (editable != null) {
@@ -285,14 +295,6 @@ namespace MonoDevelop.Ide.Commands
}
#endif
}
-#if WIN32
- var wintv = System.Windows.Input.Keyboard.FocusedElement;
- var cmd = System.Windows.Input.ApplicationCommands.Paste;
- if (wintv != null && cmd.CanExecute (null, wintv)) {
- cmd.Execute (null, wintv);
- return;
- }
-#endif
}
protected override void Update (CommandInfo info)
@@ -342,6 +344,14 @@ namespace MonoDevelop.Ide.Commands
{
protected override void Run ()
{
+ #if WIN32
+ var wintv = System.Windows.Input.Keyboard.FocusedElement;
+ var cmd = System.Windows.Input.ApplicationCommands.SelectAll;
+ if (wintv != null && cmd.CanExecute (null, wintv)) {
+ cmd.Execute (null, wintv);
+ return;
+ }
+ #endif
if (IdeApp.Workbench.RootWindow.HasToplevelFocus) {
Gtk.Editable editable = IdeApp.Workbench.RootWindow.Focus as Gtk.Editable;
if (editable != null) {
@@ -361,14 +371,6 @@ namespace MonoDevelop.Ide.Commands
}
#endif
}
-#if WIN32
- var wintv = System.Windows.Input.Keyboard.FocusedElement;
- var cmd = System.Windows.Input.ApplicationCommands.SelectAll;
- if (wintv != null && cmd.CanExecute (null, wintv)) {
- cmd.Execute (null, wintv);
- return;
- }
-#endif
}
protected override void Update (CommandInfo info)