aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-10-23 10:33:38 +1000
committerPaul Mackerras <paulus@samba.org>2007-10-23 10:33:38 +1000
commit94503918e480123d0d4cf03b03153e4d83cdfd4e (patch)
treedcb0dcdba8ab6182d628cd4332cfa1a5d2f426ee
parent7a39a17a873b818e3a4d121b3a43baf10f68cf61 (diff)
downloadgit-94503918e480123d0d4cf03b03153e4d83cdfd4e.tar.gz
git-94503918e480123d0d4cf03b03153e4d83cdfd4e.tar.xz
gitk: Ensure tabstop setting gets restored by Cancel button
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>
-rwxr-xr-xgitk14
1 files changed, 7 insertions, 7 deletions
diff --git a/gitk b/gitk
index 248f5fbd0..0d3705c43 100755
--- a/gitk
+++ b/gitk
@@ -7419,7 +7419,7 @@ proc doprefs {} {
return
}
foreach v {maxwidth maxgraphpct diffopts showneartags showlocalchanges \
- limitdiffs} {
+ limitdiffs tabstop} {
set oldprefs($v) [set $v]
}
toplevel $top
@@ -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
@@ -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}