{"thread":{"id":"12879","subject":"[PATCH] tcl/tk8.5: fix changing colors through Edit->Preferences","startedAt":"2008-03-26T18:45:26Z","lastAt":"2008-04-06T03:09:57Z","messageCount":3,"participants":["Gerrit Pape","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"73151","messageId":"20080326184526.2240.qmail@b31b9595cabb35.315fe32.mid.smarden.org","threadId":"12879","inReplyTo":null,"subject":"[PATCH] tcl/tk8.5: fix changing colors through Edit->Preferences","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2008-03-26T18:45:26Z","receivedAt":"2008-03-26T18:45:26Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"With tcl/tk8.5 the lset command seems to behave differently.  When\nchanging the background color through Edit->Preferences, the changes\nare applied, but new dialogs, such as View->New view... barf with\n\n Error: unknown color name \"{#ffffff}\"\n\nAdditionally when closing gitk, and starting it up again, a bad value\nhas been saved to ~/.gitk, preventing gitk from running properly; it\nfails with\n\n Error in startup script: unknown color name \"{#ffffff}\"\n ...\n\nThis commit changes the color dialogs to not handle variables containing\njust a single color value as tcl lists, which fixes the issue.  Tested\nwith tcl/tk8.4 and 8.5.\n\nDmitry Potapov reported this problem through\n http://bugs.debian.org/472615\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n gitk |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 84ab02e..9a4d9c4 100755\n--- a/gitk\n+++ b/gitk\n@@ -8045,11 +8045,11 @@ proc doprefs {} {\n     grid $top.cdisp - -sticky w -pady 10\n     label $top.bg -padx 40 -relief sunk -background $bgcolor\n     button $top.bgbut -text [mc \"Background\"] -font optionfont \\\n-\t-command [list choosecolor bgcolor 0 $top.bg background setbg]\n+\t-command [list choosecolor bgcolor {} $top.bg background setbg]\n     grid x $top.bgbut $top.bg -sticky w\n     label $top.fg -padx 40 -relief sunk -background $fgcolor\n     button $top.fgbut -text [mc \"Foreground\"] -font optionfont \\\n-\t-command [list choosecolor fgcolor 0 $top.fg foreground setfg]\n+\t-command [list choosecolor fgcolor {} $top.fg foreground setfg]\n     grid x $top.fgbut $top.fg -sticky w\n     label $top.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]\n     button $top.diffoldbut -text [mc \"Diff: old lines\"] -font optionfont \\\n@@ -8069,7 +8069,7 @@ proc doprefs {} {\n     grid x $top.hunksepbut $top.hunksep -sticky w\n     label $top.selbgsep -padx 40 -relief sunk -background $selectbgcolor\n     button $top.selbgbut -text [mc \"Select bg\"] -font optionfont \\\n-\t-command [list choosecolor selectbgcolor 0 $top.selbgsep background setselbg]\n+\t-command [list choosecolor selectbgcolor {} $top.selbgsep background setselbg]\n     grid x $top.selbgbut $top.selbgsep -sticky w\n \n     label $top.cfont -text [mc \"Fonts: press to choose\"]\n-- \n1.5.4.4\n"},{"id":"73700","messageId":"20080405163842.29563.qmail@4e504c5c8f9cc2.315fe32.mid.smarden.org","threadId":"12879","inReplyTo":"20080326184526.2240.qmail@b31b9595cabb35.315fe32.mid.smarden.org","subject":"Re: [PATCH] tcl/tk8.5: fix changing colors through Edit->Preferences","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2008-04-05T16:38:42Z","receivedAt":"2008-04-05T16:38:42Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"On Wed, Mar 26, 2008 at 06:45:26PM +0000, Gerrit Pape wrote:\n> With tcl/tk8.5 the lset command seems to behave differently.  When\n> changing the background color through Edit->Preferences, the changes\n> are applied, but new dialogs, such as View->New view... barf with\n> \n>  Error: unknown color name \"{#ffffff}\"\n> \n> Additionally when closing gitk, and starting it up again, a bad value\n> has been saved to ~/.gitk, preventing gitk from running properly; it\n> fails with\n> \n>  Error in startup script: unknown color name \"{#ffffff}\"\n>  ...\n> \n> This commit changes the color dialogs to not handle variables containing\n> just a single color value as tcl lists, which fixes the issue.  Tested\n> with tcl/tk8.4 and 8.5.\n> \n> Dmitry Potapov reported this problem through\n>  http://bugs.debian.org/472615\n\nHi, any comments on this patch?  I can reproduce the problem on Debian\nwith tcl/tk 8.5.1 and git 1.5.5.rc3.\n\nThanks, Gerrit.\n"},{"id":"73732","messageId":"18424.16133.146077.411566@cargo.ozlabs.ibm.com","threadId":"12879","inReplyTo":"20080405163842.29563.qmail@4e504c5c8f9cc2.315fe32.mid.smarden.org","subject":"Re: [PATCH] tcl/tk8.5: fix changing colors through Edit->Preferences","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2008-04-06T03:09:57Z","receivedAt":"2008-04-06T03:09:57Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Gerrit Pape writes:\n\n> Hi, any comments on this patch?  I can reproduce the problem on Debian\n> with tcl/tk 8.5.1 and git 1.5.5.rc3.\n\nThanks for reminding me.  I have applied it.\n\nPaul.\n"}]}