Skip to contentSkip to conversation

gitk: "lime" color incompatible with older Tk versions

PATCH Applied Andrew Janke 5 participants 11 messages Jun 16, 2016 – Jan 18, 2017

lore
Share & tools
lore
#0 lore 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

gitk-git/gitk +6 -6
index 805a1c7..db5560d 100755
@@ -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
#1 lore raw

+ Paul Mackerras, who maintains gitk

Quoted 87 lines · Andrew Janke

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

gitk-git/gitk +4 -4
index 805a1c7..db5560d 100755
@@ -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"

gitk-git/gitk +2 -3
-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
 
--

To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 8 lines · Stefan Beller

+ Paul Mackerras, who maintains gitk

Quoted 5 lines · Andrew Janke

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.

Ping.. it would be nice to get this patch applied.
I can verify that gitk on Mac OS X 10.11 also has this problem. gitk is usually pretty good about backwards-compatibility.

Quoted 6 lines
Quoted 6 lines

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.

I can recreate and resend this patch if needed; it's simply:
:%s/lime/"#99FF00"/g

Would a re-roll of this patch be accepted, or is it not worth bothering?

Google for "gitk lime" to get a taste for some of the fallout caused by this problem.

The fact that multiple pages, with different OS's, have examples of users stumbling over this change is a good hint that it's worth fixing.

Thoughts?

Signature · 1 line
David
#3 lore raw

gitk pull request // was: Re: gitk: "lime" color incompatible with older Tk versions

Quoted 2 lines · David Aguilar

Ping.. it would be nice to get this patch applied.

Sorry for the noise, and thank you Paul for the fix. This was already fixed by Paul in gitk@22a713c72df.

I'm sure Junio will merge gitk.git into git.git soon enough so I can sit tight until then, but while I'm here I might as well send out a pull request:

The following changes since commit 22a713c72df8b6799c59287c50cee44c4a6db51e:

gitk: Follow themed bgcolor in help dialogs (2016-03-19 14:12:21 +1100)

are available in the git repository at:

git://ozlabs.org/~paulus/gitk.git

for you to fetch changes up to fbf426478e540f4737860dae622603cc0daba3d2:

gitk: Update copyright notice to 2016 (2016-12-12 20:46:42 +1100)

----------------------------------------------------------------
Markus Hitter (3):
gitk: Turn off undo manager in the text widget
gitk: Remove closed file descriptors from $blobdifffd
gitk: Clear array 'commitinfo' on reload

Paul Mackerras (2):
gitk: Use explicit RGB green instead of "lime"
gitk: Update copyright notice to 2016

Rogier Goossens (3):
gitk: Add a 'rename' option to the branch context menu
gitk: Allow checking out a remote branch
gitk: Include commit title in branch dialog

Satoshi Yasushima (1):
gitk: Fix Japanese translation for "marked commit"

Stefan Dotterweich (1):
gitk: Fix missing commits when using -S or -G

Vasco Almeida (2):
gitk: Makefile: create install bin directory
gitk: Add Portuguese translation

 Makefile    |    1 +
 gitk        |  166 +++++--
 po/bg.po    |    4 +-
 po/ca.po    |    6 +-
 po/de.po    |    4 +-
 po/es.po    |    4 +-
 po/fr.po    |    4 +-
 po/hu.po    |    4 +-
 po/it.po    |    4 +-
 po/ja.po    |   13 +-
 po/pt_br.po |    4 +-
 po/pt_pt.po | 1376 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 po/ru.po    |    4 +-
 po/sv.po    |    8 +-
 po/vi.po    |    4 +-
 15 files changed, 1549 insertions(+), 57 deletions(-)
 create mode 100644 po/pt_pt.po

Thanks,

Signature · 1 line
David
#4 lore raw

Re: gitk pull request // was: Re: gitk: "lime" color incompatible with older Tk versions

Quoted 15 lines · David Aguilar
Quoted 2 lines · David Aguilar

Ping.. it would be nice to get this patch applied.

Sorry for the noise, and thank you Paul for the fix. This was already fixed by Paul in gitk@22a713c72df.

