summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorericm <ericm>2000-02-07 22:12:26 (GMT)
committerericm <ericm>2000-02-07 22:12:26 (GMT)
commit5268a643714d4b68022061ab3626814f3d081bd3 (patch)
treee316ae8fe0cbeb011fa6cc43745e144d7031b466
parentc1f87215c2cad528ea7a4a7617b71a78fa22e077 (diff)
downloadtk-5268a643714d4b68022061ab3626814f3d081bd3.zip
tk-5268a643714d4b68022061ab3626814f3d081bd3.tar.gz
tk-5268a643714d4b68022061ab3626814f3d081bd3.tar.bz2
* library/tkfbox.tcl: Applied patch from bug #4117,
tk_getOpenFile/getSaveFile doesn't do the right thing when user types a directory name in the entry and a default extension is specified.
-rw-r--r--ChangeLog14
-rw-r--r--library/tkfbox.tcl7
2 files changed, 19 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 519734c..e200e1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-02-07 Eric Melski <ericm@scriptics.com>
+
+ * library/tkfbox.tcl: Applied patch from bug #4117,
+ tk_getOpenFile/getSaveFile doesn't do the right thing when user
+ types a directory name in the entry and a default extension is
+ specified.
+
2000-02-05 Jeff Hobbs <hobbs@scriptics.com>
* unix/tkUnixScale.c (TkpDestroyScale): changed ckfree to
@@ -6,6 +13,13 @@
2000-02-03 Eric Melski <ericm@scriptics.com>
+ * tests/canvText.test: test for fix for bug #2525.
+
+ * generic/tkFont.c (Tk_ComputeTextLayout): Was erroneously setting
+ the width of newline-only text display chunks to some arbitrary
+ huge number, instead of 0; this was interfering with things like
+ the canvas find enclosed feature. (bug #2525).
+
* tests/text.test:
* generic/tkText.c (DumpLine/DumpSegment): Changed DumpSegment to
take a TkTextIndex instead of two integer offsets, so that it
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index c5ffc87..fade2bd 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.14 2000/01/21 22:44:42 ericm Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.15 2000/02/07 22:12:26 ericm Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -1138,7 +1138,10 @@ proc tkFDialogResolveFile {context text defaultext} {
set path [tkFDialog_JoinFile $context $text]
- if {[string equal [file ext $path] ""]} {
+ # If the file has no extension, append the default. Be careful not
+ # to do this for directories, otherwise typing a dirname in the box
+ # will give back "dirname.extension" instead of trying to change dir.
+ if {![file isdirectory $path] && [string equal [file ext $path] ""]} {
set path "$path$defaultext"
}