Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15

gitk: Failure of new tabbed preferences dialog

From: Ramsay Jones <hidden>
Date: 2016-06-15 22:53:25
Subsystem: the rest · Maintainer: Linus Torvalds

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 --
diff --git a/gitk-git/gitk b/gitk-git/gitk
index 651b740..68cd1a1 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help