diff options
author | hobbs <hobbs@noemail.net> | 2005-04-12 20:33:09 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2005-04-12 20:33:09 (GMT) |
commit | 0ddee0ccef323eabb4416b95064d9b5064a3c461 (patch) | |
tree | e1918dafa1282b7e59f3705e89d6bbc51a9daab5 /library/choosedir.tcl | |
parent | 166b8c748b15cf7c2f300d1bdf35c1fb26d18f20 (diff) | |
download | tk-0ddee0ccef323eabb4416b95064d9b5064a3c461.zip tk-0ddee0ccef323eabb4416b95064d9b5064a3c461.tar.gz tk-0ddee0ccef323eabb4416b95064d9b5064a3c461.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: 73207379889b7e26cb78211dd3e51968d2ac7751
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..0307c15 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.16 2005/04/12 20:33:12 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, |