summaryrefslogtreecommitdiffstats
path: root/library/tk.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-05-19 14:44:03 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-05-19 14:44:03 (GMT)
commit4926ded3376b2238fc889db0e53a383c6164b941 (patch)
tree0daab51d71d8b0f43ace1d01d785c52f602ec969 /library/tk.tcl
parenta302e60a15b009ebd33033013d2a602c2a1a0825 (diff)
downloadtk-4926ded3376b2238fc889db0e53a383c6164b941.zip
tk-4926ded3376b2238fc889db0e53a383c6164b941.tar.gz
tk-4926ded3376b2238fc889db0e53a383c6164b941.tar.bz2
I18n (and some l10n) for the console and the main window of the widget demo.
Diffstat (limited to 'library/tk.tcl')
-rw-r--r--library/tk.tcl20
1 files changed, 19 insertions, 1 deletions
diff --git a/library/tk.tcl b/library/tk.tcl
index 716cd46..cb22ed6 100644
--- a/library/tk.tcl
+++ b/library/tk.tcl
@@ -3,7 +3,7 @@
# Initialization script normally executed in the interpreter for each
# Tk-based application. Arranges class bindings for widgets.
#
-# RCS: @(#) $Id: tk.tcl,v 1.47 2003/03/04 23:50:42 dgp Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.48 2003/05/19 14:44:03 dkf Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -516,6 +516,24 @@ proc ::tk::AmpWidget {class path args} {
return $path
}
+# ::tk::AmpMenuArgs --
+# Processes arguments for a menu entry, turning -label option into
+# -label and -underline options, returned by ::tk::UnderlineAmpersand.
+#
+proc ::tk::AmpMenuArgs {widget add type args} {
+ set resultArgs [list $widget add $type]
+ foreach {opt val} $args {
+ if {[string equal $opt {-label}]} {
+ foreach {newlabel under} [::tk::UnderlineAmpersand $val] {
+ lappend resultArgs -label $newlabel -underline $under
+ }
+ } else {
+ lappend resultArgs $opt $val
+ }
+ }
+ eval $resultArgs
+}
+
# ::tk::FindAltKeyTarget --
# search recursively through the hierarchy of visible widgets
# to find button or label which has $char as underlined character