diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2019-03-19 20:35:20 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2019-03-19 20:35:20 +0000 |
commit | 91deec3eec5fa4d2e2d453d1668b6f191959d43f (patch) | |
tree | 1f85540c61939f36cb1a620fe1e4aba46ed2016a /Master/texmf-dist | |
parent | 534c2c5a6079d9ac3f4833f89476cec22b1a0aa9 (diff) |
Tlshell: remember language specified on the command-line
git-svn-id: svn://tug.org/texlive/trunk@50467 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rwxr-xr-x | Master/texmf-dist/scripts/tlshell/tlshell.tcl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl index 5d066d86740..0113c25dfbe 100755 --- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl +++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl @@ -132,6 +132,7 @@ proc long_message {str type {p "."}} { err_exit "Unsupported type $type for long_message" } create_dlg .tlmg $p + wm title .tlmg "" # wallpaper frame; see populate_main pack [ttk::frame .tlmg.bg] -fill both -expand 1 @@ -1818,7 +1819,7 @@ proc set_paper {p} { run_cmd "paper paper $p" 1 } -proc set_language {l} { +proc set_language_no_restart {l} { set ok 1 if [catch {exec kpsewhich -var-value "TEXMFCONFIG"} d] {set ok 0} if $ok { @@ -1850,12 +1851,16 @@ proc set_language {l} { } catch {chan close $fid} } - if $ok { + return $ok +} ; # set_language_no_restart + +proc set_language {l} { + if [set_language_no_restart $l] { restart_self } else { tk_messageBox -message [__ "Cannot set default GUI language"] -icon error } -} ; # set_language +} ##### running external commands ##### @@ -2237,6 +2242,9 @@ proc initialize {} { lappend ::langs [string range [file tail $l] 0 end-3] } + # store language in tlmgr configuration + set_language_no_restart $::lang + # in case we are going to do something with json: # add json subdirectory to auto_path, but at low priority # since the tcl/tk installation may already have a better implementation. |