summaryrefslogtreecommitdiffstats
path: root/library/choosedir.tcl
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-04-12 20:33:34 (GMT)
committerhobbs <hobbs>2005-04-12 20:33:34 (GMT)
commit56d7376fb090c2f916062d0245252d6fdeaba8e4 (patch)
tree5e9b03294f4c71d99e9f9cc5b19d2a4ddce84973 /library/choosedir.tcl
parentc61b32b618d0c41788bdd20bd8b5c9499f897551 (diff)
downloadtk-56d7376fb090c2f916062d0245252d6fdeaba8e4.zip
tk-56d7376fb090c2f916062d0245252d6fdeaba8e4.tar.gz
tk-56d7376fb090c2f916062d0245252d6fdeaba8e4.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..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,