From: Andrew Janke <floss@apjanke.net>
To: git@vger.kernel.org
Subject: gitk: "lime" color incompatible with older Tk versions
Date: Sun, 1 May 2016 13:03:50 -0400 [thread overview]
Message-ID: <03babaa1-9011-0010-c4b3-6cad8109d3ab@apjanke.net> (raw)
Hi, git folks,
I'm having trouble running gitk on Mac OS X 10.9.5. The gitk program
uses the color "lime", which is not present in older versions of Tk,
apparently including the Tk 8.5 which ships with 10.9.
When I try to launch it, I get this error.
|$ gitk Error in startup script: unknown color name "lime" (processing
"-fore" option) invoked from within "$ctext tag conf m2 -fore [lindex
$mergecolors 2]" (procedure "makewindow" line 347) invoked from within
"makewindow" (file "/usr/local/bin/gitk" line 12434)|
This compatibility problem was noted before back in 2012, in
http://www.mail-archive.com/git%40vger.kernel.org/msg14496.html.
Would you consider switching from lime to a hex value color, for
compatibility with users of older versions of Tk? A patch to do so is
below; only the file gitk-git/gitk needs to be changed.
Cheers,
Andrew Janke
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 805a1c7..db5560d 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -2265,7 +2265,7 @@ proc makewindow {} {
set h [expr {[font metrics uifont -linespace] + 2}]
set progresscanv .tf.bar.progress
canvas $progresscanv -relief sunken -height $h -borderwidth 2
- set progressitem [$progresscanv create rect -1 0 0 $h -fill lime]
+ set progressitem [$progresscanv create rect -1 0 0 $h -fill "#99FF00"]
set fprogitem [$progresscanv create rect -1 0 0 $h -fill yellow]
set rprogitem [$progresscanv create rect -1 0 0 $h -fill red]
}
@@ -3397,7 +3397,7 @@ set rectmask {
0x00, 0x00, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f,
0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0xfc, 0x0f, 0x00, 0x00};
}
-image create bitmap reficon-H -background black -foreground lime \
+image create bitmap reficon-H -background black -foreground "#99FF00" \
-data $rectdata -maskdata $rectmask
image create bitmap reficon-o -background black -foreground "#ddddff" \
-data $rectdata -maskdata $rectmask
@@ -12188,7 +12188,7 @@ if {[tk windowingsystem] eq "aqua"} {
set extdifftool "meld"
}
-set colors {lime red blue magenta darkgrey brown orange}
+set colors {"#99FF00" red blue magenta darkgrey brown orange}
if {[tk windowingsystem] eq "win32"} {
set uicolor SystemButtonFace
set uifgcolor SystemButtonText
@@ -12206,12 +12206,12 @@ if {[tk windowingsystem] eq "win32"} {
}
set diffcolors {red "#00a000" blue}
set diffcontext 3
-set mergecolors {red blue lime purple brown "#009090" magenta "#808000"
"#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0" "#f0b070" "#ff70b0"}
+set mergecolors {red blue "#99FF00" purple brown "#009090" magenta
"#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0"
"#f0b070" "#ff70b0"}
set ignorespace 0
set worddiff ""
set markbgcolor "#e0e0ff"
-set headbgcolor lime
+set headbgcolor "#99FF00"
set headfgcolor black
set headoutlinecolor black
set remotebgcolor #ffddaa
@@ -12226,7 +12226,7 @@ set linehoverfgcolor black
set linehoveroutlinecolor black
set mainheadcirclecolor yellow
set workingfilescirclecolor red
-set indexcirclecolor lime
+set indexcirclecolor "#99FF00"
set circlecolors {white blue gray blue blue}
set linkfgcolor blue
set circleoutlinecolor $fgcolor
next reply other threads:[~2016-05-01 17:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 17:03 Andrew Janke [this message]
2016-05-02 16:20 ` gitk: "lime" color incompatible with older Tk versions Stefan Beller
2017-01-13 11:20 ` David Aguilar
2017-01-14 8:48 ` gitk pull request // was: " David Aguilar
2017-01-15 2:35 ` Junio C Hamano
2017-01-16 3:17 ` Paul Mackerras
2017-01-16 7:48 ` Junio C Hamano
2017-01-17 18:34 ` Junio C Hamano
2017-01-18 3:52 ` [PATCH] gitk: remove translated message from comments David Aguilar
2017-01-18 10:15 ` Paul Mackerras
2017-01-18 18:27 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03babaa1-9011-0010-c4b3-6cad8109d3ab@apjanke.net \
--to=floss@apjanke.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).