summaryrefslogtreecommitdiffstats
path: root/library/tkfbox.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-04-19 23:12:55 (GMT)
committerhobbs <hobbs>2000-04-19 23:12:55 (GMT)
commit12b0f203a7f394fec3738c3e1b762a64031927f3 (patch)
tree48432f0b2c9c70cba5dcbddd5ab06c100214d1cd /library/tkfbox.tcl
parent442d04988d260a0d338a53d0a81b0f17e9a5c3e8 (diff)
downloadtk-12b0f203a7f394fec3738c3e1b762a64031927f3.zip
tk-12b0f203a7f394fec3738c3e1b762a64031927f3.tar.gz
tk-12b0f203a7f394fec3738c3e1b762a64031927f3.tar.bz2
* library/choosedir.tcl (::tk::dialog::file::chooseDir::Config):
* library/tkfbox.tcl (::tk::dialog::file::Config): removed the extraneous glob on -initialdir after file isdir already returned 1 and moved cd trick into this case as the else already uses [pwd]. [Bug: 5181] * win/winMain.c: moved extern call out of WinMain func
Diffstat (limited to 'library/tkfbox.tcl')
-rw-r--r--library/tkfbox.tcl19
1 files changed, 8 insertions, 11 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 42c330d..3bd59d6 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -11,7 +11,7 @@
# files by clicking on the file icons or by entering a filename
# in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.18 2000/03/31 09:24:12 hobbs Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.19 2000/04/19 23:12:56 hobbs Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -771,7 +771,7 @@ proc ::tk::dialog::file::Config {dataName type argList} {
#
tclParseConfigSpec ::tk::dialog::file::$dataName $specs "" $argList
- if {[string equal $data(-title) ""]} {
+ if {$data(-title) == ""} {
if {[string equal $type "open"]} {
set data(-title) "Open"
} else {
@@ -782,19 +782,16 @@ proc ::tk::dialog::file::Config {dataName type argList} {
# 4: set the default directory and selection according to the -initial
# settings
#
- if {[string compare $data(-initialdir) ""]} {
+ if {$data(-initialdir) != ""} {
+ # Ensure that initialdir is an absolute path name.
if {[file isdirectory $data(-initialdir)]} {
- set data(selectPath) [lindex [glob $data(-initialdir)] 0]
+ set old [pwd]
+ cd $data(-initialdir)
+ set data(selectPath) [pwd]
+ cd $old
} else {
set data(selectPath) [pwd]
}
-
- # Convert the initialdir to an absolute path name.
-
- set old [pwd]
- cd $data(selectPath)
- set data(selectPath) [pwd]
- cd $old
}
set data(selectFile) $data(-initialfile)