Skip to content

Commit

Permalink
gitk: Ensure tabstop setting gets restored by Cancel button
Browse files Browse the repository at this point in the history
We weren't restoring the tabstop setting if the user pressed the
Cancel button in the Edit/Preferences window.  Also improved the
label for the checkbox (made it "Tab spacing" rather than the laconic
"tabstop") and moved it above the "Display nearby tags" checkbox.

Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Paul Mackerras committed Oct 23, 2007
1 parent 7a39a17 commit 9450391
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -7419,7 +7419,7 @@ proc doprefs {} {
return
}
foreach v {maxwidth maxgraphpct diffopts showneartags showlocalchanges \
limitdiffs} {
limitdiffs tabstop} {
set oldprefs($v) [set $v]
}
toplevel $top
Expand Down Expand Up @@ -7449,14 +7449,14 @@ proc doprefs {} {
-font optionfont
entry $top.diffopt -width 20 -textvariable diffopts
grid x $top.diffoptl $top.diffopt -sticky w
label $top.tabstopl -text "Tab spacing" -font optionfont
spinbox $top.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
grid x $top.tabstopl $top.tabstop -sticky w
frame $top.ntag
label $top.ntag.l -text "Display nearby tags" -font optionfont
checkbutton $top.ntag.b -variable showneartags
pack $top.ntag.b $top.ntag.l -side left
grid x $top.ntag -sticky w
label $top.tabstopl -text "tabstop" -font optionfont
spinbox $top.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
grid x $top.tabstopl $top.tabstop -sticky w
frame $top.ldiff
label $top.ldiff.l -text "Limit diffs to listed paths" -font optionfont
checkbutton $top.ldiff.b -variable limitdiffs
Expand Down Expand Up @@ -7547,11 +7547,11 @@ proc setfg {c} {
}

proc prefscan {} {
global maxwidth maxgraphpct diffopts
global oldprefs prefstop showneartags showlocalchanges limitdiffs
global oldprefs prefstop

foreach v {maxwidth maxgraphpct diffopts showneartags showlocalchanges \
limitdiffs} {
limitdiffs tabstop} {
global $v
set $v $oldprefs($v)
}
catch {destroy $prefstop}
Expand Down

0 comments on commit 9450391

Please sign in to comment.