diff options
author | Raphael Zimmerer <killekulla@rdrz.de> | 2011-04-19 22:37:09 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2011-05-29 14:51:06 +1000 |
commit | 36242490cd012bcf5148475aaa1a5abb76e4ef66 (patch) | |
tree | 5b0afdbe3563417b28448e0f2f7d22f9edaadcba | |
parent | f5974d97af06bca1382c585a515c8e1920333eb7 (diff) | |
download | git-36242490cd012bcf5148475aaa1a5abb76e4ef66.tar.gz git-36242490cd012bcf5148475aaa1a5abb76e4ef66.tar.xz |
gitk: When a commit contains a note, mark it with a yellow box
It is desirable to see at a glance which commits do contain notes.
Therefore mark them with a yellow rectangle.
That can be suppressed with `gitk --no-notes`.
Signed-off-by: Raphael Zimmerer <killekulla@rdrz.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rwxr-xr-x | gitk | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1671,8 +1671,9 @@ proc parsecommit {id contents listed} { } set comment $newcomment } + set hasnote [string first "\nNotes:\n" $contents] set commitinfo($id) [list $headline $auname $audate \ - $comname $comdate $comment] + $comname $comdate $comment $hasnote] } proc getcommit {id} { @@ -5896,6 +5897,9 @@ proc drawcmittext {id row col} { || [info exists idotherrefs($id)]} { set xt [drawtags $id $x $xt $y] } + if {[lindex $commitinfo($id) 6] > 0} { + set xt [drawnotesign $xt $y] + } set headline [lindex $commitinfo($id) 0] set name [lindex $commitinfo($id) 1] set date [lindex $commitinfo($id) 2] @@ -6342,6 +6346,17 @@ proc drawtags {id x xt y1} { return $xt } +proc drawnotesign {xt y} { + global linespc canv fgcolor + + set orad [expr {$linespc / 3}] + set t [$canv create rectangle [expr {$xt - $orad}] [expr {$y - $orad}] \ + [expr {$xt + $orad - 1}] [expr {$y + $orad - 1}] \ + -fill yellow -outline $fgcolor -width 1 -tags circle] + set xt [expr {$xt + $orad * 3}] + return $xt +} + proc xcoord {i level ln} { global canvx0 xspc1 xspc2 |