I'm sure Junio will merge gitk.git into git.git soon enough so I can sit tight until then, but while I'm here I might as well send out a pull request:

The following changes since commit 22a713c72df8b6799c59287c50cee44c4a6db51e:

gitk: Follow themed bgcolor in help dialogs (2016-03-19 14:12:21 +1100)

Quoted 7 lines

are available in the git repository at:

git://ozlabs.org/~paulus/gitk.git

for you to fetch changes up to fbf426478e540f4737860dae622603cc0daba3d2:

gitk: Update copyright notice to 2016 (2016-12-12 20:46:42 +1100)

Pinging Paul to signal me that his tree is ready to pull from is appreciated, and asking Paul if his tree is ready to be pulled and then relaying his answer to me is also fine, but I am sensing that this message is neither. So let me double check.

Paul, is it a good time to pull, or do you still have something not published yet that should go together with what you have already queued?

Thanks.

Quoted 45 lines

----------------------------------------------------------------
Markus Hitter (3):
gitk: Turn off undo manager in the text widget
gitk: Remove closed file descriptors from $blobdifffd
gitk: Clear array 'commitinfo' on reload

Paul Mackerras (2):
gitk: Use explicit RGB green instead of "lime"
gitk: Update copyright notice to 2016

Rogier Goossens (3):
gitk: Add a 'rename' option to the branch context menu
gitk: Allow checking out a remote branch
gitk: Include commit title in branch dialog

Satoshi Yasushima (1):
gitk: Fix Japanese translation for "marked commit"

Stefan Dotterweich (1):
gitk: Fix missing commits when using -S or -G

Vasco Almeida (2):
gitk: Makefile: create install bin directory
gitk: Add Portuguese translation

 Makefile    |    1 +
 gitk        |  166 +++++--
 po/bg.po    |    4 +-
 po/ca.po    |    6 +-
 po/de.po    |    4 +-
 po/es.po    |    4 +-
 po/fr.po    |    4 +-
 po/hu.po    |    4 +-
 po/it.po    |    4 +-
 po/ja.po    |   13 +-
 po/pt_br.po |    4 +-
 po/pt_pt.po | 1376 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 po/ru.po    |    4 +-
 po/sv.po    |    8 +-
 po/vi.po    |    4 +-
 15 files changed, 1549 insertions(+), 57 deletions(-)
 create mode 100644 po/pt_pt.po

Thanks,

#5 lore raw

Re: gitk pull request // was: Re: gitk: "lime" color incompatible with older Tk versions

Hi Junio,

Quoted 25 lines · Junio C Hamano
Quoted 15 lines · David Aguilar
Quoted 2 lines · David Aguilar

Ping.. it would be nice to get this patch applied.

Sorry for the noise, and thank you Paul for the fix. This was already fixed by Paul in gitk@22a713c72df.

I'm sure Junio will merge gitk.git into git.git soon enough so I can sit tight until then, but while I'm here I might as well send out a pull request:

The following changes since commit 22a713c72df8b6799c59287c50cee44c4a6db51e:

gitk: Follow themed bgcolor in help dialogs (2016-03-19 14:12:21 +1100)

Quoted 7 lines

are available in the git repository at:

git://ozlabs.org/~paulus/gitk.git

for you to fetch changes up to fbf426478e540f4737860dae622603cc0daba3d2:

gitk: Update copyright notice to 2016 (2016-12-12 20:46:42 +1100)

Quoted 8 lines

Pinging Paul to signal me that his tree is ready to pull from is appreciated, and asking Paul if his tree is ready to be pulled and then relaying his answer to me is also fine, but I am sensing that this message is neither. So let me double check.

Paul, is it a good time to pull, or do you still have something not published yet that should go together with what you have already queued?

I recently pushed out one more commit to update the Russian translation from Dimitriy Ryazantcev. The head is now 8fef3f36b779. I have a couple more series that I am currently reviewing, but nothing immediately ready to publish. It would be a good time for you to do a pull, since the "lime" color fix and the memory consumption fixes should be helpful for a lot of people.

Thanks,
Paul.

#6 lore raw

Re: gitk pull request // was: Re: gitk: "lime" color incompatible with older Tk versions

