Tk Source Code

Artifact [ae794d17]
Login

Artifact ae794d17b1cf70d943dce0de1cc76918d9f8bfad:

Attachment "mc.patch" to ticket [539309ff] added by dgp 2002-04-16 23:02:48.
Index: library/choosedir.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/choosedir.tcl,v
retrieving revision 1.11
diff -u -r1.11 choosedir.tcl
--- library/choosedir.tcl	17 Sep 2001 14:12:18 -0000	1.11
+++ library/choosedir.tcl	16 Apr 2002 15:58:01 -0000
@@ -13,6 +13,7 @@
 
 # Make the chooseDir namespace inside the dialog namespace
 namespace eval ::tk::dialog::file::chooseDir {
+    namespace import ::tk::msgcat::*
 }
 
 # ::tk::dialog::file::chooseDir:: --
@@ -135,7 +136,7 @@
     tclParseConfigSpec ::tk::dialog::file::$dataName $specs "" $argList
 
     if {$data(-title) == ""} {
-	set data(-title) "[::msgcat::mc "Choose Directory"]"
+	set data(-title) "[mc "Choose Directory"]"
     }
 
     # Stub out the -multiple value for the dialog; it doesn't make sense for
Index: library/clrpick.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/clrpick.tcl,v
retrieving revision 1.14
diff -u -r1.14 clrpick.tcl
--- library/clrpick.tcl	12 Nov 2001 18:30:53 -0000	1.14
+++ library/clrpick.tcl	16 Apr 2002 15:58:01 -0000
@@ -20,7 +20,9 @@
 # Make sure namespaces exist
 namespace eval ::tk {}
 namespace eval ::tk::dialog {}
-namespace eval ::tk::dialog::color {}
+namespace eval ::tk::dialog::color {
+    namespace import ::tk::msgcat::*
+}
 
 # ::tk::dialog::color:: --
 #
@@ -170,7 +172,7 @@
     set specs [list \
 	    [list -initialcolor "" "" $defaultColor] \
 	    [list -parent "" "" "."] \
-	    [list -title "" "" [::msgcat::mc "Color"]] \
+	    [list -title "" "" [mc "Color"]] \
 	    ]
 
     # 2: parse the arguments
@@ -203,12 +205,12 @@
     # StripsFrame contains the colorstrips and the individual RGB entries
     set stripsFrame [frame $topFrame.colorStrip]
 
