summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-10-21 13:51:49 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-10-21 13:51:49 (GMT)
commita5f7470fb2e495084108b199c82e9d5d963601b0 (patch)
tree4e36e36b92f4f2836b87ce0b6eade1b056e2cffa /library
parentaccccf31ba1dc7853462e1f041663a5b1ecd6e4d (diff)
downloadtk-a5f7470fb2e495084108b199c82e9d5d963601b0.zip
tk-a5f7470fb2e495084108b199c82e9d5d963601b0.tar.gz
tk-a5f7470fb2e495084108b199c82e9d5d963601b0.tar.bz2
Fixed [3588460fff] - -typevariable buggy in X11, this time when tk_strictMotif is true.
Diffstat (limited to 'library')
-rw-r--r--library/xmfbox.tcl16
1 files changed, 5 insertions, 11 deletions
diff --git a/library/xmfbox.tcl b/library/xmfbox.tcl
index aa66f7f..f1daea0 100644
--- a/library/xmfbox.tcl
+++ b/library/xmfbox.tcl
@@ -156,7 +156,7 @@ proc ::tk::MotifFDialog_FileTypes {w} {
# The filetypes radiobuttons
# set data(fileType) $data(-defaulttype)
# Default type to first entry
- set initialTypeName [lindex $data(-filetypes) 0 0]
+ set initialTypeName [lindex $data(origfiletypes) 0 0]
if {$data(-typevariable) ne ""} {
upvar #0 $data(-typevariable) typeVariable
if {[info exists typeVariable]} {
@@ -165,7 +165,7 @@ proc ::tk::MotifFDialog_FileTypes {w} {
}
set ix 0
set data(fileType) 0
- foreach fltr $data(-filetypes) {
+ foreach fltr $data(origfiletypes) {
set fname [lindex $fltr 0]
if {[string first $initialTypeName $fname] == 0} {
set data(fileType) $ix
@@ -185,7 +185,7 @@ proc ::tk::MotifFDialog_FileTypes {w} {
set cnt 0
if {$data(-filetypes) ne {}} {
foreach type $data(-filetypes) {
- set title [lindex [lindex $type 0] 0]
+ set title [lindex $type 0]
set filter [lindex $type 1]
radiobutton $f.b$cnt \
-text $title \
@@ -210,7 +210,6 @@ proc ::tk::MotifFDialog_SetFilter {w type} {
variable ::tk::Priv
set data(filter) [lindex $type 1]
- set Priv(selectFileType) [lindex [lindex $type 0] 0]
MotifFDialog_Update $w
}
@@ -299,6 +298,7 @@ proc ::tk::MotifFDialog_Config {dataName type argList} {
# file dialog, but we check for validity of the value to make sure
# the application code also runs fine with the TK file dialog.
#
+ set data(origfiletypes) $data(-filetypes)
set data(-filetypes) [::tk::FDGetFileTypes $data(-filetypes)]
if {![info exists data(filter)]} {
@@ -870,7 +870,7 @@ proc ::tk::MotifFDialog_ActivateSEnt {w} {
if {[info exists data(-typevariable)] && $data(-typevariable) ne ""
&& [info exists data(-filetypes)] && $data(-filetypes) ne ""} {
upvar #0 $data(-typevariable) typeVariable
- set typeVariable [lindex $data(-filetypes) $data(fileType) 0]
+ set typeVariable [lindex $data(origfiletypes) $data(fileType) 0]
}
if {$data(-multiple) != 0} {
@@ -980,9 +980,3 @@ proc ::tk::ListBoxKeyAccel_Reset {w} {
unset -nocomplain Priv(lbAccel,$w)
}
-proc ::tk_getFileType {} {
- variable ::tk::Priv
-
- return $Priv(selectFileType)
-}
-