gitk: replace ${NS} with ttk
gitk uses ${NS} to select between the original Tk widgets and the newer themed widgets in ttk. As gitk uses only themed widgets from ttk::, this indirection now serves no purpose, so let's switch to explicit use of ttk:: via global search/replace. More simplification, including removal of the NS variable, is kept for a later patch to keep this one smaller. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Mark Levedahl committed
Jun 8, 2025 at 08:45 UTC
9c3cc842875325cb81f136af2dae27645e06b49b
1 file changed
+166
-166
gitk
+166
-166
@@ -2113,7 +2113,7 @@ proc show_error {w top msg} {
2113
if {[wm state $top] eq "withdrawn"} { wm deiconify $top }
2114
message $w.m -text $msg -justify center -aspect 400
2115
pack $w.m -side top -fill x -padx 20 -pady 20
2116
- ${NS}::button $w.ok -default active -text [mc OK] -command "destroy $top"
2116
+ ttk::button $w.ok -default active -text [mc OK] -command "destroy $top"
2117
pack $w.ok -side bottom -fill x
2118
bind $top <Visibility> "grab $top; focus $top"
2119
bind $top <Key-Return> "destroy $top"
@@ -2142,9 +2142,9 @@ proc confirm_popup {msg {owner .}} {
2142
make_transient $w $owner
2143
message $w.m -text $msg -justify center -aspect 400
2144
pack $w.m -side top -fill x -padx 20 -pady 20
2145
- ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
2145
+ ttk::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
2146
pack $w.ok -side left -fill x
2147
- ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w"
2147
+ ttk::button $w.cancel -text [mc Cancel] -command "destroy $w"
2148
pack $w.cancel -side right -fill x
2149
bind $w <Visibility> "grab $w; focus $w"
2150
bind $w <Key-Return> "set confirm_ok 1; destroy $w"
@@ -2348,7 +2348,7 @@ proc makewindow {} {
2348
}
2349
2350
# the gui has upper and lower half, parts of a paned window.
2351
- ${NS}::panedwindow .ctop -orient vertical
2351
+ ttk::panedwindow .ctop -orient vertical
2352
2353
# possibly use assumed geometry
2354
if {![info exists geometry(pwsash0)]} {
@@ -2361,9 +2361,9 @@ proc makewindow {} {
2361
}
2362
2363
# the upper half will have a paned window, a scroll bar to the right, and some stuff below
2364
- ${NS}::frame .tf -height $geometry(topheight) -width $geometry(topwidth)
2365
- ${NS}::frame .tf.histframe
2366
- ${NS}::panedwindow .tf.histframe.pwclist -orient horizontal
2364
+ ttk::frame .tf -height $geometry(topheight) -width $geometry(topwidth)
2365
+ ttk::frame .tf.histframe
2366
+ ttk::panedwindow .tf.histframe.pwclist -orient horizontal
2367
if {!$use_ttk} {
2368
.tf.histframe.pwclist configure -sashpad 0 -handlesize 4
2369
}
@@ -2398,7 +2398,7 @@ proc makewindow {} {
2398
}
2399
2400
# a scroll bar to rule them
2401
- ${NS}::scrollbar $cscroll -command {allcanvs yview}
2401
+ ttk::scrollbar $cscroll -command {allcanvs yview}
2402
if {!$use_ttk} {$cscroll configure -highlightthickness 0}
2403
pack $cscroll -side right -fill y
2404
bind .tf.histframe.pwclist <Configure> {resizeclistpanes %W %w}
@@ -2406,8 +2406,8 @@ proc makewindow {} {
2406
pack .tf.histframe.pwclist -fill both -expand 1 -side left
2407
2408
# we have two button bars at bottom of top frame. Bar 1
2409
- ${NS}::frame .tf.bar
2410
- ${NS}::frame .tf.lbar -height 15
2409
+ ttk::frame .tf.bar
2410
+ ttk::frame .tf.lbar -height 15
2411
2412
set sha1entry .tf.bar.sha1
2413
set entries $sha1entry
@@ -2416,7 +2416,7 @@ proc makewindow {} {
2416
-command gotocommit -width 8
2417
$sha1but conf -disabledforeground [$sha1but cget -foreground]
2418
pack .tf.bar.sha1label -side left
2419
- ${NS}::entry $sha1entry -width 40 -font textfont -textvariable sha1string
2419
+ ttk::entry $sha1entry -width 40 -font textfont -textvariable sha1string
2420
trace add variable sha1string write sha1change
2421
pack $sha1entry -side left -pady 2
2422
@@ -2441,14 +2441,14 @@ proc makewindow {} {
2441
image create bitmap bm-right -data $bm_right_data -foreground $uifgcolor
2442
image create bitmap bm-right-gray -data $bm_right_data -foreground $uifgdisabledcolor
2443
2444
- ${NS}::button .tf.bar.leftbut -command goback -state disabled -width 26
2444
+ ttk::button .tf.bar.leftbut -command goback -state disabled -width 26
2445
if {$use_ttk} {
2446
.tf.bar.leftbut configure -image [list bm-left disabled bm-left-gray]
2447
} else {
2448
.tf.bar.leftbut configure -image bm-left
2449
}
2450
pack .tf.bar.leftbut -side left -fill y
2451
- ${NS}::button .tf.bar.rightbut -command goforw -state disabled -width 26
2451
+ ttk::button .tf.bar.rightbut -command goforw -state disabled -width 26
2452
if {$use_ttk} {
2453
.tf.bar.rightbut configure -image [list bm-right disabled bm-right-gray]
2454
} else {
@@ -2456,12 +2456,12 @@ proc makewindow {} {
2456
}
2457
pack .tf.bar.rightbut -side left -fill y
2458
2459
- ${NS}::label .tf.bar.rowlabel -text [mc "Row"]
2459
+ ttk::label .tf.bar.rowlabel -text [mc "Row"]
2460
set rownumsel {}
2461
- ${NS}::label .tf.bar.rownum -width 7 -textvariable rownumsel \
2461
+ ttk::label .tf.bar.rownum -width 7 -textvariable rownumsel \
2462
-relief sunken -anchor e
2463
- ${NS}::label .tf.bar.rowlabel2 -text "/"
2464
- ${NS}::label .tf.bar.numcommits -width 7 -textvariable numcommits \
2463
+ ttk::label .tf.bar.rowlabel2 -text "/"
2464
+ ttk::label .tf.bar.numcommits -width 7 -textvariable numcommits \
2465
-relief sunken -anchor e
2466
pack .tf.bar.rowlabel .tf.bar.rownum .tf.bar.rowlabel2 .tf.bar.numcommits \
2467
-side left
@@ -2473,7 +2473,7 @@ proc makewindow {} {
2473
2474
# Status label and progress bar
2475
set statusw .tf.bar.status
2476
- ${NS}::label $statusw -width 15 -relief sunken
2476
+ ttk::label $statusw -width 15 -relief sunken
2477
pack $statusw -side left -padx 5
2478
if {$use_ttk} {
2479
set progresscanv [ttk::progressbar .tf.bar.progress]
@@ -2494,7 +2494,7 @@ proc makewindow {} {
2494
set progupdatepending 0
2495
2496
# build up the bottom bar of upper window
2497
- ${NS}::label .tf.lbar.flabel -text "[mc "Find"] "
2497
+ ttk::label .tf.lbar.flabel -text "[mc "Find"] "
2498
2499
set bm_down_data {
2500
#define down_width 16
@@ -2506,7 +2506,7 @@ proc makewindow {} {
2506
0xf0, 0x0f, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01};
2507
}
2508
image create bitmap bm-down -data $bm_down_data -foreground $uifgcolor
2509
- ${NS}::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
2509
+ ttk::button .tf.lbar.fnext -width 26 -command {dofind 1 1}
2510
.tf.lbar.fnext configure -image bm-down
2511
2512
set bm_up_data {
@@ -2519,10 +2519,10 @@ proc makewindow {} {
2519
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01};
2520
}
2521
image create bitmap bm-up -data $bm_up_data -foreground $uifgcolor
2522
- ${NS}::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
2522
+ ttk::button .tf.lbar.fprev -width 26 -command {dofind -1 1}
2523
.tf.lbar.fprev configure -image bm-up
2524
2525
- ${NS}::label .tf.lbar.flab2 -text " [mc "commit"] "
2525
+ ttk::label .tf.lbar.flab2 -text " [mc "commit"] "
2526
2527
pack .tf.lbar.flabel .tf.lbar.fnext .tf.lbar.fprev .tf.lbar.flab2 \
2528
-side left -fill y
@@ -2538,7 +2538,7 @@ proc makewindow {} {
2538
set findstring {}
2539
set fstring .tf.lbar.findstring
2540
lappend entries $fstring
2541
- ${NS}::entry $fstring -width 30 -textvariable findstring
2541
+ ttk::entry $fstring -width 30 -textvariable findstring
2542
trace add variable findstring write find_change
2543
set findtype [mc "Exact"]
2544
set findtypemenu [makedroplist .tf.lbar.findtype \
@@ -2563,39 +2563,39 @@ proc makewindow {} {
2563
}
2564
2565
# now build up the bottom
2566
- ${NS}::panedwindow .pwbottom -orient horizontal
2566
+ ttk::panedwindow .pwbottom -orient horizontal
2567
2568
# lower left, a text box over search bar, scroll bar to the right
2569
# if we know window height, then that will set the lower text height, otherwise
2570
# we set lower text height which will drive window height
2571
if {[info exists geometry(main)]} {
2572
- ${NS}::frame .bleft -width $geometry(botwidth)
2572
+ ttk::frame .bleft -width $geometry(botwidth)
2573
} else {
2574
- ${NS}::frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
2574
+ ttk::frame .bleft -width $geometry(botwidth) -height $geometry(botheight)
2575
}
2576
- ${NS}::frame .bleft.top
2577
- ${NS}::frame .bleft.mid
2578
- ${NS}::frame .bleft.bottom
2576
+ ttk::frame .bleft.top
2577
+ ttk::frame .bleft.mid
2578
+ ttk::frame .bleft.bottom
2579
2580
# gap between sub-widgets
2581
set wgap [font measure uifont "i"]
2582
2583
- ${NS}::button .bleft.top.search -text [mc "Search"] -command dosearch
2583
+ ttk::button .bleft.top.search -text [mc "Search"] -command dosearch
2584
pack .bleft.top.search -side left -padx 5
2585
set sstring .bleft.top.sstring
2586
set searchstring ""
2587
- ${NS}::entry $sstring -width 20 -textvariable searchstring
2587
+ ttk::entry $sstring -width 20 -textvariable searchstring
2588
lappend entries $sstring
2589
trace add variable searchstring write incrsearch
2590
pack $sstring -side left -expand 1 -fill x
2591
- ${NS}::radiobutton .bleft.mid.diff -text [mc "Diff"] \
2591
+ ttk::radiobutton .bleft.mid.diff -text [mc "Diff"] \
2592
-command changediffdisp -variable diffelide -value {0 0}
2593
- ${NS}::radiobutton .bleft.mid.old -text [mc "Old version"] \
2593
+ ttk::radiobutton .bleft.mid.old -text [mc "Old version"] \
2594
-command changediffdisp -variable diffelide -value {0 1}
2595
- ${NS}::radiobutton .bleft.mid.new -text [mc "New version"] \
2595
+ ttk::radiobutton .bleft.mid.new -text [mc "New version"] \
2596
-command changediffdisp -variable diffelide -value {1 0}
2597
2598
- ${NS}::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
2598
+ ttk::label .bleft.mid.labeldiffcontext -text " [mc "Lines of context"]: "
2599
pack .bleft.mid.diff .bleft.mid.old .bleft.mid.new -side left -ipadx $wgap
2600
spinbox .bleft.mid.diffcontext -width 5 \
2601
-from 0 -increment 1 -to 10000000 \
@@ -2605,7 +2605,7 @@ proc makewindow {} {
2605
trace add variable diffcontextstring write diffcontextchange
2606
lappend entries .bleft.mid.diffcontext
2607
pack .bleft.mid.labeldiffcontext .bleft.mid.diffcontext -side left -ipadx $wgap
2608
- ${NS}::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \
2608
+ ttk::checkbutton .bleft.mid.ignspace -text [mc "Ignore space change"] \
2609
-command changeignorespace -variable ignorespace
2610
pack .bleft.mid.ignspace -side left -padx 5
2611
@@ -2621,8 +2621,8 @@ proc makewindow {} {
2621
-yscrollcommand scrolltext -wrap $wrapdefault \
2622
-xscrollcommand ".bleft.bottom.sbhorizontal set"
2623
$ctext conf -tabstyle wordprocessor
2624
- ${NS}::scrollbar .bleft.bottom.sb -command "$ctext yview"
2625
- ${NS}::scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h
2624
+ ttk::scrollbar .bleft.bottom.sb -command "$ctext yview"
2625
+ ttk::scrollbar .bleft.bottom.sbhorizontal -command "$ctext xview" -orient h
2626
pack .bleft.top -side top -fill x
2627
pack .bleft.mid -side top -fill x
2628
grid $ctext .bleft.bottom.sb -sticky nsew
@@ -2678,11 +2678,11 @@ proc makewindow {} {
2678
}
2679
2680
# lower right
2681
- ${NS}::frame .bright
2682
- ${NS}::frame .bright.mode
2683
- ${NS}::radiobutton .bright.mode.patch -text [mc "Patch"] \
2681
+ ttk::frame .bright
2682
+ ttk::frame .bright.mode
2683
+ ttk::radiobutton .bright.mode.patch -text [mc "Patch"] \
2684
-command reselectline -variable cmitmode -value "patch"
2685
- ${NS}::radiobutton .bright.mode.tree -text [mc "Tree"] \
2685
+ ttk::radiobutton .bright.mode.tree -text [mc "Tree"] \
2686
-command reselectline -variable cmitmode -value "tree"
2687
grid .bright.mode.patch .bright.mode.tree -sticky ew
2688
pack .bright.mode -side top -fill x
@@ -2698,7 +2698,7 @@ proc makewindow {} {
2698
-spacing1 1 -spacing3 1
2699
lappend bglist $cflist
2700
lappend fglist $cflist
2701
- ${NS}::scrollbar .bright.sb -command "$cflist yview"
2701
+ ttk::scrollbar .bright.sb -command "$cflist yview"
2702
pack .bright.sb -side right -fill y
2703
pack $cflist -side left -fill both -expand 1
2704
$cflist tag configure highlight \
@@ -3269,7 +3269,7 @@ Copyright \u00a9 2005-2016 Paul Mackerras
3269
Use and redistribute under the terms of the GNU General Public License"] \
3270
-justify center -aspect 400 -border 2 -bg $bgcolor -relief groove
3271
pack $w.m -side top -fill x -padx 2 -pady 2
3272
- ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
3272
+ ttk::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
3273
pack $w.ok -side bottom
3274
bind $w <Visibility> "focus $w.ok"
3275
bind $w <Key-Escape> "destroy $w"
@@ -3336,7 +3336,7 @@ proc keys {} {
3336
" \
3337
-justify left -bg $bgcolor -border 2 -relief groove
3338
pack $w.m -side top -fill both -padx 2 -pady 2
3339
- ${NS}::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
3339
+ ttk::button $w.ok -text [mc "Close"] -command "destroy $w" -default active
3340
bind $w <Key-Escape> [list destroy $w]
3341
pack $w.ok -side bottom
3342
bind $w <Visibility> "focus $w.ok"
@@ -4487,9 +4487,9 @@ proc vieweditor {top n title} {
4487
make_transient $top .
4488
4489
# View name
4490
- ${NS}::frame $top.nfr
4491
- ${NS}::label $top.nl -text [mc "View Name"]
4492
- ${NS}::entry $top.name -width 20 -textvariable newviewname($n)
4490
+ ttk::frame $top.nfr
4491
+ ttk::label $top.nl -text [mc "View Name"]
4492
+ ttk::entry $top.name -width 20 -textvariable newviewname($n)
4493
pack $top.nfr -in $top -fill x -pady 5 -padx 3
4494
pack $top.nl -in $top.nfr -side left -padx {0 5}
4495
pack $top.name -in $top.nfr -side left -padx {0 25}
@@ -4508,13 +4508,13 @@ proc vieweditor {top n title} {
4508
if {$flags eq "+" || $flags eq "*"} {
4509
set cframe $top.fr$cnt
4510
incr cnt
4511
- ${NS}::frame $cframe
4511
+ ttk::frame $cframe
4512
pack $cframe -in $top -fill x -pady 3 -padx 3
4513
set cexpand [expr {$flags eq "*"}]
4514
} elseif {$flags eq ".." || $flags eq "*."} {
4515
set cframe $top.fr$cnt
4516
incr cnt
4517
- ${NS}::frame $cframe
4517
+ ttk::frame $cframe
4518
pack $cframe -in $top -fill x -pady 3 -padx [list 15 3]
4519
set cexpand [expr {$flags eq "*."}]
4520
} else {
@@ -4522,31 +4522,31 @@ proc vieweditor {top n title} {
4522
}
4523
4524
if {$type eq "l"} {
4525
- ${NS}::label $cframe.l_$id -text $title
4525
+ ttk::label $cframe.l_$id -text $title
4526
pack $cframe.l_$id -in $cframe -side left -pady [list 3 0] -anchor w
4527
} elseif {$type eq "b"} {
4528
- ${NS}::checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id)
4528
+ ttk::checkbutton $cframe.c_$id -text $title -variable newviewopts($n,$id)
4529
pack $cframe.c_$id -in $cframe -side left \
4530
-padx [list $lxpad 0] -expand $cexpand -anchor w
4531
} elseif {[regexp {^r(\d+)$} $type type sz]} {
4532
regexp {^(.*_)} $id uselessvar button_id
4533
- ${NS}::radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz
4533
+ ttk::radiobutton $cframe.c_$id -text $title -variable newviewopts($n,$button_id) -value $sz
4534
pack $cframe.c_$id -in $cframe -side left \
4535
-padx [list $lxpad 0] -expand $cexpand -anchor w
4536
} elseif {[regexp {^t(\d+)$} $type type sz]} {
4537
- ${NS}::label $cframe.l_$id -text $title
4538
- ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \
4537
+ ttk::label $cframe.l_$id -text $title
4538
+ ttk::entry $cframe.e_$id -width $sz -background $bgcolor \
4539
-textvariable newviewopts($n,$id)
4540
pack $cframe.l_$id -in $cframe -side left -padx [list $lxpad 0]
4541
pack $cframe.e_$id -in $cframe -side left -expand 1 -fill x
4542
} elseif {[regexp {^t(\d+)=$} $type type sz]} {
4543
- ${NS}::label $cframe.l_$id -text $title
4544
- ${NS}::entry $cframe.e_$id -width $sz -background $bgcolor \
4543
+ ttk::label $cframe.l_$id -text $title
4544
+ ttk::entry $cframe.e_$id -width $sz -background $bgcolor \
4545
-textvariable newviewopts($n,$id)
4546
pack $cframe.l_$id -in $cframe -side top -pady [list 3 0] -anchor w
4547
pack $cframe.e_$id -in $cframe -side top -fill x
4548
} elseif {$type eq "path"} {
4549
- ${NS}::label $top.l -text $title
4549
+ ttk::label $top.l -text $title
4550
pack $top.l -in $top -side top -pady [list 3 0] -anchor w -padx 3
4551
text $top.t -width 40 -height 5 -background $bgcolor
4552
if {[info exists viewfiles($n)]} {
@@ -4561,10 +4561,10 @@ proc vieweditor {top n title} {
4561
}
4562
}
4563
4564
- ${NS}::frame $top.buts
4565
- ${NS}::button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
4566
- ${NS}::button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1]
4567
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command [list destroy $top]
4564
+ ttk::frame $top.buts
4565
+ ttk::button $top.buts.ok -text [mc "OK"] -command [list newviewok $top $n]
4566
+ ttk::button $top.buts.apply -text [mc "Apply (F5)"] -command [list newviewok $top $n 1]
4567
+ ttk::button $top.buts.can -text [mc "Cancel"] -command [list destroy $top]
4568
bind $top <Control-Return> [list newviewok $top $n]
4569
bind $top <F5> [list newviewok $top $n 1]
4570
bind $top <Escape> [list destroy $top]
@@ -9440,36 +9440,36 @@ proc mkpatch {} {
9440
catch {destroy $top}
9441
ttk_toplevel $top
9442
make_transient $top .
9443
- ${NS}::label $top.title -text [mc "Generate patch"]
9443
+ ttk::label $top.title -text [mc "Generate patch"]
9444
grid $top.title - -pady 10
9445
- ${NS}::label $top.from -text [mc "From:"]
9446
- ${NS}::entry $top.fromsha1 -width 40
9445
+ ttk::label $top.from -text [mc "From:"]
9446
+ ttk::entry $top.fromsha1 -width 40
9447
$top.fromsha1 insert 0 $oldid
9448
$top.fromsha1 conf -state readonly
9449
grid $top.from $top.fromsha1 -sticky w
9450
- ${NS}::entry $top.fromhead -width 60
9450
+ ttk::entry $top.fromhead -width 60
9451
$top.fromhead insert 0 $oldhead
9452
$top.fromhead conf -state readonly
9453
grid x $top.fromhead -sticky w
9454
- ${NS}::label $top.to -text [mc "To:"]
9455
- ${NS}::entry $top.tosha1 -width 40
9454
+ ttk::label $top.to -text [mc "To:"]
9455
+ ttk::entry $top.tosha1 -width 40
9456
$top.tosha1 insert 0 $newid
9457
$top.tosha1 conf -state readonly
9458
grid $top.to $top.tosha1 -sticky w
9459
- ${NS}::entry $top.tohead -width 60
9459
+ ttk::entry $top.tohead -width 60
9460
$top.tohead insert 0 $newhead
9461
$top.tohead conf -state readonly
9462
grid x $top.tohead -sticky w
9463
- ${NS}::button $top.rev -text [mc "Reverse"] -command mkpatchrev
9463
+ ttk::button $top.rev -text [mc "Reverse"] -command mkpatchrev
9464
grid $top.rev x -pady 10 -padx 5
9465
- ${NS}::label $top.flab -text [mc "Output file:"]
9466
- ${NS}::entry $top.fname -width 60
9465
+ ttk::label $top.flab -text [mc "Output file:"]
9466
+ ttk::entry $top.fname -width 60
9467
$top.fname insert 0 [file normalize "patch$patchnum.patch"]
9468
incr patchnum
9469
grid $top.flab $top.fname -sticky w
9470
- ${NS}::frame $top.buts
9471
- ${NS}::button $top.buts.gen -text [mc "Generate"] -command mkpatchgo
9472
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command mkpatchcan
9470
+ ttk::frame $top.buts
9471
+ ttk::button $top.buts.gen -text [mc "Generate"] -command mkpatchgo
9472
+ ttk::button $top.buts.can -text [mc "Cancel"] -command mkpatchcan
9473
bind $top <Key-Return> mkpatchgo
9474
bind $top <Key-Escape> mkpatchcan
9475
grid $top.buts.gen $top.buts.can
@@ -9524,28 +9524,28 @@ proc mktag {} {
9524
catch {destroy $top}
9525
ttk_toplevel $top
9526
make_transient $top .
9527
- ${NS}::label $top.title -text [mc "Create tag"]
9527
+ ttk::label $top.title -text [mc "Create tag"]
9528
grid $top.title - -pady 10
9529
- ${NS}::label $top.id -text [mc "ID:"]
9530
- ${NS}::entry $top.sha1 -width 40
9529
+ ttk::label $top.id -text [mc "ID:"]
9530
+ ttk::entry $top.sha1 -width 40
9531
$top.sha1 insert 0 $rowmenuid
9532
$top.sha1 conf -state readonly
9533
grid $top.id $top.sha1 -sticky w
9534
- ${NS}::entry $top.head -width 60
9534
+ ttk::entry $top.head -width 60
9535
$top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
9536
$top.head conf -state readonly
9537
grid x $top.head -sticky w
9538
- ${NS}::label $top.tlab -text [mc "Tag name:"]
9539
- ${NS}::entry $top.tag -width 60
9538
+ ttk::label $top.tlab -text [mc "Tag name:"]
9539
+ ttk::entry $top.tag -width 60
9540
grid $top.tlab $top.tag -sticky w
9541
- ${NS}::label $top.op -text [mc "Tag message is optional"]
9541
+ ttk::label $top.op -text [mc "Tag message is optional"]
9542
grid $top.op -columnspan 2 -sticky we
9543
- ${NS}::label $top.mlab -text [mc "Tag message:"]
9544
- ${NS}::entry $top.msg -width 60
9543
+ ttk::label $top.mlab -text [mc "Tag message:"]
9544
+ ttk::entry $top.msg -width 60
9545
grid $top.mlab $top.msg -sticky w
9546
- ${NS}::frame $top.buts
9547
- ${NS}::button $top.buts.gen -text [mc "Create"] -command mktaggo
9548
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command mktagcan
9546
+ ttk::frame $top.buts
9547
+ ttk::button $top.buts.gen -text [mc "Create"] -command mktaggo
9548
+ ttk::button $top.buts.can -text [mc "Cancel"] -command mktagcan
9549
bind $top <Key-Return> mktaggo
9550
bind $top <Key-Escape> mktagcan
9551
grid $top.buts.gen $top.buts.can
@@ -9655,27 +9655,27 @@ proc writecommit {} {
9655
catch {destroy $top}
9656
ttk_toplevel $top
9657
make_transient $top .
9658
- ${NS}::label $top.title -text [mc "Write commit to file"]
9658
+ ttk::label $top.title -text [mc "Write commit to file"]
9659
grid $top.title - -pady 10
9660
- ${NS}::label $top.id -text [mc "ID:"]
9661
- ${NS}::entry $top.sha1 -width 40
9660
+ ttk::label $top.id -text [mc "ID:"]
9661
+ ttk::entry $top.sha1 -width 40
9662
$top.sha1 insert 0 $rowmenuid
9663
$top.sha1 conf -state readonly
9664
grid $top.id $top.sha1 -sticky w
9665
- ${NS}::entry $top.head -width 60
9665
+ ttk::entry $top.head -width 60
9666
$top.head insert 0 [lindex $commitinfo($rowmenuid) 0]
9667
$top.head conf -state readonly
9668
grid x $top.head -sticky w
9669
- ${NS}::label $top.clab -text [mc "Command:"]
9670
- ${NS}::entry $top.cmd -width 60 -textvariable wrcomcmd
9669
+ ttk::label $top.clab -text [mc "Command:"]
9670
+ ttk::entry $top.cmd -width 60 -textvariable wrcomcmd
9671
grid $top.clab $top.cmd -sticky w -pady 10
9672
- ${NS}::label $top.flab -text [mc "Output file:"]
9673
- ${NS}::entry $top.fname -width 60
9672
+ ttk::label $top.flab -text [mc "Output file:"]
9673
+ ttk::entry $top.fname -width 60
9674
$top.fname insert 0 [file normalize "commit-[string range $rowmenuid 0 6]"]
9675
grid $top.flab $top.fname -sticky w
9676
- ${NS}::frame $top.buts
9677
- ${NS}::button $top.buts.gen -text [mc "Write"] -command wrcomgo
9678
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command wrcomcan
9676
+ ttk::frame $top.buts
9677
+ ttk::button $top.buts.gen -text [mc "Write"] -command wrcomgo
9678
+ ttk::button $top.buts.can -text [mc "Cancel"] -command wrcomcan
9679
bind $top <Key-Return> wrcomgo
9680
bind $top <Key-Escape> wrcomcan
9681
grid $top.buts.gen $top.buts.can
@@ -9743,25 +9743,25 @@ proc branchdia {top valvar uivar} {
9743
catch {destroy $top}
9744
ttk_toplevel $top
9745
make_transient $top .
9746
- ${NS}::label $top.title -text $ui(title)
9746
+ ttk::label $top.title -text $ui(title)
9747
grid $top.title - -pady 10
9748
- ${NS}::label $top.id -text [mc "ID:"]
9749
- ${NS}::entry $top.sha1 -width 40
9748
+ ttk::label $top.id -text [mc "ID:"]
9749
+ ttk::entry $top.sha1 -width 40
9750
$top.sha1 insert 0 $val(id)
9751
$top.sha1 conf -state readonly
9752
grid $top.id $top.sha1 -sticky w
9753
- ${NS}::entry $top.head -width 60
9753
+ ttk::entry $top.head -width 60
9754
$top.head insert 0 [lindex $commitinfo($val(id)) 0]
9755
$top.head conf -state readonly
9756
grid x $top.head -sticky ew
9757
grid columnconfigure $top 1 -weight 1
9758
- ${NS}::label $top.nlab -text [mc "Name:"]
9759
- ${NS}::entry $top.name -width 40
9758
+ ttk::label $top.nlab -text [mc "Name:"]
9759
+ ttk::entry $top.name -width 40
9760
$top.name insert 0 $val(name)
9761
grid $top.nlab $top.name -sticky w
9762
- ${NS}::frame $top.buts
9763
- ${NS}::button $top.buts.go -text $ui(accept) -command $val(command)
9764
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}"
9762
+ ttk::frame $top.buts
9763
+ ttk::button $top.buts.go -text $ui(accept) -command $val(command)
9764
+ ttk::button $top.buts.can -text [mc "Cancel"] -command "catch {destroy $top}"
9765
bind $top <Key-Return> $val(command)
9766
bind $top <Key-Escape> "catch {destroy $top}"
9767
grid $top.buts.go $top.buts.can
@@ -10015,24 +10015,24 @@ proc resethead {} {
10015
ttk_toplevel $w
10016
make_transient $w .
10017
wm title $w [mc "Confirm reset"]
10018
- ${NS}::label $w.m -text \
10018
+ ttk::label $w.m -text \
10019
[mc "Reset branch %s to %s?" $mainhead [string range $rowmenuid 0 7]]
10020
pack $w.m -side top -fill x -padx 20 -pady 20
10021
- ${NS}::labelframe $w.f -text [mc "Reset type:"]
10021
+ ttk::labelframe $w.f -text [mc "Reset type:"]
10022
set resettype mixed
10023
- ${NS}::radiobutton $w.f.soft -value soft -variable resettype \
10023
+ ttk::radiobutton $w.f.soft -value soft -variable resettype \
10024
-text [mc "Soft: Leave working tree and index untouched"]
10025
grid $w.f.soft -sticky w
10026
- ${NS}::radiobutton $w.f.mixed -value mixed -variable resettype \
10026
+ ttk::radiobutton $w.f.mixed -value mixed -variable resettype \
10027
-text [mc "Mixed: Leave working tree untouched, reset index"]
10028
grid $w.f.mixed -sticky w
10029
- ${NS}::radiobutton $w.f.hard -value hard -variable resettype \
10029
+ ttk::radiobutton $w.f.hard -value hard -variable resettype \
10030
-text [mc "Hard: Reset working tree and index\n(discard ALL local changes)"]
10031
grid $w.f.hard -sticky w
10032
pack $w.f -side top -fill x -padx 4
10033
- ${NS}::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
10033
+ ttk::button $w.ok -text [mc OK] -command "set confirm_ok 1; destroy $w"
10034
pack $w.ok -side left -fill x -padx 20 -pady 20
10035
- ${NS}::button $w.cancel -text [mc Cancel] -command "destroy $w"
10035
+ ttk::button $w.cancel -text [mc Cancel] -command "destroy $w"
10036
bind $w <Key-Escape> [list destroy $w]
10037
pack $w.cancel -side right -fill x -padx 20 -pady 20
10038
bind $w <Visibility> "grab $w; focus $w"
@@ -10232,19 +10232,19 @@ proc showrefs {} {
10232
lappend bglist $top.list
10233
lappend fglist $top.list
10234
}
10235
- ${NS}::scrollbar $top.ysb -command "$top.list yview" -orient vertical
10236
- ${NS}::scrollbar $top.xsb -command "$top.list xview" -orient horizontal
10235
+ ttk::scrollbar $top.ysb -command "$top.list yview" -orient vertical
10236
+ ttk::scrollbar $top.xsb -command "$top.list xview" -orient horizontal
10237
grid $top.list $top.ysb -sticky nsew
10238
grid $top.xsb x -sticky ew
10239
- ${NS}::frame $top.f
10240
- ${NS}::label $top.f.l -text "[mc "Filter"]: "
10241
- ${NS}::entry $top.f.e -width 20 -textvariable reflistfilter
10239
+ ttk::frame $top.f
10240
+ ttk::label $top.f.l -text "[mc "Filter"]: "
10241
+ ttk::entry $top.f.e -width 20 -textvariable reflistfilter
10242
set reflistfilter "*"
10243
trace add variable reflistfilter write reflistfilter_change
10244
pack $top.f.e -side right -fill x -expand 1
10245
pack $top.f.l -side left
10246
grid $top.f - -sticky ew -pady 2
10247
- ${NS}::button $top.close -command [list destroy $top] -text [mc "Close"]
10247
+ ttk::button $top.close -command [list destroy $top] -text [mc "Close"]
10248
bind $top <Key-Escape> [list destroy $top]
10249
grid $top.close -
10250
grid columnconfigure $top 0 -weight 1
@@ -11585,9 +11585,9 @@ proc mkfontdisp {font top which} {
11585
global fontattr fontpref $font NS use_ttk
11586
11587
set fontpref($font) [set $font]
11588
- ${NS}::button $top.${font}but -text $which \
11588
+ ttk::button $top.${font}but -text $which \
11589
-command [list choosefont $font $which]
11590
- ${NS}::label $top.$font -relief flat -font $font \
11590
+ ttk::label $top.$font -relief flat -font $font \
11591
-text $fontattr($font,family) -justify left
11592
grid x $top.${font}but $top.$font -sticky w
11593
}
@@ -11662,9 +11662,9 @@ proc create_prefs_page {w} {
11662
global NS
11663
set parent [join [lrange [split $w .] 0 end-1] .]
11664
if {[winfo class $parent] eq "TNotebook"} {
11665
- ${NS}::frame $w
11665
+ ttk::frame $w
11666
} else {
11667
- ${NS}::labelframe $w
11667
+ ttk::labelframe $w
11668
}
11669
}
11670
@@ -11674,78 +11674,78 @@ proc prefspage_general {notebook} {
11674
11675
set page [create_prefs_page $notebook.general]
11676
11677
- ${NS}::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold
11677
+ ttk::label $page.ldisp -text [mc "Commit list display options"] -font mainfontbold
11678
grid $page.ldisp - -sticky w -pady 10
11679
- ${NS}::label $page.spacer -text " "
11680
- ${NS}::label $page.maxwidthl -text [mc "Maximum graph width (lines)"]
11679
+ ttk::label $page.spacer -text " "
11680
+ ttk::label $page.maxwidthl -text [mc "Maximum graph width (lines)"]
11681
spinbox $page.maxwidth -from 0 -to 100 -width 4 -textvariable maxwidth
11682
grid $page.spacer $page.maxwidthl $page.maxwidth -sticky w
11683
#xgettext:no-tcl-format
11684
- ${NS}::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"]
11684
+ ttk::label $page.maxpctl -text [mc "Maximum graph width (% of pane)"]
11685
spinbox $page.maxpct -from 1 -to 100 -width 4 -textvariable maxgraphpct
11686
grid x $page.maxpctl $page.maxpct -sticky w
11687
- ${NS}::checkbutton $page.showlocal -text [mc "Show local changes"] \
11687
+ ttk::checkbutton $page.showlocal -text [mc "Show local changes"] \
11688
-variable showlocalchanges
11689
grid x $page.showlocal -sticky w
11690
- ${NS}::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \
11690
+ ttk::checkbutton $page.hideremotes -text [mc "Hide remote refs"] \
11691
-variable hideremotes
11692
grid x $page.hideremotes -sticky w
11693
11694
- ${NS}::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \
11694
+ ttk::checkbutton $page.autocopy -text [mc "Copy commit ID to clipboard"] \
11695
-variable autocopy
11696
grid x $page.autocopy -sticky w
11697
if {[haveselectionclipboard]} {
11698
- ${NS}::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \
11698
+ ttk::checkbutton $page.autoselect -text [mc "Copy commit ID to X11 selection"] \
11699
-variable autoselect
11700
grid x $page.autoselect -sticky w
11701
}
11702
spinbox $page.autosellen -from 1 -to 40 -width 4 -textvariable autosellen
11703
- ${NS}::label $page.autosellenl -text [mc "Length of commit ID to copy"]
11703
+ ttk::label $page.autosellenl -text [mc "Length of commit ID to copy"]
11704
grid x $page.autosellenl $page.autosellen -sticky w
11705
11706
- ${NS}::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold
11706
+ ttk::label $page.ddisp -text [mc "Diff display options"] -font mainfontbold
11707
grid $page.ddisp - -sticky w -pady 10
11708
- ${NS}::label $page.tabstopl -text [mc "Tab spacing"]
11708
+ ttk::label $page.tabstopl -text [mc "Tab spacing"]
11709
spinbox $page.tabstop -from 1 -to 20 -width 4 -textvariable tabstop
11710
grid x $page.tabstopl $page.tabstop -sticky w
11711
11712
- ${NS}::label $page.wrapcommentl -text [mc "Wrap comment text"]
11712
+ ttk::label $page.wrapcommentl -text [mc "Wrap comment text"]
11713
makedroplist $page.wrapcomment wrapcomment none char word
11714
grid x $page.wrapcommentl $page.wrapcomment -sticky w
11715
11716
- ${NS}::label $page.wrapdefaultl -text [mc "Wrap other text"]
11716
+ ttk::label $page.wrapdefaultl -text [mc "Wrap other text"]
11717
makedroplist $page.wrapdefault wrapdefault none char word
11718
grid x $page.wrapdefaultl $page.wrapdefault -sticky w
11719
11720
- ${NS}::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \
11720
+ ttk::checkbutton $page.ntag -text [mc "Display nearby tags/heads"] \
11721
-variable showneartags
11722
grid x $page.ntag -sticky w
11723
- ${NS}::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"]
11723
+ ttk::label $page.maxrefsl -text [mc "Maximum # tags/heads to show"]
11724
spinbox $page.maxrefs -from 1 -to 1000 -width 4 -textvariable maxrefs
11725
grid x $page.maxrefsl $page.maxrefs -sticky w
11726
- ${NS}::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \
11726
+ ttk::checkbutton $page.ldiff -text [mc "Limit diffs to listed paths"] \
11727
-variable limitdiffs
11728
grid x $page.ldiff -sticky w
11729
- ${NS}::checkbutton $page.lattr -text [mc "Support per-file encodings"] \
11729
+ ttk::checkbutton $page.lattr -text [mc "Support per-file encodings"] \
11730
-variable perfile_attrs
11731
grid x $page.lattr -sticky w
11732
11733
- ${NS}::entry $page.extdifft -textvariable extdifftool
11734
- ${NS}::frame $page.extdifff
11735
- ${NS}::label $page.extdifff.l -text [mc "External diff tool" ]
11736
- ${NS}::button $page.extdifff.b -text [mc "Choose..."] -command choose_extdiff
11733
+ ttk::entry $page.extdifft -textvariable extdifftool
11734
+ ttk::frame $page.extdifff
11735
+ ttk::label $page.extdifff.l -text [mc "External diff tool" ]
11736
+ ttk::button $page.extdifff.b -text [mc "Choose..."] -command choose_extdiff
11737
pack $page.extdifff.l $page.extdifff.b -side left
11738
pack configure $page.extdifff.l -padx 10
11739
grid x $page.extdifff $page.extdifft -sticky ew
11740
11741
- ${NS}::entry $page.webbrowser -textvariable web_browser
11742
- ${NS}::frame $page.webbrowserf
11743
- ${NS}::label $page.webbrowserf.l -text [mc "Web browser" ]
11741
+ ttk::entry $page.webbrowser -textvariable web_browser
11742
+ ttk::frame $page.webbrowserf
11743
+ ttk::label $page.webbrowserf.l -text [mc "Web browser" ]
11744
pack $page.webbrowserf.l -side left
11745
pack configure $page.webbrowserf.l -padx 10
11746
grid x $page.webbrowserf $page.webbrowser -sticky ew
11747
11748
- ${NS}::label $page.lgen -text [mc "General options"] -font mainfontbold
11748
+ ttk::label $page.lgen -text [mc "General options"] -font mainfontbold
11749
grid $page.lgen - -sticky w -pady 10
11750
return $page
11751
}
@@ -11756,56 +11756,56 @@ proc prefspage_colors {notebook} {
11756
11757
set page [create_prefs_page $notebook.colors]
11758
11759
- ${NS}::label $page.cdisp -text [mc "Colors: press to choose"] -font mainfontbold
11759
+ ttk::label $page.cdisp -text [mc "Colors: press to choose"] -font mainfontbold
11760
grid $page.cdisp - -sticky w -pady 10
11761
label $page.ui -padx 40 -relief sunk -background $uicolor
11762
- ${NS}::button $page.uibut -text [mc "Interface"] \
11762
+ ttk::button $page.uibut -text [mc "Interface"] \
11763
-command [list choosecolor uicolor {} $page.ui [mc "interface"] setui]
11764
grid x $page.uibut $page.ui -sticky w
11765
label $page.bg -padx 40 -relief sunk -background $bgcolor
11766
- ${NS}::button $page.bgbut -text [mc "Background"] \
11766
+ ttk::button $page.bgbut -text [mc "Background"] \
11767
-command [list choosecolor bgcolor {} $page.bg [mc "background"] setbg]
11768
grid x $page.bgbut $page.bg -sticky w
11769
label $page.fg -padx 40 -relief sunk -background $fgcolor
11770
- ${NS}::button $page.fgbut -text [mc "Foreground"] \
11770
+ ttk::button $page.fgbut -text [mc "Foreground"] \
11771
-command [list choosecolor fgcolor {} $page.fg [mc "foreground"] setfg]
11772
grid x $page.fgbut $page.fg -sticky w
11773
label $page.diffold -padx 40 -relief sunk -background [lindex $diffcolors 0]
11774
- ${NS}::button $page.diffoldbut -text [mc "Diff: old lines"] \
11774
+ ttk::button $page.diffoldbut -text [mc "Diff: old lines"] \
11775
-command [list choosecolor diffcolors 0 $page.diffold [mc "diff old lines"] \
11776
[list $ctext tag conf d0 -foreground]]
11777
grid x $page.diffoldbut $page.diffold -sticky w
11778
label $page.diffoldbg -padx 40 -relief sunk -background [lindex $diffbgcolors 0]
11779
- ${NS}::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \
11779
+ ttk::button $page.diffoldbgbut -text [mc "Diff: old lines bg"] \
11780
-command [list choosecolor diffbgcolors 0 $page.diffoldbg \
11781
[mc "diff old lines bg"] \
11782
[list $ctext tag conf d0 -background]]
11783
grid x $page.diffoldbgbut $page.diffoldbg -sticky w
11784
label $page.diffnew -padx 40 -relief sunk -background [lindex $diffcolors 1]
11785
- ${NS}::button $page.diffnewbut -text [mc "Diff: new lines"] \
11785
+ ttk::button $page.diffnewbut -text [mc "Diff: new lines"] \
11786
-command [list choosecolor diffcolors 1 $page.diffnew [mc "diff new lines"] \
11787
[list $ctext tag conf dresult -foreground]]
11788
grid x $page.diffnewbut $page.diffnew -sticky w
11789
label $page.diffnewbg -padx 40 -relief sunk -background [lindex $diffbgcolors 1]
11790
- ${NS}::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \
11790
+ ttk::button $page.diffnewbgbut -text [mc "Diff: new lines bg"] \
11791
-command [list choosecolor diffbgcolors 1 $page.diffnewbg \
11792
[mc "diff new lines bg"] \
11793
[list $ctext tag conf dresult -background]]
11794
grid x $page.diffnewbgbut $page.diffnewbg -sticky w
11795
label $page.hunksep -padx 40 -relief sunk -background [lindex $diffcolors 2]
11796
- ${NS}::button $page.hunksepbut -text [mc "Diff: hunk header"] \
11796
+ ttk::button $page.hunksepbut -text [mc "Diff: hunk header"] \
11797
-command [list choosecolor diffcolors 2 $page.hunksep \
11798
[mc "diff hunk header"] \
11799
[list $ctext tag conf hunksep -foreground]]
11800
grid x $page.hunksepbut $page.hunksep -sticky w
11801
label $page.markbgsep -padx 40 -relief sunk -background $markbgcolor
11802
- ${NS}::button $page.markbgbut -text [mc "Marked line bg"] \
11802
+ ttk::button $page.markbgbut -text [mc "Marked line bg"] \
11803
-command [list choosecolor markbgcolor {} $page.markbgsep \
11804
[mc "marked line background"] \
11805
[list $ctext tag conf omark -background]]
11806
grid x $page.markbgbut $page.markbgsep -sticky w
11807
label $page.selbgsep -padx 40 -relief sunk -background $selectbgcolor
11808
- ${NS}::button $page.selbgbut -text [mc "Select bg"] \
11808
+ ttk::button $page.selbgbut -text [mc "Select bg"] \
11809
-command [list choosecolor selectbgcolor {} $page.selbgsep [mc "background"] setselbg]
11810
grid x $page.selbgbut $page.selbgsep -sticky w
11811
return $page
@@ -11814,7 +11814,7 @@ proc prefspage_colors {notebook} {
11814
proc prefspage_fonts {notebook} {
11815
global NS
11816
set page [create_prefs_page $notebook.fonts]
11817
- ${NS}::label $page.cfont -text [mc "Fonts: press to choose"] -font mainfontbold
11817
+ ttk::label $page.cfont -text [mc "Fonts: press to choose"] -font mainfontbold
11818
grid $page.cfont - -sticky w -pady 10
11819
mkfontdisp mainfont $page [mc "Main font"]
11820
mkfontdisp textfont $page [mc "Diff display font"]
@@ -11842,7 +11842,7 @@ proc doprefs {} {
11842
if {[set use_notebook [expr {$use_ttk && [info command ::ttk::notebook] ne ""}]]} {
11843
set notebook [ttk::notebook $top.notebook]
11844
} else {
11845
- set notebook [${NS}::frame $top.notebook -borderwidth 0 -relief flat]
11845
+ set notebook [ttk::frame $top.notebook -borderwidth 0 -relief flat]
11846
}
11847
11848
lappend pages [prefspage_general $notebook] [mc "General"]
@@ -11853,7 +11853,7 @@ proc doprefs {} {
11853
if {$use_notebook} {
11854
$notebook add $page -text $title
11855
} else {
11856
- set btn [${NS}::button $notebook.b_[string map {. X} $page] \
11856
+ set btn [ttk::button $notebook.b_[string map {. X} $page] \
11857
-text $title -command [list raise $page]]
11858
$page configure -text $title
11859
grid $btn -row 0 -column [incr col] -sticky w
@@ -11871,9 +11871,9 @@ proc doprefs {} {
11871
grid rowconfigure $top 0 -weight 1
11872
grid columnconfigure $top 0 -weight 1
11873
11874
- ${NS}::frame $top.buts
11875
- ${NS}::button $top.buts.ok -text [mc "OK"] -command prefsok -default active
11876
- ${NS}::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal
11874
+ ttk::frame $top.buts
11875
+ ttk::button $top.buts.ok -text [mc "OK"] -command prefsok -default active
11876
+ ttk::button $top.buts.can -text [mc "Cancel"] -command prefscan -default normal
11877
bind $top <Key-Return> prefsok
11878
bind $top <Key-Escape> prefscan
11879
grid $top.buts.ok $top.buts.can