From 98063115920338a1a6472a22c6792b13e37012b5 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 20 Jan 2007 20:47:31 -0500 Subject: [PATCH] git-gui: Allow the user to copy the version data to the clipboard. If a user wants to report an issue they will likely want to include the version number with their issue report. This may be difficult to enter if the version number includes an abbreviated commit SHA1 on the end of it. So we now give the user a context menu option on the version box which allows them to copy all of the relevant version data to the clipboard, ready for pasting into a report. Signed-off-by: Shawn O. Pearce --- git-gui.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/git-gui.sh b/git-gui.sh index e136e329c..cfec89b45 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -2563,8 +2563,18 @@ $copyright" \ -font font_ui pack $w.vers -side top -fill x -padx 5 -pady 5 + menu $w.ctxm -tearoff 0 + $w.ctxm add command \ + -label {Copy} \ + -font font_ui \ + -command " + clipboard clear + clipboard append -format STRING -type STRING -- \[$w.vers cget -text\] + " + bind $w "grab $w; focus $w" bind $w "destroy $w" + bind_button3 $w.vers "tk_popup $w.ctxm %X %Y; grab $w; focus $w" wm title $w "About $appname" tkwait window $w } -- 2.26.2