{"thread":{"id":"30099","subject":"gitk: Failure of new tabbed preferences dialog","startedAt":"2012-03-29T17:31:29Z","lastAt":"2012-04-03T16:53:29Z","messageCount":8,"participants":["Ramsay Jones","Pat Thoyts","Junio C Hamano","Paul Mackerras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"188086","messageId":"4F749C71.7050201@ramsay1.demon.co.uk","threadId":"30099","inReplyTo":null,"subject":"gitk: Failure of new tabbed preferences dialog","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-03-29T17:31:29Z","receivedAt":"2012-03-29T17:31:29Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Hi Pat,\n\nI just tried the new gitk (master @fae9d76) and, since I don't have\nthemed widgets, the preferences menu item uses the emulated tabbed\ndialog code, which fails like so:\n\n    can't read \"col\": no such variable\n    can't read \"col\": no such variable\n        (reading value of variable to increment)\n        invoked from within\n    \"incr col\"\n        (procedure \"doprefs\" line 36)\n        invoked from within\n    \"doprefs\"\n        (menu invoke)\n\nI tried the following (maybe *too* obvious) fix:\n\n-- >8 --\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex 651b740..68cd1a1 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -11012,6 +11012,7 @@ proc doprefs {} {\n     lappend pages [prefspage_general $notebook] [mc \"General\"]\n     lappend pages [prefspage_colors $notebook] [mc \"Colors\"]\n     lappend pages [prefspage_fonts $notebook] [mc \"Fonts\"]\n+    set col 0\n     foreach {page title} $pages {\n \tif {$use_notebook} {\n \t    $notebook add $page -text $title\n-- 8< --\n\nwhich seems to work.\n\nHTH\n\nATB,\nRamsay Jones\n"},{"id":"188289","messageId":"1333317652-1464-1-git-send-email-patthoyts@users.sourceforge.net","threadId":"30099","inReplyTo":"4F749C71.7050201@ramsay1.demon.co.uk","subject":"Re: gitk: Failure of new tabbed preferences dialog","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2012-04-01T22:00:50Z","receivedAt":"2012-04-01T22:00:50Z","isPatch":false,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"\n> I just tried the new gitk (master @fae9d76) and, since I don't have\n> themed widgets, the preferences menu item uses the emulated tabbed\n> dialog code, which fails like so:\n>\n>     can't read \"col\": no such variable\n>\n\nThe issue here is that the incr command has changed between tcl 8.4\nand 8.5 and in more recent versions automatically creates the named\nvariable if it did not exist. The fix you suggest is correct. I've\nalso included another that I realised had been applied to msysGit and\nwas not posted upstream.\n\nPat Thoyts.\n"},{"id":"188284","messageId":"1333317652-1464-2-git-send-email-patthoyts@users.sourceforge.net","threadId":"30099","inReplyTo":"1333317652-1464-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 1/2] gitk: fix tabbed preferences construction when using tcl 8.4","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2012-04-01T22:00:51Z","receivedAt":"2012-04-01T22:00:51Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"In 8.5 the incr command creates the target variable if it does not exist\nbut in 8.4 using incr on a non-existing variable raises an error. Ensure\nwe have created our counter variable when creating the tabbed dialog for\nnon-themed preferences.\n\nReported-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n gitk |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 651b740..68cd1a1 100755\n--- a/gitk\n+++ b/gitk\n@@ -11012,6 +11012,7 @@ proc doprefs {} {\n     lappend pages [prefspage_general $notebook] [mc \"General\"]\n     lappend pages [prefspage_colors $notebook] [mc \"Colors\"]\n     lappend pages [prefspage_fonts $notebook] [mc \"Fonts\"]\n+    set col 0\n     foreach {page title} $pages {\n \tif {$use_notebook} {\n \t    $notebook add $page -text $title\n-- \n1.7.9.msysgit.0\n"},{"id":"188285","messageId":"1333317652-1464-3-git-send-email-patthoyts@users.sourceforge.net","threadId":"30099","inReplyTo":"1333317652-1464-1-git-send-email-patthoyts@users.sourceforge.net","subject":"[PATCH 2/2] gitk: fix setting font display with new tabbed dialog layout.","fromName":"Pat Thoyts","fromEmail":"patthoyts@users.sourceforge.net","sentAt":"2012-04-01T22:00:52Z","receivedAt":"2012-04-01T22:00:52Z","isPatch":true,"sender":{"key":"patthoyts@users.sourceforge.net","avatar":"https://avatars.githubusercontent.com/u/30739?v=4"},"body":"The changes to the dialog window tree broke the preview of the selected\nfont on the button. This corrects that issue.\n\nSigned-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>\n---\n gitk |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 68cd1a1..22270ce 100755\n--- a/gitk\n+++ b/gitk\n@@ -10795,7 +10795,7 @@ proc fontok {} {\n     if {$fontparam(slant) eq \"italic\"} {\n \tlappend fontpref($f) \"italic\"\n     }\n-    set w $prefstop.$f\n+    set w $prefstop.notebook.fonts.$f\n     $w conf -text $fontparam(family) -font $fontpref($f)\n \n     fontcan\n-- \n1.7.9.msysgit.0\n"},{"id":"188321","messageId":"7vty12gl8r.fsf@alter.siamese.dyndns.org","threadId":"30099","inReplyTo":"1333317652-1464-1-git-send-email-patthoyts@users.sourceforge.net","subject":"Re: gitk: Failure of new tabbed preferences dialog","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-02T16:19:00Z","receivedAt":"2012-04-02T16:19:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n\n>> I just tried the new gitk (master @fae9d76) and, since I don't have\n>> themed widgets, the preferences menu item uses the emulated tabbed\n>> dialog code, which fails like so:\n>>\n>>     can't read \"col\": no such variable\n>\n> The issue here is that the incr command has changed between tcl 8.4\n> and 8.5 and in more recent versions automatically creates the named\n> variable if it did not exist. The fix you suggest is correct. I've\n> also included another that I realised had been applied to msysGit and\n> was not posted upstream.\n\nThis seems severe enough that we should put it in the coming release.\nI can queue them directory to gitk tree (and later ask Paul to pull it\nfrom me), and merge the result to expedite the roundtrip.\n"},{"id":"188359","messageId":"7vzkatdc51.fsf@alter.siamese.dyndns.org","threadId":"30099","inReplyTo":"7vty12gl8r.fsf@alter.siamese.dyndns.org","subject":"Re: gitk: Failure of new tabbed preferences dialog","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-02T22:03:54Z","receivedAt":"2012-04-02T22:03:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul, Ramsay and Pat noticed and fixed two buglets that made the \"Font\"\nsetting dialog unusable in the version in 1.7.10-rc3.  I've queued the\nfixes below, tested them (before and after applying the patches) locally.\n\nI would like to merge them and tag 1.7.10-rc4 tonight.\n\nIn order to keep us in sync, could you please pull back from me?  The\nbranch \"pt/gitk\" corresponds to your repository (i.e. without the rest of\ngit.git, and gitk-git/Makefile as the top-level Makefile).\n\nThanks.\n\n-- -- --\n\nThe following changes since commit b2b76d10696d945bf19318831b64d009d119e051:\n\n  gitk: Teach gitk to respect log.showroot (2012-03-24 16:44:12 +1100)\n\nare available in the git repository at:\n\n  git://github.com/gitster/git.git pt/gitk\n\nfor you to fetch changes up to 39ddf99c1db8b230ec7bdefc6ce3c769d1cf4ab6:\n\n  gitk: fix setting font display with new tabbed dialog layout. (2012-04-02 10:21:10 -0700)\n\n----------------------------------------------------------------\nPat Thoyts (2):\n      gitk: fix tabbed preferences construction when using tcl 8.4\n      gitk: fix setting font display with new tabbed dialog layout.\n\n gitk |    3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex 651b740..22270ce 100755\n--- a/gitk\n+++ b/gitk\n@@ -10795,7 +10795,7 @@ proc fontok {} {\n     if {$fontparam(slant) eq \"italic\"} {\n \tlappend fontpref($f) \"italic\"\n     }\n-    set w $prefstop.$f\n+    set w $prefstop.notebook.fonts.$f\n     $w conf -text $fontparam(family) -font $fontpref($f)\n \n     fontcan\n@@ -11012,6 +11012,7 @@ proc doprefs {} {\n     lappend pages [prefspage_general $notebook] [mc \"General\"]\n     lappend pages [prefspage_colors $notebook] [mc \"Colors\"]\n     lappend pages [prefspage_fonts $notebook] [mc \"Fonts\"]\n+    set col 0\n     foreach {page title} $pages {\n \tif {$use_notebook} {\n \t    $notebook add $page -text $title\n"},{"id":"188406","messageId":"20120403121944.GC24141@bloggs.ozlabs.ibm.com","threadId":"30099","inReplyTo":"7vty12gl8r.fsf@alter.siamese.dyndns.org","subject":"Re: gitk: Failure of new tabbed preferences dialog","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2012-04-03T12:19:45Z","receivedAt":"2012-04-03T12:19:45Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Mon, Apr 02, 2012 at 09:19:00AM -0700, Junio C Hamano wrote:\n> Pat Thoyts <patthoyts@users.sourceforge.net> writes:\n> \n> >> I just tried the new gitk (master @fae9d76) and, since I don't have\n> >> themed widgets, the preferences menu item uses the emulated tabbed\n> >> dialog code, which fails like so:\n> >>\n> >>     can't read \"col\": no such variable\n> >\n> > The issue here is that the incr command has changed between tcl 8.4\n> > and 8.5 and in more recent versions automatically creates the named\n> > variable if it did not exist. The fix you suggest is correct. I've\n> > also included another that I realised had been applied to msysGit and\n> > was not posted upstream.\n> \n> This seems severe enough that we should put it in the coming release.\n> I can queue them directory to gitk tree (and later ask Paul to pull it\n> from me), and merge the result to expedite the roundtrip.\n\nOK; the patches look fine to me.  If that's what you're doing, I won't\napply them to my tree, to avoid duplication.\n\nPaul.\n"},{"id":"188420","messageId":"7vaa2sdaeu.fsf@alter.siamese.dyndns.org","threadId":"30099","inReplyTo":"20120403121944.GC24141@bloggs.ozlabs.ibm.com","subject":"Re: gitk: Failure of new tabbed preferences dialog","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-04-03T16:53:29Z","receivedAt":"2012-04-03T16:53:29Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> On Mon, Apr 02, 2012 at 09:19:00AM -0700, Junio C Hamano wrote:\n>> \n>> This seems severe enough that we should put it in the coming release.\n>> I can queue them directory to gitk tree (and later ask Paul to pull it\n>> from me), and merge the result to expedite the roundtrip.\n>\n> OK; the patches look fine to me.  If that's what you're doing, I won't\n> apply them to my tree, to avoid duplication.\n\nThanks.\n"}]}