summaryrefslogtreecommitdiffstats
path: root/library/choosedir.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-02-12 21:32:49 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-02-12 21:32:49 (GMT)
commita85ea0898a669c1c6b1a112353e55190a494b27a (patch)
treee44158312b75281757e6b6eb52bdc011a99c44b2 /library/choosedir.tcl
parentcab826dd13561e25319890f82445a6d36effc973 (diff)
downloadtk-a85ea0898a669c1c6b1a112353e55190a494b27a.zip
tk-a85ea0898a669c1c6b1a112353e55190a494b27a.tar.gz
tk-a85ea0898a669c1c6b1a112353e55190a494b27a.tar.bz2
Factor out the IconList megawidget.
Diffstat (limited to 'library/choosedir.tcl')
-rw-r--r--library/choosedir.tcl11
1 files changed, 5 insertions, 6 deletions
diff --git a/library/choosedir.tcl b/library/choosedir.tcl
index 3d14664..2351781 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.23 2007/12/13 15:26:27 dgp Exp $
+# RCS: @(#) $Id: choosedir.tcl,v 1.24 2009/02/12 21:32:49 dkf Exp $
# Make sure the tk::dialog namespace, in which all dialogs should live, exists
namespace eval ::tk::dialog {}
@@ -211,9 +211,9 @@ proc ::tk::dialog::file::chooseDir::OkCmd {w} {
# 4b. If the value is different from the current directory, change to
# that directory.
- set selection [tk::IconList_CurSelection $data(icons)]
+ set selection [$data(icons) selection get]
if {[llength $selection] != 0} {
- set iconText [tk::IconList_Get $data(icons) [lindex $selection 0]]
+ set iconText [$data(icons) get [lindex $selection 0]]
set iconText [file join $data(selectPath) $iconText]
Done $w $iconText
} else {
@@ -261,10 +261,9 @@ proc ::tk::dialog::file::chooseDir::IsOK? {w text} {
proc ::tk::dialog::file::chooseDir::DblClick {w} {
upvar ::tk::dialog::file::[winfo name $w] data
- set selection [tk::IconList_CurSelection $data(icons)]
+ set selection [$data(icons) selection get]
if {[llength $selection] != 0} {
- set filenameFragment \
- [tk::IconList_Get $data(icons) [lindex $selection 0]]
+ set filenameFragment [$data(icons) get [lindex $selection 0]]
set file $data(selectPath)
if {[file isdirectory $file]} {
::tk::dialog::file::ListInvoke $w [list $filenameFragment]