| 1 |
|
# SCCSid "$SunId$ LBL" |
| 2 |
|
# |
| 3 |
< |
# Usage: getfile [-win w] [-perm] [-glob pattern] [-view proc] [-send proc] |
| 3 |
> |
# Usage: getfile [-win w] [-grab] [-perm] [-glob pattern] [-view proc] [-send proc] |
| 4 |
|
# |
| 5 |
|
# Create a dialog box (in window w if given) to get file name. |
| 6 |
+ |
# If -grab option is given, then getfile does a local grab on its window. |
| 7 |
|
# Normally, a single file name and return as value. |
| 8 |
|
# If perm switch is given, keep window up for multiple file entries. |
| 9 |
|
# If pattern is given, start with list of all the specified files, |
| 20 |
|
# Set defaults |
| 21 |
|
set w .fpwin |
| 22 |
|
set topwin 1 |
| 23 |
+ |
set dograb 0 |
| 24 |
|
set curdir . |
| 25 |
|
set curpat * |
| 26 |
|
set transient 1 |
| 32 |
|
set topwin 0 |
| 33 |
|
set args [lreplace $args 1 1] |
| 34 |
|
} |
| 35 |
+ |
-grab { |
| 36 |
+ |
set dograb 1 |
| 37 |
+ |
} |
| 38 |
|
-perm* { |
| 39 |
|
set transient 0 |
| 40 |
|
} |
| 68 |
|
frame $w -geometry 400x410 |
| 69 |
|
pack $w |
| 70 |
|
} |
| 71 |
+ |
if $dograb { grab $w } |
| 72 |
+ |
$w configure -cursor top_left_arrow |
| 73 |
|
label $w.dt -text Directory: |
| 74 |
|
place $w.dt -relx .025 -rely .03125 |
| 75 |
|
helplink $w.dt file directory intro |