aboutsummaryrefslogtreecommitdiffstats
path: root/lib/console.tcl
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2025-07-14 12:15:49 -0400
committerMark Levedahl <mlevedahl@gmail.com>2025-07-18 23:48:34 -0400
commitfdc0e3a29020276de3d9344d2ab0caf4d086fd3a (patch)
tree29f865e546d585b5f260f5a3561d81ac813e4fb5 /lib/console.tcl
parented7d2af78cd4cb8c9a8db4f2f60f56101d9439f8 (diff)
downloadgit-fdc0e3a29020276de3d9344d2ab0caf4d086fd3a.tar.gz
git-gui: remove ${NS} indirection for ttk
git-gui uses ${NS} to switch between non-themed and themed widgets, with ${NS} == 'ttk' selecting the latter. As git-gui now always uses ttk, this indirection is not needed. Remove it. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Diffstat (limited to 'lib/console.tcl')
-rw-r--r--lib/console.tcl15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/console.tcl b/lib/console.tcl
index a017cfeadd..ad6804bc34 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -27,20 +27,20 @@ constructor embed {path title} {
}
method _init {} {
- global M1B use_ttk NS
+ global M1B use_ttk
if {$is_toplevel} {
make_dialog top w -autodelete 0
wm title $top "[appname] ([reponame]): $t_short"
} else {
- ${NS}::frame $w
+ ttk::frame $w
}
set console_cr 1.0
set w_t $w.m.t
- ${NS}::frame $w.m
- ${NS}::label $w.m.l1 \
+ ttk::frame $w.m
+ ttk::label $w.m.l1 \
-textvariable @t_long \
-anchor w \
-justify left \
@@ -78,7 +78,7 @@ method _init {} {
"
if {$is_toplevel} {
- ${NS}::button $w.ok -text [mc "Close"] \
+ ttk::button $w.ok -text [mc "Close"] \
-state disabled \
-command [list destroy $w]
pack $w.ok -side bottom -anchor e -pady 10 -padx 10
@@ -207,14 +207,13 @@ method done {ok} {
}
method _sb_set {sb orient first last} {
- global NS
if {![winfo exists $sb]} {
if {$first == $last || ($first == 0 && $last == 1)} return
if {$orient eq {h}} {
- ${NS}::scrollbar $sb -orient h -command [list $w_t xview]
+ ttk::scrollbar $sb -orient h -command [list $w_t xview]
pack $sb -fill x -side bottom -before $w_t
} else {
- ${NS}::scrollbar $sb -orient v -command [list $w_t yview]
+ ttk::scrollbar $sb -orient v -command [list $w_t yview]
pack $sb -fill y -side right -before $w_t
}
}