summaryrefslogtreecommitdiffstats
path: root/library/choosedir.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/choosedir.tcl')
-rw-r--r--library/choosedir.tcl16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/choosedir.tcl b/library/choosedir.tcl
index 00dca9d..68dd9b0 100644
--- a/library/choosedir.tcl
+++ b/library/choosedir.tcl
@@ -122,7 +122,7 @@ proc ::tk::dialog::file::chooseDir:: {args} {
# Return value to user
#
-
+
return $Priv(selectFilePath)
}
@@ -164,7 +164,7 @@ proc ::tk::dialog::file::chooseDir::Config {dataName argList} {
if {$data(-title) eq ""} {
set data(-title) "[mc "Choose Directory"]"
}
-
+
# Stub out the -multiple value for the dialog; it doesn't make sense for
# choose directory dialogs, but we have to have something there because we
# share so much code with the file dialogs.
@@ -186,7 +186,8 @@ proc ::tk::dialog::file::chooseDir::Config {dataName argList} {
}
if {![winfo exists $data(-parent)]} {
- error "bad window path name \"$data(-parent)\""
+ return -code error -errorcode [list TK LOOKUP WINDOW $data(-parent)] \
+ "bad window path name \"$data(-parent)\""
}
}
@@ -209,9 +210,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 {
@@ -259,10 +260,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]