-    set maxWidth [::msgcat::mcmax Red Green Blue]
+    set maxWidth [mcmax Red Green Blue]
     set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
     set colorList [list \
-	    red		[::msgcat::mc "Red"]	\
-	    green	[::msgcat::mc "Green"]	\
-	    blue	[::msgcat::mc "Blue"]	\
+	    red		[mc "Red"]	\
+	    green	[mc "Green"]	\
+	    blue	[mc "Blue"]	\
 	    ]
     foreach {color l} $colorList {
 	# each f frame contains an [R|G|B] entry and the equiv. color strip.
@@ -263,7 +265,7 @@
     # selected color
     #
     set selFrame [frame $topFrame.sel]
-    set lab [label $selFrame.lab -text [::msgcat::mc "Selection:"] \
+    set lab [label $selFrame.lab -text [mc "Selection:"] \
 	    -under 0 -anchor sw]
     set ent [entry $selFrame.ent \
 	-textvariable ::tk::dialog::color::[winfo name $w](selection) \
@@ -283,12 +285,12 @@
     # the botFrame frame contains the buttons
     #
     set botFrame [frame $w.bot -relief raised -bd 1]
-    set maxWidth [::msgcat::mcmax OK Cancel]
+    set maxWidth [mcmax OK Cancel]
     set maxWidth [expr {$maxWidth<8?8:$maxWidth}]
-    button $botFrame.ok     -text [::msgcat::mc "OK"]		\
+    button $botFrame.ok     -text [mc "OK"]		\
 	    -width $maxWidth -under 0				\
 	    -command [list tk::dialog::color::OkCmd $w]
-    button $botFrame.cancel -text [::msgcat::mc "Cancel"]	\
+    button $botFrame.cancel -text [mc "Cancel"]	\
 	    -width $maxWidth -under 0				\
 	    -command [list tk::dialog::color::CancelCmd $w]
 
Index: library/console.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/console.tcl,v
retrieving revision 1.17
diff -u -r1.17 console.tcl
--- library/console.tcl	1 Mar 2002 00:04:27 -0000	1.17
+++ library/console.tcl	16 Apr 2002 15:58:02 -0000
@@ -14,7 +14,6 @@
 #
 
 # TODO: history - remember partially written command
-package require msgcat
 
 namespace eval ::tk::console {
     variable blinkTime   500 ; # msecs to blink braced range for
@@ -60,38 +59,38 @@
     .menubar add cascade -label Edit -menu .menubar.edit -underline 0
 
     menu .menubar.file -tearoff 0
-    .menubar.file add command -label [::msgcat::mc "Source..."] \
+    .menubar.file add command -label [mc "Source..."] \
 	    -underline 0 -command tk::ConsoleSource
-    .menubar.file add command -label [::msgcat::mc "Hide Console"] \
+    .menubar.file add command -label [mc "Hide Console"] \
 	    -underline 0 -command {wm withdraw .}
-    .menubar.file add command -label [::msgcat::mc "Clear Console"] \
+    .menubar.file add command -label [mc "Clear Console"] \
 	    -underline 0 -command {.console delete 1.0 "promptEnd linestart"}
     if {[string compare $tcl_platform(platform) "macintosh"]} {
-	.menubar.file add command -label [::msgcat::mc "Exit"] \
+	.menubar.file add command -label [mc "Exit"] \
 		-underline 1 -command exit
     } else {
-	.menubar.file add command -label [::msgcat::mc "Quit"] \
+	.menubar.file add command -label [mc "Quit"] \
 		-command exit -accel Cmd-Q
     }
 
     menu .menubar.edit -tearoff 0
-    .menubar.edit add command -label [::msgcat::mc "Cut"] -underline 2 \
+    .menubar.edit add command -label [mc "Cut"] -underline 2 \
 	    -command { event generate .console <<Cut>> } -accel "$mod+X"
-    .menubar.edit add command -label [::msgcat::mc "Copy"] -underline 0 \
+    .menubar.edit add command -label [mc "Copy"] -underline 0 \
 	    -command { event generate .console <<Copy>> } -accel "$mod+C"
-    .menubar.edit add command -label [::msgcat::mc "Paste"] -underline 1 \
+    .menubar.edit add command -label [mc "Paste"] -underline 1 \
 	    -command { event generate .console <<Paste>> } -accel "$mod+V"
 
     if {[string compare $tcl_platform(platform) "windows"]} {
-	.menubar.edit add command -label [::msgcat::mc "Clear"] -underline 2 \
+	.menubar.edit add command -label [mc "Clear"] -underline 2 \
 		-command { event generate .console <<Clear>> }
     } else {
-	.menubar.edit add command -label [::msgcat::mc "Delete"] -underline 0 \
+	.menubar.edit add command -label [mc "Delete"] -underline 0 \
 		-command { event generate .console <<Clear>> } -accel "Del"
 	
 	.menubar add cascade -label Help -menu .menubar.help -underline 0
 	menu .menubar.help -tearoff 0
-	.menubar.help add command -label [::msgcat::mc "About..."] \
+	.menubar.help add command -label [mc "About..."] \
 		-underline 0 -command tk::ConsoleAbout
     }
 
@@ -124,7 +123,7 @@
     focus $con
 
     wm protocol . WM_DELETE_WINDOW { wm withdraw . }
-    wm title . [::msgcat::mc "Console"]
+    wm title . [mc "Console"]
     flush stdout
     $con mark set output [$con index "end - 1 char"]
     tk::TextSetCursor $con end
@@ -141,10 +140,10 @@
 
 proc ::tk::ConsoleSource {} {
     set filename [tk_getOpenFile -defaultextension .tcl -parent . \
-	    -title [::msgcat::mc "Select a file to source"] \
+	    -title [mc "Select a file to source"] \
 	    -filetypes [list \
-	    [list [::msgcat::mc "Tcl Scripts"] .tcl] \
-	    [list [::msgcat::mc "All Files"] *]]]
+	    [list [mc "Tcl Scripts"] .tcl] \
+	    [list [mc "All Files"] *]]]
     if {[string compare $filename ""]} {
     	set cmd [list source $filename]
 	if {[catch {consoleinterp eval $cmd} result]} {
@@ -577,7 +576,7 @@
 # None.
 
 proc ::tk::ConsoleAbout {} {
-    tk_messageBox -type ok -message "[::msgcat::mc {Tcl for Windows}]
+    tk_messageBox -type ok -message "[mc {Tcl for Windows}]
 
 Tcl $::tcl_patchLevel
 Tk $::tk_patchLevel"
Index: library/msgbox.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/msgbox.tcl,v
retrieving revision 1.15
diff -u -r1.15 msgbox.tcl
--- library/msgbox.tcl	6 Aug 2001 18:29:41 -0000	1.15
+++ library/msgbox.tcl	16 Apr 2002 15:58:02 -0000
@@ -171,66 +171,66 @@
 
     switch -- $data(-type) {
 	abortretryignore {
-	    set maxWidth [::msgcat::mcmax Abort Retry Ignore]
+	    set maxWidth [mcmax Abort Retry Ignore]
 	    set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
 	    set buttons [list \
-		[list abort  -width $maxWidth -text [::msgcat::mc "Abort"] \
+		[list abort  -width $maxWidth -text [mc "Abort"] \
 		    -under 0]\
-		[list retry  -width $maxWidth -text [::msgcat::mc "Retry"] \
+		[list retry  -width $maxWidth -text [mc "Retry"] \
 		    -under 0]\
-		[list ignore -width $maxWidth -text [::msgcat::mc "Ignore"] \
+		[list ignore -width $maxWidth -text [mc "Ignore"] \
 		    -under 0]\
 	    ]
 	}
 	ok {
 	    set buttons [list \
-		[list ok -width [::msgcat::mcmax OK] \
-		    -text [::msgcat::mc {OK}] -under 0] \
+		[list ok -width [mcmax OK] \
+		    -text [mc {OK}] -under 0] \
 	    ]
 	    if {[string equal $data(-default) ""]} {
 		set data(-default) "ok"
 	    }
 	}
 	okcancel {
-	    set maxWidth [::msgcat::mcmax OK Cancel]
+	    set maxWidth [mcmax OK Cancel]
 	    set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
 	    set buttons [list \
 		[list ok     -width $maxWidth \
-		    -text [::msgcat::mc "OK"]     -under 0] \
+		    -text [mc "OK"]     -under 0] \
 		[list cancel -width $maxWidth \
-		    -text [::msgcat::mc "Cancel"] -under 0] \
+		    -text [mc "Cancel"] -under 0] \
 	    ]
 	}
 	retrycancel {
-	    set maxWidth [::msgcat::mcmax Retry Cancel]
+	    set maxWidth [mcmax Retry Cancel]
 	    set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
 	    set buttons [list \
 		[list retry  -width $maxWidth \
-		    -text [::msgcat::mc "Retry"]  -under 0] \
+		    -text [mc "Retry"]  -under 0] \
 		[list cancel -width $maxWidth \
-		    -text [::msgcat::mc "Cancel"] -under 0] \
+		    -text [mc "Cancel"] -under 0] \
 	    ]
 	}
 	yesno {
-	    set maxWidth [::msgcat::mcmax Yes No]
+	    set maxWidth [mcmax Yes No]
 	    set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
 	    set buttons [list \
 		[list yes    -width $maxWidth \
-		    -text [::msgcat::mc "Yes"] -under 0]\
+		    -text [mc "Yes"] -under 0]\
 		[list no     -width $maxWidth \
-		    -text [::msgcat::mc "No"]  -under 0]\
+		    -text [mc "No"]  -under 0]\
 	    ]
 	}
 	yesnocancel {
-	    set maxWidth [::msgcat::mcmax Yes No Cancel]
+	    set maxWidth [mcmax Yes No Cancel]
 	    set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
 	    set buttons [list \
 		[list yes    -width $maxWidth \
-		    -text [::msgcat::mc "Yes"] -under 0]\
+		    -text [mc "Yes"] -under 0]\
 		[list no     -width $maxWidth \
-		    -text [::msgcat::mc "No"]  -under 0]\
+		    -text [mc "No"]  -under 0]\
 		[list cancel -width $maxWidth \
-		    -text [::msgcat::mc "Cancel"] -under 0]\
+		    -text [mc "Cancel"] -under 0]\
 	    ]
 	}
 	default {
Index: library/tk.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/tk.tcl,v
retrieving revision 1.36
diff -u -r1.36 tk.tcl
--- library/tk.tcl	16 Apr 2002 11:41:53 -0000	1.36
+++ library/tk.tcl	16 Apr 2002 15:58:02 -0000
@@ -16,36 +16,37 @@
 package require -exact Tk 8.4
 package require -exact Tcl 8.4
 
-if { ![interp issafe] } {
-    if {[catch {package require msgcat}]} {
-	# msgcat not found. A minimal msgcat is defined
-	# here, with fail-safe versions of the msgcat::mc and
-	# msgcat::mcmax procedures, which happen to be the msgcat 
-	# services used by tk widgets.
-	# See the msgcat package for details about the simulated
-	# procedures.
-	namespace eval msgcat {
-	    namespace export mc mcmax
+# Create a ::tk namespace
+
+namespace eval ::tk {
 
+    # Set up the msgcat commands
+    namespace eval msgcat {
+	namespace export mc mcmax
+	if {[interp issafe] || [catch {package require msgcat}]} {
+	    # The msgcat package is not available.  Supply our own
+	    # minimal replacement.
 	    proc mc {src args} {		
-		return [eval [list format $src $args]]
+		return [eval [list format $src] $args]]
 	    }
-
 	    proc mcmax {args} {
 		set max 0
 		foreach string $args {
-		    set len [string length [msgcat::mc $string]]
+		    set len [string length $string]
 		    if {$len>$max} {
 			set max $len
 		    }
 		}
 		return $max
 	    }
-
+	} else {
+	    # Get the commands from the msgcat package that Tk uses.
+	    namespace import ::msgcat::mc
+	    namespace import ::msgcat::mcmax
+	    ::msgcat::mcload [file join $::tk_library msgs]
 	}
-    } else {
-	::msgcat::mcload [file join $::tk_library msgs]
     }
+    namespace import ::tk::msgcat::*
 }
 
 # Add Tk's directory to the end of the auto-load search path, if it
@@ -64,11 +65,6 @@
 # We catch this because safe interpreters may not allow the call.
 
 catch {tk useinputmethods 1}
-
-# Create a ::tk namespace
-
-namespace eval ::tk {
-}
 
 # ::tk::PlaceWindow --
 #   place a toplevel at a particular position
Index: library/tkfbox.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/tkfbox.tcl,v
retrieving revision 1.32
diff -u -r1.32 tkfbox.tcl
--- library/tkfbox.tcl	14 Dec 2001 14:56:46 -0000	1.32
+++ library/tkfbox.tcl	16 Apr 2002 15:58:02 -0000
@@ -766,7 +766,9 @@
 #----------------------------------------------------------------------
 
 namespace eval ::tk::dialog {}
-namespace eval ::tk::dialog::file {}
+namespace eval ::tk::dialog::file {
+    namespace import ::tk::msgcat::*
+}
 
 # ::tk::dialog::file:: --
 #
@@ -925,9 +927,9 @@
 
     if {$data(-title) == ""} {
 	if {[string equal $type "open"]} {
-	    set data(-title) "[::msgcat::mc "Open"]"
+	    set data(-title) "[mc "Open"]"
 	} else {
-	    set data(-title) "[::msgcat::mc "Save As"]"
+	    set data(-title) "[mc "Save As"]"
 	}
     }
 
@@ -977,7 +979,7 @@
     # f1: the frame with the directory option menu
     #
     set f1 [frame $w.f1]
-    label $f1.lab -text "[::msgcat::mc "Directory:"]" -under 0
+    label $f1.lab -text "[mc "Directory:"]" -under 0
     set data(dirMenuBtn) $f1.menu
     set data(dirMenu) [tk_optionMenu $f1.menu [format %s(selectPath) ::tk::dialog::file::$dataName] ""]
     set data(upBtn) [button $f1.up]
@@ -1005,17 +1007,17 @@
     #
     if { [string equal $class TkFDialog] } {
 	if { $data(-multiple) } {
-	    set fNameCaption "[::msgcat::mc {File names:}]"
+	    set fNameCaption "[mc {File names:}]"
 	} else {
-	    set fNameCaption "[::msgcat::mc {File name:}]"
+	    set fNameCaption "[mc {File name:}]"
 	}
-	set fTypeCaption [::msgcat::mc "Files of type:"]
-	set fCaptionWidth [::msgcat::mcmax $fNameCaption $fTypeCaption]
+	set fTypeCaption [mc "Files of type:"]
+	set fCaptionWidth [mcmax $fNameCaption $fTypeCaption]
 	set fCaptionWidth [expr {$fCaptionWidth<14?14:$fCaptionWidth}]
 	set fNameUnder 5
 	set iconListCommand [list ::tk::dialog::file::OkCmd $w]
     } else {
-	set fNameCaption [::msgcat::mc "Selection:"]
+	set fNameCaption [mc "Selection:"]
 	set fNameUnder 0
 	set fCaptionWidth [string length $fNameCaption]
 	set iconListCommand [list ::tk::dialog::file::chooseDir::DblClick $w]
@@ -1068,11 +1070,11 @@
 
     # the okBtn is created after the typeMenu so that the keyboard traversal
     # is in the right order
-	set maxWidth [::msgcat::mcmax OK Cancel]
+	set maxWidth [mcmax OK Cancel]
 	set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
-    set data(okBtn)     [button $f2.ok     -text "[::msgcat::mc "OK"]" \
+    set data(okBtn)     [button $f2.ok     -text "[mc "OK"]" \
 	-under 0 -width $maxWidth -default active -pady 3]
-    set data(cancelBtn) [button $f3.cancel -text "[::msgcat::mc "Cancel"]" \
+    set data(cancelBtn) [button $f3.cancel -text "[mc "Cancel"]" \
 	-under 0 -width $maxWidth -default normal -pady 3]
 
     # pack the widgets in f2 and f3
@@ -1148,9 +1150,9 @@
     set dataName __tk_filedialog
     upvar ::tk::dialog::file::$dataName data
     if { $multi } {
-	set fNameCaption "[::msgcat::mc {File names:}]"
+	set fNameCaption "[mc {File names:}]"
     } else {
-	set fNameCaption "[::msgcat::mc {File name:}]"
+	set fNameCaption "[mc {File name:}]"
     }
     set fNameUnder 5
     set iconListCommand [list ::tk::dialog::file::OkCmd $w]
@@ -1222,7 +1224,7 @@
 	# we normally won't come to here. Anyways, give an error and abort
 	# action.
 	tk_messageBox -type ok -parent $w -message \
-	    "[::msgcat::mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $data(selectPath)]"\
+	    "[mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $data(selectPath)]"\
 	    -icon warning
 	cd $appPWD
 	return
@@ -1305,15 +1307,15 @@
 	# Restore the Open/Save Button if this is a File Dialog
 	#
 	if {[string equal $data(type) open]} {
-	    $data(okBtn) config -text "[::msgcat::mc "Open"]"
-		set maxWidth [string length [::msgcat::mc "Open"]]
+	    $data(okBtn) config -text "[mc "Open"]"
+		set maxWidth [string length [mc "Open"]]
 		if {$maxWidth>[$data(okBtn) cget -width]} {
 			$data(okBtn) config -width $maxWidth
 			$data(cancelBtn) config -width $maxWidth
 		}
 	} else {
-	    $data(okBtn) config -text "[::msgcat::mc "Save"]"
-		set maxWidth [string length [::msgcat::mc "Save"]]
+	    $data(okBtn) config -text "[mc "Save"]"
+		set maxWidth [string length [mc "Save"]]
 		if {$maxWidth>[$data(okBtn) cget -width]} {
 			$data(okBtn) config -width $maxWidth
 			$data(cancelBtn) config -width $maxWidth
@@ -1506,9 +1508,9 @@
     if { [string equal [winfo class $w] TkFDialog] } {
 	# If this is a File Dialog, make sure the buttons are labeled right.
 	if {[string equal $data(type) open]} {
-	    $data(okBtn) config -text "[::msgcat::mc "Open"]"
+	    $data(okBtn) config -text "[mc "Open"]"
 	} else {
-	    $data(okBtn) config -text "[::msgcat::mc "Save"]"
+	    $data(okBtn) config -text "[mc "Save"]"
 	}
     }
 }
@@ -1575,7 +1577,7 @@
 	FILE {
 	    if {[string equal $data(type) open]} {
 		tk_messageBox -icon warning -type ok -parent $w \
-		    -message "[::msgcat::mc "File \"%1\$s\"  does not exist." [file join $path $file]]"
+		    -message "[mc "File \"%1\$s\"  does not exist." [file join $path $file]]"
 		$data(ent) selection range 0 end
 		$data(ent) icursor end
 	    } else {
@@ -1590,20 +1592,20 @@
 	}
 	PATH {
 	    tk_messageBox -icon warning -type ok -parent $w \
-		-message "[::msgcat::mc "Directory \"%1\$s\" does not exist." $path]"
+		-message "[mc "Directory \"%1\$s\" does not exist." $path]"
 	    $data(ent) selection range 0 end
 	    $data(ent) icursor end
 	}
 	CHDIR {
 	    tk_messageBox -type ok -parent $w -message \
-	       "[::msgcat::mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $path]"\
+	       "[mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $path]"\
 		-icon warning
 	    $data(ent) selection range 0 end
 	    $data(ent) icursor end
 	}
 	ERROR {
 	    tk_messageBox -type ok -parent $w -message \
-	       "[::msgcat::mc "Invalid file name \"%1\$s\"." $path]"\
+	       "[mc "Invalid file name \"%1\$s\"." $path]"\
 		-icon warning
 	    $data(ent) selection range 0 end
 	    $data(ent) icursor end
@@ -1708,14 +1710,14 @@
 
 	if { [string equal [winfo class $w] TkFDialog] } {
 	    if {[string equal $data(type) open]} {
-		$data(okBtn) config -text "[::msgcat::mc "Open"]"
+		$data(okBtn) config -text "[mc "Open"]"
 	    } else {
-		$data(okBtn) config -text "[::msgcat::mc "Save"]"
+		$data(okBtn) config -text "[mc "Save"]"
 	    }
 	}
     } else {
 	if { [string equal [winfo class $w] TkFDialog] } {
-	    $data(okBtn) config -text "[::msgcat::mc "Open"]"
+	    $data(okBtn) config -text "[mc "Open"]"
 	}
     }
 }
@@ -1738,7 +1740,7 @@
 	set appPWD [pwd]
 	if {[catch {cd $file}]} {
 	    tk_messageBox -type ok -parent $w -message \
-	       "[::msgcat::mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $file]"\
+	       "[mc "Cannot change to the directory \"%1\$s\".\nPermission denied." $file]"\
 		-icon warning
 	} else {
 	    cd $appPWD
@@ -1785,7 +1787,7 @@
 	    if {[file exists $selectFilePath]} {
 	    set reply [tk_messageBox -icon warning -type yesno\
 		    -parent $w -message \
-			"[::msgcat::mc "File \"%1\$s\" already exists.\nDo you want to overwrite it?" $selectFilePath]"]
+			"[mc "File \"%1\$s\" already exists.\nDo you want to overwrite it?" $selectFilePath]"]
 	    if {[string equal $reply "no"]} {
 		return
 		}
Index: library/xmfbox.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/xmfbox.tcl,v
retrieving revision 1.18
diff -u -r1.18 xmfbox.tcl
--- library/xmfbox.tcl	16 Oct 2001 23:39:32 -0000	1.18
+++ library/xmfbox.tcl	16 Apr 2002 15:58:02 -0000
@@ -237,12 +237,12 @@
     if {[string equal $data(-title) ""]} {
 	if {[string equal $type "open"]} {
 	    if {$data(-multiple) != 0} {
-		set data(-title) "[::msgcat::mc {Open Multiple Files}]"
+		set data(-title) "[mc {Open Multiple Files}]"
 	    } else {
-	    set data(-title) [::msgcat::mc "Open"]
+	    set data(-title) [mc "Open"]
 	    }
 	} else {
-	    set data(-title) [::msgcat::mc "Save As"]
+	    set data(-title) [mc "Save As"]
 	}
     }
 
@@ -323,7 +323,7 @@
 
     # The Filter box
     #
-    label $f1.lab -text [::msgcat::mc "Filter:"] -under 3 -anchor w
+    label $f1.lab -text [mc "Filter:"] -under 3 -anchor w
     entry $f1.ent
     pack $f1.lab -side top -fill x -padx 6 -pady 4
     pack $f1.ent -side top -fill x -padx 4 -pady 0
@@ -332,13 +332,13 @@
     # The file and directory lists
     #
     set data(dList) [MotifFDialog_MakeSList $w $f2a \
-	    [::msgcat::mc "Directory:"] 0 DList]
+	    [mc "Directory:"] 0 DList]
     set data(fList) [MotifFDialog_MakeSList $w $f2b \
-	    [::msgcat::mc "Files:"]     2 FList]
+	    [mc "Files:"]     2 FList]
 
     # The Selection box
     #
-    label $f3.lab -text [::msgcat::mc "Selection:"] -under 0 -anchor w
+    label $f3.lab -text [mc "Selection:"] -under 0 -anchor w
     entry $f3.ent
     pack $f3.lab -side top -fill x -padx 6 -pady 0
     pack $f3.ent -side top -fill x -padx 4 -pady 4
@@ -346,15 +346,15 @@
 
     # The buttons
     #
-    set maxWidth [::msgcat::mcmax OK Filter Cancel]
+    set maxWidth [mcmax OK Filter Cancel]
     set maxWidth [expr {$maxWidth<6?6:$maxWidth}]
-    set data(okBtn) [button $bot.ok -text [::msgcat::mc "OK"] \
+    set data(okBtn) [button $bot.ok -text [mc "OK"] \
 	    -width $maxWidth -under 0 \
 	    -command [list tk::MotifFDialog_OkCmd $w]]
-    set data(filterBtn) [button $bot.filter -text [::msgcat::mc "Filter"] \
+    set data(filterBtn) [button $bot.filter -text [mc "Filter"] \
 	    -width $maxWidth -under 0 \
 	    -command [list tk::MotifFDialog_FilterCmd $w]]
-    set data(cancelBtn) [button $bot.cancel -text [::msgcat::mc "Cancel"] \
+    set data(cancelBtn) [button $bot.cancel -text [mc "Cancel"] \
 	    -width $maxWidth -under 0 \
 	    -command [list tk::MotifFDialog_CancelCmd $w]]
 
@@ -812,7 +812,7 @@
 	    set item [file join $data(selectPath) $item]
 	} elseif {![file exists [file dirname $item]]} {
 	    tk_messageBox -icon warning -type ok \
-	    -message [::msgcat::mc {Directory "%1$s" does not exist.} \
+	    -message [mc {Directory "%1$s" does not exist.} \
 		[file dirname $item]]
 	    return
 	}
@@ -820,16 +820,16 @@
 	if {![file exists $item]} {
 	    if {[string equal $data(type) open]} {
 		tk_messageBox -icon warning -type ok \
-		    -message [::msgcat::mc {File "$item" does not exist.} \
+		    -message [mc {File "$item" does not exist.} \
 			$item]
 		return
 	    }
 	} else {
 	    if {[string equal $data(type) save]} {
 	    set message [format %s%s \
-		[::msgcat::mc {File "%1$s" already exists.\n\n} \
+		[mc {File "%1$s" already exists.\n\n} \
 		    $selectFilePath ] \
-		[::msgcat::mc {Replace existing file?}]]
+		[mc {Replace existing file?}]]
 		set answer [tk_messageBox -icon warning -type yesno \
 				-message $message]
 		if {[string equal $answer "no"]} {