gitk: Use right colour for remote refs in the "Tags and heads" dialog

Makes it easier to see which refs are local and which refs are remote. Adds consistency with the remote background colour in the graph display. Signed-off-by: Paul Wise <pabs3@bonedaddy.net> Signed-off-by: Paul Mackerras <paulus@ozlabs.org>

Paul Wise committed Mar 21, 2019 at 15:05 UTC d7cc4fb0018e247cb5a05cbe55057bc70d3455af
1 file changed +8 -1
gitk
+8 -1
@@ -3404,6 +3404,8 @@ set rectmask {
3404 }
3405 image create bitmap reficon-H -background black -foreground "#00ff00" \
3406 -data $rectdata -maskdata $rectmask
3407 +image create bitmap reficon-R -background black -foreground "#ffddaa" \
3408 + -data $rectdata -maskdata $rectmask
3409 image create bitmap reficon-o -background black -foreground "#ddddff" \
3410 -data $rectdata -maskdata $rectmask
3411
@@ -10057,6 +10059,7 @@ proc sel_reflist {w x y} {
10059 set n [lindex $ref 0]
10060 switch -- [lindex $ref 1] {
10061 "H" {selbyid $headids($n)}
10062 + "R" {selbyid $headids($n)}
10063 "T" {selbyid $tagids($n)}
10064 "o" {selbyid $otherrefids($n)}
10065 }
@@ -10086,7 +10089,11 @@ proc refill_reflist {} {
10089 foreach n [array names headids] {
10090 if {[string match $reflistfilter $n]} {
10091 if {[commitinview $headids($n) $curview]} {
10089 - lappend refs [list $n H]
10092 + if {[string match "remotes/*" $n]} {
10093 + lappend refs [list $n R]
10094 + } else {
10095 + lappend refs [list $n H]
10096 + }
10097 } else {
10098 interestedin $headids($n) {run refill_reflist}
10099 }