summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d40bc70)
raw | patch | inline | side by side (parent: d40bc70)
author | Bernt Hansen <bernt@norang.ca> | |
Mon, 2 Nov 2009 12:41:00 +0000 (07:41 -0500) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Tue, 3 Nov 2009 11:28:42 +0000 (22:28 +1100) |
We check the required Tcl version number before we setup msgcat for
language translation. If the Tcl version is too old just display the
untranslated error text.
The caller of show_error can now pass an alternative function for mc.
The Tcl list function turns the translation into a no-op.
This fixes the error:
Error in startup script: invalid command name "mc"
when attempting to start gitk with Tcl 8.3.
Tested with both Tcl 8.3 and 8.4.
Signed-off-by: Bernt Hansen <bernt@norang.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
language translation. If the Tcl version is too old just display the
untranslated error text.
The caller of show_error can now pass an alternative function for mc.
The Tcl list function turns the translation into a no-op.
This fixes the error:
Error in startup script: invalid command name "mc"
when attempting to start gitk with Tcl 8.3.
Tested with both Tcl 8.3 and 8.4.
Signed-off-by: Bernt Hansen <bernt@norang.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 59d592519956911631eff872ed445c0fd1b71e63..db5ec54be879e3ad194c2718468a499882c75733 100755 (executable)
--- a/gitk
+++ b/gitk
}
}
-proc show_error {w top msg} {
+proc show_error {w top msg {mc mc}} {
message $w.m -text $msg -justify center -aspect 400
pack $w.m -side top -fill x -padx 20 -pady 20
- button $w.ok -text [mc OK] -command "destroy $top"
+ button $w.ok -text [$mc OK] -command "destroy $top"
pack $w.ok -side bottom -fill x
bind $top <Visibility> "grab $top; focus $top"
bind $top <Key-Return> "destroy $top"
# First check that Tcl/Tk is recent enough
if {[catch {package require Tk 8.4} err]} {
- show_error {} . [mc "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
- Gitk requires at least Tcl/Tk 8.4."]
+ show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
+ Gitk requires at least Tcl/Tk 8.4." list
exit 1
}