gitk: Add mouse right-click options to copy path and branch name

This adds menu entries to two of the right-click menus: - 'Copy path' in the file list - 'Copy branch name' on a branch in the commit list Signed-off-by: Michael Rappazzo <rappazzo@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>

Michael Rappazzo committed May 7, 2015 at 22:29 UTC 427cf16985c77b3c185b06bc8d6d3278ce177181
1 file changed +2
gitk
+2
@@ -2645,6 +2645,7 @@ proc makewindow {} {
2645 makemenu $headctxmenu {
2646 {mc "Check out this branch" command cobranch}
2647 {mc "Remove this branch" command rmbranch}
2648 + {mc "Copy branch name" command {clipboard clear; clipboard append $headmenuhead}}
2649 }
2650 $headctxmenu configure -tearoff 0
2651
@@ -2655,6 +2656,7 @@ proc makewindow {} {
2656 {mc "Highlight this only" command {flist_hl 1}}
2657 {mc "External diff" command {external_diff}}
2658 {mc "Blame parent commit" command {external_blame 1}}
2659 + {mc "Copy path" command {clipboard clear; clipboard append $flist_menu_file}}
2660 }
2661 $flist_menu configure -tearoff 0
2662