diff options
author | Mike Krüger <mikkrg@microsoft.com> | 2019-06-05 11:46:19 +0300 |
---|---|---|
committer | Mike Krüger <mikkrg@microsoft.com> | 2019-06-05 11:46:19 +0300 |
commit | eff5f452177625e47a77812993f39ff075d2fe40 (patch) | |
tree | c54d748fc6ff726664f772886f88c7c0e2b0fb5f /main/src/addins | |
parent | 224dea46c08a39204568c96c8217c2821a4eb69b (diff) |
Fixes VSTS Bug 901464: Copy/paste is broken in "authors" tab (wrong
text or nothing happens)
https://devdiv.visualstudio.com/DevDiv/_workitems/edit/901464
Diffstat (limited to 'main/src/addins')
-rw-r--r-- | main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs | 54 |
1 files changed, 12 insertions, 42 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs index b29198e606..dce66383a8 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/BlameView.cs @@ -1,4 +1,4 @@ -// +// // BlameView.cs // // Author: @@ -32,6 +32,8 @@ using System; using System.Linq; using Microsoft.VisualStudio.Text.Editor; using Microsoft.VisualStudio.Text; +using MonoDevelop.Components.Commands; +using MonoDevelop.Ide.Commands; namespace MonoDevelop.VersionControl.Views { @@ -39,7 +41,7 @@ namespace MonoDevelop.VersionControl.Views { } - internal class BlameView : DocumentController, IBlameView, IClipboardHandler + internal class BlameView : DocumentController, IBlameView { BlameWidget widget; VersionControlDocumentInfo info; @@ -111,57 +113,25 @@ namespace MonoDevelop.VersionControl.Views #endregion #region IClipboardHandler implementation - void IClipboardHandler.Cut () - { - } - void IClipboardHandler.Copy () + [CommandUpdateHandler (EditCommands.Copy)] + protected void OnUpdateCopy (CommandInfo info) { - this.widget.Editor.RunAction (ClipboardActions.Copy); + info.Enabled = this.widget.Editor.IsSomethingSelected; } - void IClipboardHandler.Paste () - { - } - - void IClipboardHandler.Delete () + [CommandHandler (EditCommands.Copy)] + protected void Copy () { + this.widget.Editor.RunAction (ClipboardActions.Copy); } - void IClipboardHandler.SelectAll () + [CommandHandler (EditCommands.SelectAll)] + protected void SelectAll () { this.widget.Editor.RunAction (SelectionActions.SelectAll); } - bool IClipboardHandler.EnableCut { - get { - return false; - } - } - - bool IClipboardHandler.EnableCopy { - get { - return this.widget.Editor.IsSomethingSelected; - } - } - - bool IClipboardHandler.EnablePaste { - get { - return false; - } - } - - bool IClipboardHandler.EnableDelete { - get { - return false; - } - } - - bool IClipboardHandler.EnableSelectAll { - get { - return true; - } - } #endregion } } |