mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-22 10:55:00 +00:00
enhance: add "Copy Subject" option to commit context menu
This commit is contained in:
parent
3358ff9aee
commit
5c5cc6ab14
2 changed files with 11 additions and 0 deletions
|
@ -100,6 +100,7 @@
|
|||
<x:String x:Key="Text.CommitCM.CompareWithHead" xml:space="preserve">Compare with HEAD</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CompareWithWorktree" xml:space="preserve">Compare with Worktree</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopyInfo" xml:space="preserve">Copy Info</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySubject" xml:space="preserve">Copy Subject</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">Copy SHA</x:String>
|
||||
<x:String x:Key="Text.CommitCM.CustomAction" xml:space="preserve">Custom Action</x:String>
|
||||
<x:String x:Key="Text.CommitCM.InteractiveRebase" xml:space="preserve">Interactively Rebase ${0}$ on Here</x:String>
|
||||
|
|
|
@ -713,6 +713,16 @@ namespace SourceGit.ViewModels
|
|||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
}
|
||||
|
||||
var copySubject = new MenuItem();
|
||||
copySubject.Header = App.Text("CommitCM.CopySubject");
|
||||
copySubject.Icon = App.CreateMenuIcon("Icons.Copy");
|
||||
copySubject.Click += (_, e) =>
|
||||
{
|
||||
App.CopyText(commit.Subject);
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(copySubject);
|
||||
|
||||
var copySHA = new MenuItem();
|
||||
copySHA.Header = App.Text("CommitCM.CopySHA");
|
||||
copySHA.Icon = App.CreateMenuIcon("Icons.Copy");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue