mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
feature<PageTabBar>: add context menu to copy repositories store path
This commit is contained in:
parent
bb6c99056e
commit
9e8cf02370
3 changed files with 11 additions and 1 deletions
|
@ -290,6 +290,7 @@
|
||||||
<sys:String x:Key="Text.PageTabBar.Tab.CloseOther">Close Other Tabs</sys:String>
|
<sys:String x:Key="Text.PageTabBar.Tab.CloseOther">Close Other Tabs</sys:String>
|
||||||
<sys:String x:Key="Text.PageTabBar.Tab.CloseRight">Close Tabs to the Right</sys:String>
|
<sys:String x:Key="Text.PageTabBar.Tab.CloseRight">Close Tabs to the Right</sys:String>
|
||||||
<sys:String x:Key="Text.PageTabBar.Tab.Bookmark">Bookmark</sys:String>
|
<sys:String x:Key="Text.PageTabBar.Tab.Bookmark">Bookmark</sys:String>
|
||||||
|
<sys:String x:Key="Text.PageTabBar.Tab.CopyPath">Copy Path</sys:String>
|
||||||
|
|
||||||
<sys:String x:Key="Text.Merge">Merge Branch</sys:String>
|
<sys:String x:Key="Text.Merge">Merge Branch</sys:String>
|
||||||
<sys:String x:Key="Text.Merge.Source">Source Branch :</sys:String>
|
<sys:String x:Key="Text.Merge.Source">Source Branch :</sys:String>
|
||||||
|
|
|
@ -289,6 +289,7 @@
|
||||||
<sys:String x:Key="Text.PageTabBar.Tab.CloseOther">关闭其他标签页</sys:String>
|
<sys:String x:Key="Text.PageTabBar.Tab.CloseOther">关闭其他标签页</sys:String>
|
||||||
<sys:String x:Key="Text.PageTabBar.Tab.CloseRight">关闭右侧标签页</sys:String>
|
<sys:String x:Key="Text.PageTabBar.Tab.CloseRight">关闭右侧标签页</sys:String>
|
||||||
<sys:String x:Key="Text.PageTabBar.Tab.Bookmark">设置书签</sys:String>
|
<sys:String x:Key="Text.PageTabBar.Tab.Bookmark">设置书签</sys:String>
|
||||||
|
<sys:String x:Key="Text.PageTabBar.Tab.CopyPath">复制仓库路径</sys:String>
|
||||||
|
|
||||||
<sys:String x:Key="Text.Merge">合并分支</sys:String>
|
<sys:String x:Key="Text.Merge">合并分支</sys:String>
|
||||||
<sys:String x:Key="Text.Merge.Source">合并分支 :</sys:String>
|
<sys:String x:Key="Text.Merge.Source">合并分支 :</sys:String>
|
||||||
|
|
|
@ -336,7 +336,15 @@ namespace SourceGit.Views.Widgets {
|
||||||
}
|
}
|
||||||
menu.Items.Add(new Separator());
|
menu.Items.Add(new Separator());
|
||||||
menu.Items.Add(bookmark);
|
menu.Items.Add(bookmark);
|
||||||
}
|
|
||||||
|
var copyPath = new MenuItem();
|
||||||
|
copyPath.Header = App.Text("PageTabBar.Tab.CopyPath");
|
||||||
|
copyPath.Click += (_, __) => {
|
||||||
|
Clipboard.SetDataObject(tab.Id);
|
||||||
|
};
|
||||||
|
menu.Items.Add(new Separator());
|
||||||
|
menu.Items.Add(copyPath);
|
||||||
|
}
|
||||||
|
|
||||||
menu.IsOpen = true;
|
menu.IsOpen = true;
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
|
Loading…
Reference in a new issue