diff options
author | drh <drh@sqlite.org> | 2001-09-12 19:13:56 (GMT) |
---|---|---|
committer | drh <drh@sqlite.org> | 2001-09-12 19:13:56 (GMT) |
commit | 2c0faa8ec285da5f121e78f155700fd1d6f53ecc (patch) | |
tree | f19489fbf9252e6fddef7aefc5a45a8be0601581 /library | |
parent | 26eeabebd6507166451e07b847a5ce49646edf6d (diff) | |
download | tk-2c0faa8ec285da5f121e78f155700fd1d6f53ecc.zip tk-2c0faa8ec285da5f121e78f155700fd1d6f53ecc.tar.gz tk-2c0faa8ec285da5f121e78f155700fd1d6f53ecc.tar.bz2 |
Fix a problem in the Unix tk_getOpenFile dialog box. An error dialog box used
to appear when you would point the file browser box at an empty directory and
click on the canvas.
Diffstat (limited to 'library')
-rw-r--r-- | library/tkfbox.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 4e2ed56..be10d49 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.29 2001/08/09 00:47:09 dgp Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.30 2001/09/12 19:13:56 drh Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -533,6 +533,7 @@ proc ::tk::IconList_Btn1 {w x y} { set x [expr {int([$data(canvas) canvasx $x])}] set y [expr {int([$data(canvas) canvasy $y])}] set i [IconList_Index $w @${x},${y}] + if {$i==""} return IconList_Selection $w clear 0 end IconList_Selection $w set $i IconList_Selection $w anchor $i @@ -546,6 +547,7 @@ proc ::tk::IconList_CtrlBtn1 {w x y} { set x [expr {int([$data(canvas) canvasx $x])}] set y [expr {int([$data(canvas) canvasy $y])}] set i [IconList_Index $w @${x},${y}] + if {$i==""} return if { [IconList_Selection $w includes $i] } { IconList_Selection $w clear $i } else { @@ -563,6 +565,7 @@ proc ::tk::IconList_ShiftBtn1 {w x y} { set x [expr {int([$data(canvas) canvasx $x])}] set y [expr {int([$data(canvas) canvasy $y])}] set i [IconList_Index $w @${x},${y}] + if {$i==""} return set a [IconList_Index $w anchor] if { [string equal $a ""] } { set a $i @@ -582,6 +585,7 @@ proc ::tk::IconList_Motion1 {w x y} { set x [expr {int([$data(canvas) canvasx $x])}] set y [expr {int([$data(canvas) canvasy $y])}] set i [IconList_Index $w @${x},${y}] + if {$i==""} return IconList_Selection $w clear 0 end IconList_Selection $w set $i } @@ -642,6 +646,7 @@ proc ::tk::IconList_UpDown {w amount} { set i 0 } else { set i [tk::IconList_Index $w anchor] + if {$i==""} return incr i $amount } IconList_Selection $w clear 0 end @@ -670,6 +675,7 @@ proc ::tk::IconList_LeftRight {w amount} { set i 0 } else { set i [IconList_Index $w anchor] + if {$i==""} return incr i [expr {$amount*$data(itemsPerColumn)}] } IconList_Selection $w clear 0 end |