summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--library/tk.tcl6
-rw-r--r--library/xmfbox.tcl7
-rw-r--r--tests/filebox.test9
4 files changed, 27 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 8bfbff3..9d311b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2000-06-30 Eric Melski <ericm@scriptics.com>
+
+ * tests/filebox.test: Adjusted tests to accomodate -multiple.
+
+ * library/xmfbox.tcl: Adjusted arguments list construction such
+ that -multiple is not presented as an option for tk_getSaveFile.
+
+ * library/tk.tcl: Added test for safe interpreter status before
+ attempting to load message catalogs (which is impossible in a
+ standard safe interpreter). This means that SafeTk will not have
+ localized dialogs, unless a means is found for loading the message
+ catalog files.
+
2000-06-29 Eric Melski <ericm@scriptics.com>
* library/msgs/de.msg: German message catalog.
diff --git a/library/tk.tcl b/library/tk.tcl
index 32de9e1..b43f4df 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.23 2000/06/30 06:38:38 ericm Exp $
+# RCS: @(#) $Id: tk.tcl,v 1.24 2000/06/30 20:19:06 ericm Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -17,7 +17,9 @@
package require -exact Tk 8.4
package require -exact Tcl 8.4
package require msgcat
-::msgcat::mcload [file join $::tk_library msgs]
+if { ![interp issafe] } {
+ ::msgcat::mcload [file join $::tk_library msgs]
+}
# Add Tk's directory to the end of the auto-load search path, if it
# isn't already on the path:
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl
index 5a0dfb0..1861abc 100644
--- a/library/xmfbox.tcl
+++ b/library/xmfbox.tcl
@@ -4,7 +4,7 @@
# Unix platform. This implementation is used only if the
# "tk_strictMotif" flag is set.
#
-# RCS: @(#) $Id: xmfbox.tcl,v 1.13 2000/06/30 06:38:39 ericm Exp $
+# RCS: @(#) $Id: xmfbox.tcl,v 1.14 2000/06/30 20:19:07 ericm Exp $
#
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 Scriptics Corporation
@@ -217,9 +217,12 @@ proc tkMotifFDialog_Config {dataName type argList} {
{-initialfile "" "" ""}
{-parent "" "" "."}
{-title "" "" ""}
- {-multiple "" "" "0"}
+ }
+ if { [string equal $type "open"] } {
+ lappend specs {-multiple "" "" "0"}
}
+ set data(-multiple) 0
# 2: default values depending on the type of the dialog
#
if {![info exists data(selectPath)]} {
diff --git a/tests/filebox.test b/tests/filebox.test
index 4f8242e..bff0465 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: filebox.test,v 1.9 2000/03/24 19:38:57 ericm Exp $
+# RCS: @(#) $Id: filebox.test,v 1.10 2000/06/30 20:19:07 ericm Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -105,7 +105,8 @@ if {$tcl_platform(platform) == "unix"} {
set modes 1
}
-set unknownOptionsMsg {1 {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -parent, or -title}}
+set unknownOptionsMsg(tk_getOpenFile) {1 {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, or -title}}
+set unknownOptionsMsg(tk_getSaveFile) {1 {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -parent, or -title}}
set tmpFile "filebox.tmp"
makeFile {
@@ -130,7 +131,7 @@ foreach mode $modes {
foreach command "tk_getOpenFile tk_getSaveFile" {
test filebox-1.1 "$command command" {
list [catch {$command -foo} msg] $msg
- } $unknownOptionsMsg
+ } $unknownOptionsMsg($command)
catch {$command -foo 1} msg
regsub -all , $msg "" options
@@ -146,7 +147,7 @@ foreach mode $modes {
test filebox-1.3 "$command command" {
list [catch {$command -foo bar} msg] $msg
- } $unknownOptionsMsg
+ } $unknownOptionsMsg($command)
test filebox-1.4 "$command command" {
list [catch {$command -initialdir} msg] $msg