summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/tlshell
diff options
context:
space:
mode:
authorSiep Kroonenberg <siepo@cybercomm.nl>2017-08-22 20:24:29 +0000
committerSiep Kroonenberg <siepo@cybercomm.nl>2017-08-22 20:24:29 +0000
commitebdbf9821e177d3b6a108d04a7ab8fd36e2cda75 (patch)
tree3fb2a65bf6c27ca3c3e3057a431b2504e836d736 /Master/texmf-dist/scripts/tlshell
parent1870a172c11fb0467f2cdd4892c519befe3674db (diff)
Optional debug notebook tab; cosmetic changes
git-svn-id: svn://tug.org/texlive/trunk@45095 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/tlshell')
-rwxr-xr-xMaster/texmf-dist/scripts/tlshell/tlshell.tcl34
1 files changed, 21 insertions, 13 deletions
diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
index b20cf46a0c2..1cdd4590a2e 100755
--- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl
+++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl
@@ -1,10 +1,6 @@
#!/usr/bin/env wish
package require Tk
-# This version:
-# - example of doing something with selected database item
-# - restart self
-
# searchpath:
# windows: most scripts run via [w]runscript, which adjusts the searchpath
# for the current process.
@@ -27,9 +23,6 @@ set err_log {}
set out_log {}
# dicts of package dicts
-if 0 {
- set pkgs {}
-}
set pkgs_local {}
set pkgs_remote {}
set pkgs pkgs_local
@@ -41,6 +34,8 @@ set ddebug 1
proc do_debug {s} {
if {$::ddebug} {
puts stderr $s
+ .dbg.tx configure -state normal
+ .dbg.tx insert end "$s\n"
}
}
@@ -77,7 +72,6 @@ proc read_err {} {
do_debug "read_err"
set len 0
while 1 {
- do_debug "read_err: one iteration"
set len [chan gets $::err l]
if {$len >= 0} {
lappend ::err_log $l
@@ -100,7 +94,7 @@ proc read_line {} {
catch {chan close $::tlshl}
err_exit
} elseif {$len >= 0} {
- do_debug "read: $l"
+ # do_debug "read: $l"
if {[string first $::prmpt $l] == 0} {
# prompt line: done with command
read_err
@@ -202,8 +196,6 @@ set pipe_cb empty_cb
proc log_widget_cb {mode {l ""}} {
if {$mode eq "line"} {
.log.tx configure -state normal
- do_debug "to log widget:"
- do_debug $l
.log.tx insert end "$l\n"
} elseif {$mode eq "init"} {
.log.tx configure -state normal
@@ -390,8 +382,8 @@ proc make_widgets {} {
.pkglist heading $col -text $nm -anchor w
}
.pkglist column name -width [expr $cw * 25]
- .pkglist column localrev -width [expr $cw * 10]
- .pkglist column remoterev -width [expr $cw * 10]
+ .pkglist column localrev -width [expr $cw * 12]
+ .pkglist column remoterev -width [expr $cw * 12]
.pkglist column shortdesc -width [expr $cw * 50]
ttk::scrollbar .pkhsb -orient horizontal -command {.pkglist xview}
@@ -423,9 +415,25 @@ proc make_widgets {} {
-expand 1 -fill both
.err.tx yview moveto 1
+ if $::ddebug {
+ frame .dbg
+ pack [ttk::scrollbar .dbg.scroll -command ".dbg.tx yview"] \
+ -side right -fill y
+ pack [text .dbg.tx -height 10 -bd 2 -relief groove -wrap word \
+ -yscrollcommand ".dbg.scroll set"] \
+ -expand 1 -fill both
+ .dbg.tx yview moveto 1
+ }
+
ttk::notebook .logs
.logs add .log -text "Output"
.logs add .err -text "Errors"
+ if $::ddebug {
+ .logs add .dbg -text "Debug"
+ }
+ if $::ddebug {
+ raise .dbg .logs
+ }
raise .err .logs
raise .log .logs
pack .logs -side top -fill x -expand 1 -padx 3 -pady 6