summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f1cee4e)
raw | patch | inline | side by side (parent: f1cee4e)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 01:47:31 +0000 (20:47 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 21 Jan 2007 07:54:19 +0000 (02:54 -0500) |
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 <spearce@spearce.org>
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 <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index e136e329c3360d80413f6cd882300c95744f727d..cfec89b45d31293f681aa986befaf42333ee8aff 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
-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 <Visibility> "grab $w; focus $w"
bind $w <Key-Escape> "destroy $w"
+ bind_button3 $w.vers "tk_popup $w.ctxm %X %Y; grab $w; focus $w"
wm title $w "About $appname"
tkwait window $w
}