diff options
author | hobbs <hobbs@noemail.net> | 2005-04-12 20:33:33 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2005-04-12 20:33:33 (GMT) |
commit | 6a95d1f43a789d24dca64cc75852c938f3beef85 (patch) | |
tree | 5e9b03294f4c71d99e9f9cc5b19d2a4ddce84973 /library/choosedir.tcl | |
parent | c9b58a9263d2b4955e608d945862e3b9695b7f50 (diff) | |
download | tk-6a95d1f43a789d24dca64cc75852c938f3beef85.zip tk-6a95d1f43a789d24dca64cc75852c938f3beef85.tar.gz tk-6a95d1f43a789d24dca64cc75852c938f3beef85.tar.bz2 |
* library/tkfbox.tcl (::tk::dialog::file::): fix typeMenuLab ref.
Add undoc'd ::tk::dialog::file::showHiddenBtn var (default 0) that
will add a "Show Hidden" checkbutton to tk_get*File and
tk_chooseDirectory if set to true.
* library/choosedir.tcl (::tk::dialog::file::chooseDir::): fix
cancelBtn ref, add hiddenBtn ref for "Show Hidden" button.
FossilOrigin-Name: 0e16b439a5ecd4cd559cb221339c4b862ef31aa9
Diffstat (limited to 'library/choosedir.tcl')
-rw-r--r-- | library/choosedir.tcl | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/library/choosedir.tcl b/library/choosedir.tcl index f52cb94..073dedc 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.15 2002/07/22 21:25:39 mdejong Exp $ +# RCS: @(#) $Id: choosedir.tcl,v 1.15.2.1 2005/04/12 20:33:35 hobbs Exp $ # Make sure the tk::dialog namespace, in which all dialogs should live, exists namespace eval ::tk::dialog {} @@ -13,7 +13,7 @@ namespace eval ::tk::dialog::file {} # Make the chooseDir namespace inside the dialog namespace namespace eval ::tk::dialog::file::chooseDir { - namespace import ::tk::msgcat::* + namespace import -force ::tk::msgcat::* } # ::tk::dialog::file::chooseDir:: -- @@ -49,7 +49,15 @@ proc ::tk::dialog::file::chooseDir:: {args} { set data(icons) $w.icons set data(ent) $w.f2.ent set data(okBtn) $w.f2.ok - set data(cancelBtn) $w.f3.cancel + set data(cancelBtn) $w.f2.cancel + set data(hiddenBtn) $w.f2.hidden + } + if {$::tk::dialog::file::showHiddenBtn} { + $data(hiddenBtn) configure -state normal + grid $data(hiddenBtn) + } else { + $data(hiddenBtn) configure -state disabled + grid remove $data(hiddenBtn) } # Dialog boxes should be transient with respect to their parent, |