diff options
author | dgp <dgp@noemail.net> | 2011-10-31 14:08:04 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2011-10-31 14:08:04 (GMT) |
commit | a4e8f762ff3fc9115fdf24fc50479c162011f25d (patch) | |
tree | a5c8be59b6c4c89db5885f321bd76a9702423083 | |
parent | fa4f8e80fc9b7f1d3ff057339ef03e5a874e55b6 (diff) | |
parent | 645f77226473c64b9a0d6b119ecc9885296669ef (diff) | |
download | tk-a4e8f762ff3fc9115fdf24fc50479c162011f25d.zip tk-a4e8f762ff3fc9115fdf24fc50479c162011f25d.tar.gz tk-a4e8f762ff3fc9115fdf24fc50479c162011f25d.tar.bz2 |
TIP 382 test suite update and Motif dialog implementation.
FossilOrigin-Name: 027bebf1ed82c66a746d3737275b851061ebd5c2
-rw-r--r-- | library/xmfbox.tcl | 6 | ||||
-rw-r--r-- | tests/filebox.test | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl index 092f177..a1d6048 100644 --- a/library/xmfbox.tcl +++ b/library/xmfbox.tcl @@ -246,8 +246,12 @@ proc ::tk::MotifFDialog_Config {dataName type argList} { if {$type eq "open"} { lappend specs {-multiple "" "" "0"} } + if {$type eq "save"} { + lappend specs {-confirmoverwrite "" "" "1"} + } set data(-multiple) 0 + set data(-confirmoverwrite) 1 # 2: default values depending on the type of the dialog # if {![info exists data(selectPath)]} { @@ -847,7 +851,7 @@ proc ::tk::MotifFDialog_ActivateSEnt {w} { -message [mc {File "%1$s" does not exist.} $item] return } - } elseif {$data(type) eq "save"} { + } elseif {$data(type) eq "save" && $data(-confirmoverwrite)} { set message [format %s%s \ [mc "File \"%1\$s\" already exists.\n\n" $selectFilePath] \ [mc {Replace existing file?}]] diff --git a/tests/filebox.test b/tests/filebox.test index bbd468b..7b9fa2c 100644 --- a/tests/filebox.test +++ b/tests/filebox.test @@ -111,7 +111,7 @@ if {$tcl_platform(platform) == "unix"} { } set unknownOptionsMsg(tk_getOpenFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable} -set unknownOptionsMsg(tk_getSaveFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable} +set unknownOptionsMsg(tk_getSaveFile) {bad option "-foo": must be -confirmoverwrite, -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable} set tmpFile "filebox.tmp" makeFile { |