From 2175fd4d04e6c0088b9adfac510d6b7603686997 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 16 May 2007 18:10:34 +0000 Subject: * library/choosedir.tcl: Removed uses of obsolete {expand} * library/comdlg.tcl: syntax; replaced with the now * library/tk.tcl: approved {*}. [Bug 1710633] * tests/canvImg.test: * tests/imgPhoto.test: --- ChangeLog | 6 ++++++ library/choosedir.tcl | 4 ++-- library/comdlg.tcl | 4 ++-- library/tk.tcl | 22 +++++++++++----------- tests/canvImg.test | 6 +++--- tests/imgPhoto.test | 4 ++-- 6 files changed, 26 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d699f1..59755f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-05-16 Don Porter + * library/choosedir.tcl: Removed uses of obsolete {expand} + * library/comdlg.tcl: syntax; replaced with the now + * library/tk.tcl: approved {*}. [Bug 1710633] + * tests/canvImg.test: + * tests/imgPhoto.test: + * tests/bind.test: Make test suite more SCIM-tolerant [Bug 1609316] 2007-05-16 Pat Thoyts diff --git a/library/choosedir.tcl b/library/choosedir.tcl index d5165f6..35cb4e8 100644 --- a/library/choosedir.tcl +++ b/library/choosedir.tcl @@ -5,7 +5,7 @@ # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: choosedir.tcl,v 1.19 2006/01/25 18:22:04 dgp Exp $ +# RCS: @(#) $Id: choosedir.tcl,v 1.20 2007/05/16 18:10:35 dgp Exp $ # Make sure the tk::dialog namespace, in which all dialogs should live, exists namespace eval ::tk::dialog {} @@ -212,7 +212,7 @@ proc ::tk::dialog::file::chooseDir::OkCmd {w} { if {$text eq ""} { return } - set text [file join {expand}[file split [string trim $text]]] + set text [file join {*}[file split [string trim $text]]] if {![file exists $text] || ![file isdirectory $text]} { # Entry contains an invalid directory. If it's the same as the # last time they came through here, reset the saved value and end diff --git a/library/comdlg.tcl b/library/comdlg.tcl index dd8c599..6190fa3 100644 --- a/library/comdlg.tcl +++ b/library/comdlg.tcl @@ -3,7 +3,7 @@ # Some functions needed for the common dialog boxes. Probably need to go # in a different file. # -# RCS: @(#) $Id: comdlg.tcl,v 1.13 2006/01/25 18:22:04 dgp Exp $ +# RCS: @(#) $Id: comdlg.tcl,v 1.14 2007/05/16 18:10:35 dgp Exp $ # # Copyright (c) 1996 Sun Microsystems, Inc. # @@ -259,7 +259,7 @@ proc ::tk::FDGetFileTypes {string} { if {[llength $t] < 2 || [llength $t] > 3} { error "bad file type \"$t\", should be \"typeName {extension ?extensions ...?} ?{macType ?macTypes ...?}?\"" } - lappend fileTypes([lindex $t 0]) {expand}[lindex $t 1] + lappend fileTypes([lindex $t 0]) {*}[lindex $t 1] } set types {} diff --git a/library/tk.tcl b/library/tk.tcl index 9eec59b..d5fae6a 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.61 2007/04/23 21:16:43 das Exp $ +# RCS: @(#) $Id: tk.tcl,v 1.62 2007/05/16 18:10:35 dgp Exp $ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1996 Sun Microsystems, Inc. @@ -25,7 +25,7 @@ namespace eval ::tk { # The msgcat package is not available. Supply our own # minimal replacement. proc mc {src args} { - return [format $src {expand}$args] + return [format $src {*}$args] } proc mcmax {args} { set max 0 @@ -316,35 +316,35 @@ proc ::tk::EventMotifBindings {n1 dummy dummy} { if {![llength [info commands tk_chooseColor]]} { proc ::tk_chooseColor {args} { - return [tk::dialog::color:: {expand}$args] + return [tk::dialog::color:: {*}$args] } } if {![llength [info commands tk_getOpenFile]]} { proc ::tk_getOpenFile {args} { if {$::tk_strictMotif} { - return [tk::MotifFDialog open {expand}$args] + return [tk::MotifFDialog open {*}$args] } else { - return [::tk::dialog::file:: open {expand}$args] + return [::tk::dialog::file:: open {*}$args] } } } if {![llength [info commands tk_getSaveFile]]} { proc ::tk_getSaveFile {args} { if {$::tk_strictMotif} { - return [tk::MotifFDialog save {expand}$args] + return [tk::MotifFDialog save {*}$args] } else { - return [::tk::dialog::file:: save {expand}$args] + return [::tk::dialog::file:: save {*}$args] } } } if {![llength [info commands tk_messageBox]]} { proc ::tk_messageBox {args} { - return [tk::MessageBox {expand}$args] + return [tk::MessageBox {*}$args] } } if {![llength [info command tk_chooseDirectory]]} { proc ::tk_chooseDirectory {args} { - return [::tk::dialog::file::chooseDir:: {expand}$args] + return [::tk::dialog::file::chooseDir:: {*}$args] } } @@ -506,7 +506,7 @@ proc ::tk::AmpWidget {class path args} { lappend options $opt $val } } - set result [$class $path {expand}$options] + set result [$class $path {*}$options] if {$class eq "button"} { bind $path <> [list $path invoke] } @@ -527,7 +527,7 @@ proc ::tk::AmpMenuArgs {widget add type args} { lappend options $opt $val } } - $widget add $type {expand}$options + $widget add $type {*}$options } # ::tk::FindAltKeyTarget -- diff --git a/tests/canvImg.test b/tests/canvImg.test index 5a7cd71..7814d8a 100644 --- a/tests/canvImg.test +++ b/tests/canvImg.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: canvImg.test,v 1.8 2004/05/23 17:34:48 dkf Exp $ +# RCS: @(#) $Id: canvImg.test,v 1.9 2007/05/16 18:10:35 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -252,8 +252,8 @@ foreach check { } { lassign $check name rectCoords testPoint result test $name {ImageToPoint procedure} testImageType { - .c coords rect {expand}$rectCoords - .c gettags [.c find closest {expand}$testPoint] + .c coords rect {*}$rectCoords + .c gettags [.c find closest {*}$testPoint] } $result } diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index 9893e5f..3f1af80 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -9,7 +9,7 @@ # # Author: Paul Mackerras (paulus@cs.anu.edu.au) # -# RCS: @(#) $Id: imgPhoto.test,v 1.24 2006/03/27 15:38:38 dkf Exp $ +# RCS: @(#) $Id: imgPhoto.test,v 1.25 2007/05/16 18:10:35 dgp Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -558,7 +558,7 @@ test imgPhoto-12.1 {Tk_PhotoPutZoomedBlock} hasTeapotPhoto { } {{19 92 192} {169 117 90} 512 512 {19 92 192}} test imgPhoto-13.1 {check separation of images in different interpreters} { - image delete {expand}[image names] + image delete {*}[image names] set data { R0lGODlhQgBkAPUAANbWxs7Wxs7OxsbOxsbGxsbGvb3Gvca9vcDAwL21vbW1vbW1tbWtta2t ta2ltaWltaWlraWctaWcrZycrZyUrZSUrZSMrZSMpYyMrYyMpYyEpYSEpYR7pYR7nHp7pYRz -- cgit v0.12