{"thread":{"id":"45420","subject":"[PATCH] gitk: use right colour for remote refs in the \"Tags and heads\" dialog","startedAt":"2017-03-18T11:40:31Z","lastAt":"2017-03-18T11:40:31Z","messageCount":1,"participants":["Paul Wise"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"314496","messageId":"20170318112528.16958-1-pabs3@bonedaddy.net","threadId":"45420","inReplyTo":null,"subject":"[PATCH] gitk: use right colour for remote refs in the \"Tags and heads\" dialog","fromName":"Paul Wise","fromEmail":"pabs3@bonedaddy.net","sentAt":"2017-03-18T11:25:28Z","receivedAt":"2017-03-18T11:40:31Z","isPatch":true,"sender":{"key":"pabs3@bonedaddy.net","avatar":"https://avatars.githubusercontent.com/u/328602?v=4"},"body":"Makes it easier to see which refs are local and which refs are remote.\nAdds consistency with the remote background colour in the graph display.\n\nSigned-off-by: Paul Wise <pabs3@bonedaddy.net>\n---\n gitk-git/gitk | 9 ++++++++-\n 1 file changed, 8 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex a14d7a16b..14aebc23e 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -3404,6 +3404,8 @@ set rectmask {\n }\n image create bitmap reficon-H -background black -foreground \"#00ff00\" \\\n     -data $rectdata -maskdata $rectmask\n+image create bitmap reficon-R -background black -foreground \"#ffddaa\" \\\n+    -data $rectdata -maskdata $rectmask\n image create bitmap reficon-o -background black -foreground \"#ddddff\" \\\n     -data $rectdata -maskdata $rectmask\n \n@@ -10022,6 +10024,7 @@ proc sel_reflist {w x y} {\n     set n [lindex $ref 0]\n     switch -- [lindex $ref 1] {\n \t\"H\" {selbyid $headids($n)}\n+\t\"R\" {selbyid $headids($n)}\n \t\"T\" {selbyid $tagids($n)}\n \t\"o\" {selbyid $otherrefids($n)}\n     }\n@@ -10051,7 +10054,11 @@ proc refill_reflist {} {\n     foreach n [array names headids] {\n \tif {[string match $reflistfilter $n]} {\n \t    if {[commitinview $headids($n) $curview]} {\n-\t\tlappend refs [list $n H]\n+\t\tif {[string match \"remotes/*\" $n]} {\n+\t\t    lappend refs [list $n R]\n+\t\t} else {\n+\t\t    lappend refs [list $n H]\n+\t\t}\n \t    } else {\n \t\tinterestedin $headids($n) {run refill_reflist}\n \t    }\n-- \n2.11.0\n\n"}]}