gitk: Failure of new tabbed preferences dialog
Hi Pat,
I just tried the new gitk (master @fae9d76) and, since I don't have themed widgets, the preferences menu item uses the emulated tabbed dialog code, which fails like so:
can't read "col": no such variable
can't read "col": no such variable
(reading value of variable to increment)
invoked from within
"incr col"
(procedure "doprefs" line 36)
invoked from within
"doprefs"
(menu invoke)
I tried the following (maybe *too* obvious) fix:
-- >8 --
gitk-git/gitk +1 -0
@@ -11012,6 +11012,7 @@ proc doprefs {} { lappend pages [prefspage_general $notebook] [mc "General"] lappend pages [prefspage_colors $notebook] [mc "Colors"] lappend pages [prefspage_fonts $notebook] [mc "Fonts"] + set col 0 foreach {page title} $pages { if {$use_notebook} { $notebook add $page -text $title
-- 8< --
which seems to work.
HTH
ATB,
Ramsay Jones
Quoted 7 lines
I just tried the new gitk (master @fae9d76) and, since I don't have themed widgets, the preferences menu item uses the emulated tabbed dialog code, which fails like so:
can't read "col": no such variable
The issue here is that the incr command has changed between tcl 8.4 and 8.5 and in more recent versions automatically creates the named variable if it did not exist. The fix you suggest is correct. I've also included another that I realised had been applied to msysGit and was not posted upstream.
Pat Thoyts.
PATCH 1/2 gitk: fix tabbed preferences construction when using tcl 8.4
In 8.5 the incr command creates the target variable if it does not exist but in 8.4 using incr on a non-existing variable raises an error. Ensure we have created our counter variable when creating the tabbed dialog for non-themed preferences.
--- gitk | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
gitk +1 -0
@@ -11012,6 +11012,7 @@ proc doprefs {} { lappend pages [prefspage_general $notebook] [mc "General"] lappend pages [prefspage_colors $notebook] [mc "Colors"] lappend pages [prefspage_fonts $notebook] [mc "Fonts"] + set col 0 foreach {page title} $pages { if {$use_notebook} { $notebook add $page -text $title
Signature · 1 line
1.7.9.msysgit.0
PATCH 2/2 gitk: fix setting font display with new tabbed dialog layout.
In reply to Pat ThoytsThe changes to the dialog window tree broke the preview of the selected font on the button. This corrects that issue.
--- gitk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
gitk +1 -1
@@ -10795,7 +10795,7 @@ proc fontok {} { if {$fontparam(slant) eq "italic"} { lappend fontpref($f) "italic" } - set w $prefstop.$f + set w $prefstop.notebook.fonts.$f $w conf -text $fontparam(family) -font $fontpref($f) fontcan
Signature · 1 line
1.7.9.msysgit.0
Quoted 11 lines · Pat Thoyts
Quoted 5 lines
I just tried the new gitk (master @fae9d76) and, since I don't have themed widgets, the preferences menu item uses the emulated tabbed dialog code, which fails like so:
can't read "col": no such variable
The issue here is that the incr command has changed between tcl 8.4 and 8.5 and in more recent versions automatically creates the named variable if it did not exist. The fix you suggest is correct. I've also included another that I realised had been applied to msysGit and was not posted upstream.
This seems severe enough that we should put it in the coming release. I can queue them directory to gitk tree (and later ask Paul to pull it from me), and merge the result to expedite the roundtrip.
Quoted 14 lines · Junio C Hamano
Quoted 11 lines · Pat Thoyts
Quoted 5 lines
I just tried the new gitk (master @fae9d76) and, since I don't have themed widgets, the preferences menu item uses the emulated tabbed dialog code, which fails like so:
can't read "col": no such variable
The issue here is that the incr command has changed between tcl 8.4 and 8.5 and in more recent versions automatically creates the named variable if it did not exist. The fix you suggest is correct. I've also included another that I realised had been applied to msysGit and was not posted upstream.
Quoted 3 lines
This seems severe enough that we should put it in the coming release. I can queue them directory to gitk tree (and later ask Paul to pull it from me), and merge the result to expedite the roundtrip.
OK; the patches look fine to me. If that's what you're doing, I won't apply them to my tree, to avoid duplication.
Paul.
Quoted 8 lines · Paul Mackerras
Quoted 4 lines · Junio C Hamano
This seems severe enough that we should put it in the coming release. I can queue them directory to gitk tree (and later ask Paul to pull it from me), and merge the result to expedite the roundtrip.
OK; the patches look fine to me. If that's what you're doing, I won't apply them to my tree, to avoid duplication.
Thanks.
Paul, Ramsay and Pat noticed and fixed two buglets that made the "Font" setting dialog unusable in the version in 1.7.10-rc3. I've queued the fixes below, tested them (before and after applying the patches) locally.
I would like to merge them and tag 1.7.10-rc4 tonight.
In order to keep us in sync, could you please pull back from me? The branch "pt/gitk" corresponds to your repository (i.e. without the rest of git.git, and gitk-git/Makefile as the top-level Makefile).
Thanks.
-- -- --
The following changes since commit b2b76d10696d945bf19318831b64d009d119e051:
gitk: Teach gitk to respect log.showroot (2012-03-24 16:44:12 +1100)
are available in the git repository at:
git://github.com/gitster/git.git pt/gitk
for you to fetch changes up to 39ddf99c1db8b230ec7bdefc6ce3c769d1cf4ab6:
gitk: fix setting font display with new tabbed dialog layout. (2012-04-02 10:21:10 -0700)
----------------------------------------------------------------
Pat Thoyts (2):
gitk: fix tabbed preferences construction when using tcl 8.4
gitk: fix setting font display with new tabbed dialog layout.
gitk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
gitk +2 -1
@@ -10795,7 +10795,7 @@ proc fontok {} { if {$fontparam(slant) eq "italic"} { lappend fontpref($f) "italic" } - set w $prefstop.$f + set w $prefstop.notebook.fonts.$f $w conf -text $fontparam(family) -font $fontpref($f) fontcan
@@ -11012,6 +11012,7 @@ proc doprefs {} { lappend pages [prefspage_general $notebook] [mc "General"] lappend pages [prefspage_colors $notebook] [mc "Colors"] lappend pages [prefspage_fonts $notebook] [mc "Fonts"] + set col 0 foreach {page title} $pages { if {$use_notebook} { $notebook add $page -text $title