From 91deec3eec5fa4d2e2d453d1668b6f191959d43f Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Tue, 19 Mar 2019 20:35:20 +0000 Subject: Tlshell: remember language specified on the command-line git-svn-id: svn://tug.org/texlive/trunk@50467 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/tlshell/tlshell.tcl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/scripts') 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. -- cgit v1.2.3