Quoted 10 lines · Paul Mackerras
Quoted 3 lines

Paul, is it a good time to pull, or do you still have something not published yet that should go together with what you have already queued?

I recently pushed out one more commit to update the Russian translation from Dimitriy Ryazantcev. The head is now 8fef3f36b779. I have a couple more series that I am currently reviewing, but nothing immediately ready to publish. It would be a good time for you to do a pull, since the "lime" color fix and the memory consumption fixes should be helpful for a lot of people.

Thanks. I did want to get the memory consumption fix sooner rather than later, and this is very much appreciated.

Pulled.

#7 lore raw

Re: gitk pull request // was: Re: gitk: "lime" color incompatible with older Tk versions

Quoted 13 lines · Junio C Hamano
Quoted 10 lines · Paul Mackerras
Quoted 3 lines

Paul, is it a good time to pull, or do you still have something not published yet that should go together with what you have already queued?

I recently pushed out one more commit to update the Russian translation from Dimitriy Ryazantcev. The head is now 8fef3f36b779. I have a couple more series that I am currently reviewing, but nothing immediately ready to publish. It would be a good time for you to do a pull, since the "lime" color fix and the memory consumption fixes should be helpful for a lot of people.

Quoted 4 lines

Thanks. I did want to get the memory consumption fix sooner rather than later, and this is very much appreciated.

Pulled.

Hmph. I am getting these:

SUBDIR gitk-git
Generating catalog po/sv.msg
msgfmt --statistics --tcl po/sv.po -l sv -d po/ po/sv.po:1388: duplicate message definition... po/sv.po:380: ...this is the location of the first definition
msgfmt: found 1 fatal error
make[1]: *** [po/sv.msg] Error 1
make: *** [all] Error 2

Anybody else see this?

#8 lore raw

PATCH 1/1 gitk: remove translated message from comments

"make update-po" fails because a previously untranslated string has now been translated:

Updating po/sv.po
po/sv.po:1388: duplicate message definition... po/sv.po:380: ...this is the location of the first definition

Remove the duplicate message definition.

---
 po/sv.po | 15 ---------------
 1 file changed, 15 deletions(-)
po/sv.po +0 -15
index 32fc752..2a06fe5 100644
@@ -1385,21 +1385,6 @@ msgstr "Felaktiga argument till gitk:"
 #~ msgid "mc"
 #~ msgstr "mc"
 
-#~ msgid ""
-#~ "\n"
-#~ "Gitk - a commit viewer for git\n"
-#~ "\n"
-#~ "Copyright © 2005-2016 Paul Mackerras\n"
-#~ "\n"
-#~ "Use and redistribute under the terms of the GNU General Public License"
-#~ msgstr ""
-#~ "\n"
-#~ "Gitk - en incheckningsvisare för git\n"
-#~ "\n"
-#~ "Copyright © 2005-2016 Paul Mackerras\n"
-#~ "\n"
-#~ "Använd och vidareförmedla enligt villkoren i GNU General Public License"
-
 #~ msgid "next"
 #~ msgstr "nästa"
 
Signature · 1 line
2.11.0.536.gaf746e49c2
#9 lore raw

Re: [PATCH] gitk: remove translated message from comments

Quoted 11 lines · David Aguilar

"make update-po" fails because a previously untranslated string has now been translated:

Updating po/sv.po
po/sv.po:1388: duplicate message definition... po/sv.po:380: ...this is the location of the first definition

Remove the duplicate message definition.

Thanks, applied.

Junio, please do a pull from my repository to get this fix. The new head is 7f03c6e32891.

Paul.

#10 lore raw

Re: [PATCH] gitk: remove translated message from comments

Quoted 10 lines · Paul Mackerras
Quoted 9 lines · David Aguilar

"make update-po" fails because a previously untranslated string has now been translated:

Updating po/sv.po
po/sv.po:1388: duplicate message definition... po/sv.po:380: ...this is the location of the first definition

Remove the duplicate message definition.

Quoted 7 lines
Quoted 2 lines

Thanks, applied.

Junio, please do a pull from my repository to get this fix. The new head is 7f03c6e32891.

Thanks.