##// END OF EJS Templates
hgk: display bookmarks as gray labels in the commitline
David Soria Parra -
r13462:8641cb09 stable
parent child Browse files
Show More
@@ -1156,17 +1156,22 b' proc drawcommitline {level} {'
1156 }
1156 }
1157
1157
1158 proc drawtags {id x xt y1} {
1158 proc drawtags {id x xt y1} {
1159 global idtags idheads idotherrefs commitinfo
1159 global bookmarkcurrent idtags idbookmarks idheads idotherrefs commitinfo
1160 global linespc lthickness
1160 global linespc lthickness
1161 global canv mainfont idline rowtextx
1161 global canv mainfont idline rowtextx
1162
1162
1163 set marks {}
1163 set marks {}
1164 set nbookmarks 0
1164 set ntags 0
1165 set ntags 0
1165 set nheads 0
1166 set nheads 0
1166 if {[info exists idtags($id)]} {
1167 if {[info exists idtags($id)]} {
1167 set marks $idtags($id)
1168 set marks $idtags($id)
1168 set ntags [llength $marks]
1169 set ntags [llength $marks]
1169 }
1170 }
1171 if {[info exists idbookmarks($id)]} {
1172 set marks [concat $marks $idbookmarks($id)]
1173 set nbookmarks [llength $idbookmarks($id)]
1174 }
1170 if {[info exists idheads($id)]} {
1175 if {[info exists idheads($id)]} {
1171 set headmark [lindex $commitinfo($id) 7]
1176 set headmark [lindex $commitinfo($id) 7]
1172 if {$headmark ne "default"} {
1177 if {$headmark ne "default"} {
@@ -1174,9 +1179,6 b' proc drawtags {id x xt y1} {'
1174 set nheads 1
1179 set nheads 1
1175 }
1180 }
1176 }
1181 }
1177 if {[info exists idotherrefs($id)]} {
1178 set marks [concat $marks $idotherrefs($id)]
1179 }
1180 if {$marks eq {}} {
1182 if {$marks eq {}} {
1181 return $xt
1183 return $xt
1182 }
1184 }
@@ -1205,16 +1207,25 b' proc drawtags {id x xt y1} {'
1205 -width 1 -outline black -fill yellow -tags tag.$id]
1207 -width 1 -outline black -fill yellow -tags tag.$id]
1206 $canv bind $t <1> [list showtag $tag 1]
1208 $canv bind $t <1> [list showtag $tag 1]
1207 set rowtextx($idline($id)) [expr {$xr + $linespc}]
1209 set rowtextx($idline($id)) [expr {$xr + $linespc}]
1208 } else {
1210 } elseif {[incr nbookmarks -1] >= 0} {
1209 # draw a head or other ref
1211 # draw a tag
1210 if {[incr nheads -1] >= 0} {
1212 set col gray50
1211 set col green
1213 if {[string compare $bookmarkcurrent $tag] == 0} {
1212 } else {
1214 set col gray
1213 set col "#ddddff"
1215 }
1214 }
1216 set xl [expr $xl - $delta/2]
1215 set xl [expr $xl - $delta/2]
1217 $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \
1216 $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \
1218 -width 1 -outline black -fill $col -tags tag.$id
1217 -width 1 -outline black -fill $col -tags tag.$id
1219 } else {
1220 # draw a head or other ref
1221 if {[incr nheads -1] >= 0} {
1222 set col green
1223 } else {
1224 set col "#ddddff"
1225 }
1226 set xl [expr $xl - $delta/2]
1227 $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \
1228 -width 1 -outline black -fill $col -tags tag.$id
1218 }
1229 }
1219 set t [$canv create text $xl $y1 -anchor w -text $tag \
1230 set t [$canv create text $xl $y1 -anchor w -text $tag \
1220 -font $mainfont -tags tag.$id]
1231 -font $mainfont -tags tag.$id]
General Comments 0
You need to be logged in to leave comments. Login now