summaryrefslogtreecommitdiffstats
path: root/library/choosedir.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-04-12 20:33:09 (GMT)
committerhobbs <hobbs>2005-04-12 20:33:09 (GMT)
commitce797b74d036be07403642fbc7356d8713572f13 (patch)
treee1918dafa1282b7e59f3705e89d6bbc51a9daab5 /library/choosedir.tcl
parenta846194a7bf66a5b3c086ad3a5f8aeb97f41620e (diff)
downloadtk-ce797b74d036be07403642fbc7356d8713572f13.zip
tk-ce797b74d036be07403642fbc7356d8713572f13.tar.gz
tk-ce797b74d036be07403642fbc7356d8713572f13.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.
Diffstat (limited to 'library/choosedir.tcl')
-rw-r--r--library/choosedir.tcl14
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,