author | Claus Gittinger <cg@exept.de> |
Mon, 20 Jan 2020 21:02:47 +0100 | |
changeset 19422 | c6ca1c3e0fd7 |
parent 19357 | 0e76e9a27375 |
child 19478 | fd69284871c4 |
permissions | -rw-r--r-- |
19120 | 1 |
"{ Encoding: utf8 }" |
2 |
||
5140 | 3 |
" |
4 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
5 |
All Rights Reserved |
|
6 |
||
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
8250 | 14 |
"{ Package: 'stx:libtool' }" |
15 |
||
15366 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
3892 | 18 |
SimpleDialog subclass:#FileDialog |
19195 | 19 |
instanceVariableNames:'aspects treeBrowser directory pattern filterHolder initialText |
20 |
multipleSelect doubleClickAction cancelLabelHolder okLabelHolder |
|
21 |
startFilename result filterField filenameField viewFiles |
|
22 |
filenameLabelHolder isLoadDialog newDirectoryVisibilityHolder |
|
23 |
appendButtonVisibleHolder appendWasPressed |
|
24 |
buttonPanelVisibleHolder appendLabelHolder |
|
25 |
browseMenuItemVisibleHolder selectedDeviceDrive |
|
26 |
listOfDeviceDrives rootDirectoryHolder initialRoot |
|
27 |
verticalPanelView okLabelEnabled searchInfoBoxVisibleHolder |
|
28 |
searchedDirectoryInfoHolder' |
|
19267 | 29 |
classVariableNames:'LastExtent LastFindPattern AdditionalFolderItemsInMenu' |
19195 | 30 |
poolDictionaries:'' |
31 |
category:'Interface-Tools-File' |
|
3892 | 32 |
! |
33 |
||
34 |
!FileDialog class methodsFor:'documentation'! |
|
35 |
||
5140 | 36 |
copyright |
37 |
" |
|
38 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
39 |
All Rights Reserved |
|
40 |
||
41 |
This software is furnished under a license and may be used |
|
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
47 |
" |
|
48 |
! |
|
49 |
||
3892 | 50 |
documentation |
51 |
" |
|
9767 | 52 |
A slightly better file dialog |
3892 | 53 |
|
54 |
[author:] |
|
55 |
Martin Walser (martin@vercingetorix) |
|
56 |
||
57 |
[instance variables:] |
|
58 |
||
59 |
[class variables:] |
|
60 |
||
61 |
[see also:] |
|
62 |
||
63 |
" |
|
64 |
! |
|
65 |
||
66 |
examples |
|
67 |
" |
|
15451 | 68 |
usually direct access to FileDialog is not recommended; |
69 |
please use the Dialog interface, which is able to dispatch to |
|
70 |
alternative file choosers if the settings say so |
|
71 |
(native dialogs, for example): |
|
3892 | 72 |
[exBegin] |
15451 | 73 |
|fileOrNil| |
74 |
||
75 |
fileOrNil := Dialog requestFileName:'Choose a File'. |
|
76 |
Transcript showCR:fileOrNil |
|
3892 | 77 |
[exEnd] |
78 |
||
15451 | 79 |
simple examples: |
3892 | 80 |
[exBegin] |
5188
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
81 |
FileDialog |
4804 | 82 |
requestFileName:'enter a fileName:' |
83 |
default:'' |
|
84 |
version:nil |
|
85 |
ifFail:['none'] |
|
86 |
pattern:'*.conf' |
|
87 |
fromDirectory:'/etc' |
|
88 |
whenBoxCreatedEvaluate:nil. |
|
89 |
[exEnd] |
|
15451 | 90 |
|
4804 | 91 |
[exBegin] |
92 |
|fd| |
|
93 |
||
94 |
fd := FileDialog new. |
|
95 |
fd multipleSelect:true. |
|
96 |
fd open |
|
3892 | 97 |
[exEnd] |
12816 | 98 |
|
15451 | 99 |
[exBegin] |
100 |
|fd| |
|
101 |
||
102 |
fd := FileDialog new. |
|
103 |
fd multipleSelect:true. |
|
104 |
fd browseMenuItemVisible:false. |
|
105 |
fd open |
|
106 |
[exEnd] |
|
107 |
||
12816 | 108 |
Adding custom components: |
109 |
[exBegin] |
|
15451 | 110 |
Dialog modifyingBoxWith:[:dialog | |
12816 | 111 |
| fmtBox | |
112 |
||
113 |
fmtBox := ComboListView new. |
|
114 |
fmtBox list: #('Comma Separated Values (.csv)' |
|
115 |
'Microsoft Excel (.xls)' |
|
116 |
'Microsoft Excel XML (.xlsx)') . |
|
117 |
fmtBox model:'Select...' asValue. |
|
15451 | 118 |
dialog application addComponent: fmtBox. |
12816 | 119 |
] do:[ |
120 |
Dialog requestFileName: 'Save file as...' |
|
121 |
] |
|
122 |
[exEnd] |
|
123 |
||
3892 | 124 |
" |
5062 | 125 |
! |
126 |
||
127 |
todo |
|
128 |
" |
|
17527 | 129 |
- make the filedialog windows like |
130 |
filename entry field shows only the filename not the whole directory |
|
131 |
the tree always starts in current directory |
|
132 |
the parent tree is shown in a combobox where the perents are selectable |
|
9769 | 133 |
|
17527 | 134 |
- do not expand the ~ or relative pathnames to absolute pathnames |
5062 | 135 |
" |
3892 | 136 |
! ! |
137 |
||
138 |
!FileDialog class methodsFor:'instance creation'! |
|
139 |
||
140 |
requestDirectoryName:title default:aFileName ifFail:failBlock |
|
141 |
"same as requestFileName, but only show directories" |
|
142 |
||
4795 | 143 |
^ self |
144 |
requestDirectoryName:title |
|
145 |
default:aFileName |
|
146 |
ok:nil |
|
147 |
abort:nil |
|
148 |
version:nil |
|
149 |
pattern:nil |
|
150 |
fromDirectory:nil |
|
151 |
ifFail:failBlock |
|
152 |
whenBoxCreatedEvaluate:nil |
|
153 |
asLoadDialog:nil. |
|
3892 | 154 |
|
155 |
" |
|
3904 | 156 |
FileDialog |
3892 | 157 |
requestDirectoryName:'which directory ?' |
4627 | 158 |
default:Filename currentDirectory pathName |
3892 | 159 |
ifFail:'none' |
160 |
" |
|
161 |
! |
|
162 |
||
5336 | 163 |
requestDirectoryName:title default:aFileName ok:okText abort:abortText ifFail:failBlock |
164 |
"same as requestFileName, but only show directories" |
|
165 |
||
166 |
^ self |
|
167 |
requestDirectoryName:title |
|
168 |
default:aFileName |
|
169 |
ok:okText |
|
170 |
abort:abortText |
|
171 |
version:nil |
|
172 |
pattern:nil |
|
173 |
fromDirectory:nil |
|
174 |
ifFail:failBlock |
|
175 |
whenBoxCreatedEvaluate:nil |
|
176 |
asLoadDialog:nil. |
|
177 |
||
178 |
" |
|
179 |
FileDialog |
|
180 |
requestDirectoryName:'which directory ?' |
|
181 |
default:Filename currentDirectory pathName |
|
182 |
ok:'Yes' |
|
183 |
abort:'No' |
|
184 |
ifFail:'none' |
|
185 |
" |
|
186 |
! |
|
187 |
||
5823 | 188 |
requestDirectoryName:title default:aFileName ok:okText abort:abortText ifFail:failBlock acceptReturnAsOK:aBoolean |
189 |
"same as requestFileName, but only show directories" |
|
190 |
||
191 |
^ self |
|
192 |
requestDirectoryName:title |
|
193 |
default:aFileName |
|
194 |
ok:okText |
|
195 |
abort:abortText |
|
196 |
version:nil |
|
197 |
pattern:nil |
|
198 |
fromDirectory:nil |
|
199 |
ifFail:failBlock |
|
200 |
whenBoxCreatedEvaluate:[:box|box doubleClickAction:[:index|box doAccept]] |
|
201 |
asLoadDialog:nil. |
|
202 |
||
203 |
" |
|
204 |
FileDialog |
|
205 |
requestDirectoryName:'which directory ?' |
|
206 |
default:Filename currentDirectory pathName |
|
207 |
ok:'Yes' |
|
208 |
abort:'No' |
|
209 |
ifFail:'none' |
|
210 |
" |
|
211 |
! |
|
212 |
||
3956 | 213 |
requestDirectoryName:titleString default:aFileName ok:okText abort:abortText version:versionSymbol pattern:pattern fromDirectory:aDirectoryPath ifFail:failBlock whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:aBoolean |
3892 | 214 |
"same as requestFileName, but only show directories" |
215 |
||
3956 | 216 |
|enteredFileName instance enteredFileNameString| |
3892 | 217 |
|
4795 | 218 |
instance := self |
219 |
startApplicationFor:titleString |
|
220 |
default:aFileName |
|
221 |
ok:okText |
|
222 |
abort:abortText |
|
223 |
ifFail:failBlock |
|
224 |
pattern:pattern |
|
225 |
fromDirectory:aDirectoryPath |
|
226 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
227 |
asLoadDialog:aBoolean |
|
5329 | 228 |
viewFiles:false |
4795 | 229 |
multipleSelect:false. |
3892 | 230 |
|
231 |
enteredFileNameString := instance result. |
|
232 |
enteredFileNameString isNil ifTrue:[ |
|
233 |
^ failBlock value |
|
234 |
]. |
|
235 |
enteredFileName := enteredFileNameString asFilename. |
|
12896 | 236 |
enteredFileName isRelative ifTrue:[ |
237 |
enteredFileName := instance directory construct:enteredFileNameString |
|
238 |
]. |
|
239 |
||
3892 | 240 |
enteredFileNameString := enteredFileName asString. |
241 |
(enteredFileName notNil |
|
242 |
and:[enteredFileNameString notEmpty]) ifTrue:[ |
|
243 |
versionSymbol isNil ifTrue:[ ^ enteredFileNameString]. |
|
244 |
versionSymbol == #mustBeNew ifTrue:[ |
|
245 |
"/ file may not exist |
|
246 |
enteredFileName exists ifTrue:[^ '']. |
|
247 |
]. |
|
248 |
versionSymbol == #new ifTrue:[ |
|
249 |
"/ file may not exist |
|
250 |
enteredFileName exists ifTrue:[ |
|
6356 | 251 |
(Dialog confirm:(self classResources stringWithCRs:'''%1'' exists.\\Continue anyway ?' with:enteredFileNameString)) |
3892 | 252 |
ifFalse:[^ '']. |
253 |
]. |
|
254 |
]. |
|
255 |
versionSymbol == #mustBeOld ifTrue:[ |
|
256 |
enteredFileName exists ifFalse:[^ '']. |
|
257 |
]. |
|
258 |
versionSymbol == #old ifTrue:[ |
|
259 |
"/ file may not exist |
|
260 |
enteredFileName exists ifFalse:[ |
|
6356 | 261 |
(self confirm:(self classResources stringWithCRs:'''%1'' does not exist yet.\\Continue anyway ?' with:enteredFileNameString)) |
3892 | 262 |
ifFalse:[^ '']. |
263 |
]. |
|
264 |
]. |
|
265 |
FileSelectionBox lastFileSelectionDirectory:(enteredFileNameString). |
|
266 |
]. |
|
267 |
^ enteredFileNameString |
|
268 |
||
269 |
" |
|
270 |
FileDialog |
|
271 |
requestDirectoryName:'which directory ?' |
|
4627 | 272 |
default:Filename currentDirectory pathName |
3892 | 273 |
ifFail:nil |
274 |
" |
|
3956 | 275 |
" |
276 |
FileDialog |
|
277 |
requestDirectoryName:'which directory ?' |
|
4627 | 278 |
default:Filename currentDirectory pathName |
3956 | 279 |
ok:nil |
280 |
abort:nil |
|
281 |
version:nil |
|
282 |
pattern:nil |
|
283 |
fromDirectory:nil |
|
284 |
ifFail:nil |
|
285 |
whenBoxCreatedEvaluate:nil |
|
286 |
asLoadDialog:true |
|
287 |
" |
|
3892 | 288 |
! |
289 |
||
5336 | 290 |
requestDirectoryName:title default:aFileName ok:okText ifFail:failBlock |
291 |
"same as requestFileName, but only show directories" |
|
292 |
||
293 |
^ self |
|
294 |
requestDirectoryName:title |
|
295 |
default:aFileName |
|
296 |
ok:okText |
|
297 |
abort:nil |
|
298 |
version:nil |
|
299 |
pattern:nil |
|
300 |
fromDirectory:nil |
|
301 |
ifFail:failBlock |
|
302 |
whenBoxCreatedEvaluate:nil |
|
303 |
asLoadDialog:nil. |
|
304 |
||
305 |
" |
|
306 |
FileDialog |
|
307 |
requestDirectoryName:'which directory ?' |
|
308 |
default:Filename currentDirectory pathName |
|
309 |
ok:'Yes' |
|
310 |
ifFail:'none' |
|
311 |
" |
|
312 |
! |
|
313 |
||
9765 | 314 |
requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:pattern fromDirectory:aDirectoryPathOrNil |
315 |
"launch a Dialog, which allows user to enter a filename. |
|
316 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
317 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
318 |
The box will show okText in its okButton, abortText in the abortButton. |
|
319 |
The matchPattern is set to pattern initially. |
|
320 |
Return the string, or nil if cancel was pressed." |
|
321 |
||
322 |
^ self |
|
323 |
requestFileName:titleString |
|
324 |
default:defaultName |
|
325 |
ok:okText |
|
326 |
abort:abortText |
|
327 |
pattern:pattern |
|
328 |
fromDirectory:aDirectoryPathOrNil |
|
329 |
whenBoxCreatedEvaluate:nil |
|
330 |
||
331 |
"Created: / 14-02-2011 / 17:59:21 / cg" |
|
332 |
! |
|
333 |
||
3892 | 334 |
requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback |
335 |
||
4795 | 336 |
^ self |
337 |
requestFileName:titleString |
|
338 |
default:defaultName |
|
339 |
ok:okText |
|
340 |
abort:abortText |
|
341 |
version:nil |
|
342 |
ifFail:nil |
|
343 |
pattern:pattern |
|
344 |
fromDirectory:aDirectoryPathOrNil |
|
345 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
3892 | 346 |
! |
347 |
||
348 |
requestFileName:titleString default:defaultName ok:okText abort:abortText version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback |
|
349 |
"launch a Dialog, which allows user to enter a filename. |
|
350 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
351 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
352 |
The box will show okText in its okButton, abortText in the abortButton. |
|
353 |
The matchPattern is set to pattern initially. |
|
354 |
Return the string, or nil if cancel was pressed |
|
355 |
The version argument allows validation of the files existance; |
|
356 |
it may be any of: |
|
357 |
#mustBeNew - fail (return empty string) if the file exists |
|
358 |
#new - confirm if the file exists |
|
359 |
#mustBeOld - fail if the file does not exist |
|
360 |
#old - confirm if the file does not exist |
|
361 |
#any (other) - no validation |
|
362 |
" |
|
363 |
||
4795 | 364 |
^ self |
365 |
requestFileName:titleString |
|
366 |
default:defaultName |
|
367 |
ok:okText |
|
368 |
abort:abortText |
|
369 |
version:versionSymbol |
|
370 |
ifFail:failBlock |
|
371 |
pattern:pattern |
|
372 |
fromDirectory:aDirectoryPath |
|
373 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
374 |
asLoadDialog:nil |
|
3956 | 375 |
! |
376 |
||
19178 | 377 |
requestFileName:titleString default:defaultName ok:okText abort:abortText version:versionSymbol ifFail:failBlock pattern:patternArg fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:aBoolean |
3956 | 378 |
"launch a Dialog, which allows user to enter a filename. |
379 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
380 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
381 |
The box will show okText in its okButton, abortText in the abortButton. |
|
382 |
The matchPattern is set to pattern initially. |
|
383 |
Return the string, or nil if cancel was pressed |
|
384 |
The version argument allows validation of the files existance; |
|
385 |
it may be any of: |
|
386 |
#mustBeNew - fail (return empty string) if the file exists |
|
387 |
#new - confirm if the file exists |
|
388 |
#mustBeOld - fail if the file does not exist |
|
389 |
#old - confirm if the file does not exist |
|
390 |
#any (other) - no validation |
|
391 |
" |
|
392 |
||
3892 | 393 |
|
19178 | 394 |
|patternUsed instance enteredFileName enteredFileNameString| |
395 |
||
396 |
patternUsed := FileSelectionBox lastSuffixPatternUsedForDefault:patternArg. |
|
3892 | 397 |
|
4795 | 398 |
instance := self |
399 |
startApplicationFor:titleString |
|
400 |
default:defaultName |
|
401 |
ok:okText |
|
402 |
abort:abortText |
|
403 |
ifFail:failBlock |
|
19178 | 404 |
pattern:patternUsed |
4795 | 405 |
fromDirectory:aDirectoryPath |
406 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
407 |
asLoadDialog:aBoolean |
|
5329 | 408 |
viewFiles:true |
4795 | 409 |
multipleSelect:false. |
3892 | 410 |
|
411 |
enteredFileNameString := instance result. |
|
16265 | 412 |
enteredFileNameString isEmptyOrNil ifTrue:[ |
3892 | 413 |
^ failBlock value |
414 |
]. |
|
16265 | 415 |
|
3892 | 416 |
enteredFileName := enteredFileNameString asFilename. |
12896 | 417 |
enteredFileName isRelative ifTrue:[ |
16265 | 418 |
(versionSymbol isNil and:[#(http https ftp) includes:(enteredFileNameString upToAll:'://')]) ifTrue:[ |
419 |
^ enteredFileNameString. |
|
420 |
] ifFalse:[ |
|
421 |
enteredFileName := instance directory construct:enteredFileNameString. |
|
422 |
enteredFileNameString := enteredFileName asString. |
|
3892 | 423 |
]. |
424 |
]. |
|
16265 | 425 |
|
426 |
FileSelectionBox lastFileSelectionDirectory:(enteredFileName directoryName). |
|
19178 | 427 |
(patternArg notEmptyOrNil and:[instance pattern ~= patternArg]) ifTrue:[ |
428 |
FileSelectionBox lastSuffixPatternUsedForDefault:patternArg is:instance pattern |
|
429 |
]. |
|
16265 | 430 |
|
431 |
versionSymbol isNil ifTrue:[ ^ enteredFileNameString]. |
|
432 |
versionSymbol == #mustBeNew ifTrue:[ |
|
433 |
"/ file must not exist |
|
434 |
enteredFileName exists ifTrue:[^ failBlock value]. |
|
435 |
]. |
|
436 |
versionSymbol == #new ifTrue:[ |
|
437 |
"/ file should not exist |
|
438 |
enteredFileName exists ifTrue:[ |
|
439 |
(Dialog confirm:(self classResources stringWithCRs:'''%1'' exists.\\Continue anyway ?' with:enteredFileNameString)) |
|
440 |
ifFalse:[^ failBlock value]. |
|
441 |
]. |
|
442 |
]. |
|
443 |
versionSymbol == #mustBeOld ifTrue:[ |
|
444 |
"/ file must exist |
|
445 |
enteredFileName exists ifFalse:[^ failBlock value]. |
|
446 |
]. |
|
447 |
versionSymbol == #old ifTrue:[ |
|
448 |
"/ file should exist |
|
449 |
enteredFileName exists ifFalse:[ |
|
450 |
(self confirm:(self classResources stringWithCRs:'''%1'' does not exist yet.\\Continue anyway ?' with:enteredFileNameString)) |
|
451 |
ifFalse:[^ failBlock value]. |
|
452 |
]. |
|
453 |
]. |
|
454 |
||
3892 | 455 |
^ enteredFileNameString |
3956 | 456 |
" |
457 |
FileDialog |
|
458 |
requestFileName:'enter a fileName:' |
|
459 |
default:'' |
|
460 |
ok:nil |
|
461 |
abort:nil |
|
462 |
version:nil |
|
463 |
ifFail:['none'] |
|
5858
d5648b365b8d
returns construct with defaultName if directory selected on requestFilename
penk
parents:
5853
diff
changeset
|
464 |
pattern:'*' |
4627 | 465 |
fromDirectory:Filename currentDirectory pathName |
3956 | 466 |
whenBoxCreatedEvaluate:nil |
467 |
asLoadDialog:true |
|
468 |
" |
|
3892 | 469 |
! |
470 |
||
9765 | 471 |
requestFileName:titleString default:defaultName pattern:pattern fromDirectory:aDirectory |
472 |
"launch a Dialog, which allows user to enter a filename. |
|
473 |
The files presented initially are those from the current directory. |
|
474 |
The box will show ok/cancel in its buttons. |
|
475 |
The matchPattern is set to pattern initially. |
|
476 |
Return the string or nil if cancel was pressed." |
|
477 |
||
478 |
|resources| |
|
479 |
||
480 |
resources := self classResources. |
|
481 |
^ self |
|
482 |
requestFileName:titleString |
|
483 |
default:defaultName |
|
484 |
ok:(resources string:'OK') |
|
485 |
abort:(resources string:'Cancel') |
|
486 |
pattern:pattern |
|
487 |
fromDirectory:aDirectory |
|
488 |
||
489 |
"Created: / 14-02-2011 / 17:59:14 / cg" |
|
490 |
! |
|
491 |
||
3892 | 492 |
requestFileName:titleString default:defaultName version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback |
493 |
||
4795 | 494 |
^ self |
495 |
requestFileName:titleString |
|
496 |
default:defaultName |
|
497 |
ok:nil |
|
498 |
abort:nil |
|
499 |
version:versionSymbol |
|
500 |
ifFail:failBlock |
|
501 |
pattern:pattern |
|
502 |
fromDirectory:aDirectoryPathOrNil |
|
503 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
3892 | 504 |
|
505 |
" |
|
506 |
FileDialog |
|
507 |
requestFileName:'enter a fileName:' |
|
508 |
default:'' |
|
509 |
version:nil |
|
510 |
ifFail:['none'] |
|
511 |
pattern:'*.conf' |
|
4627 | 512 |
fromDirectory:Filename currentDirectory pathName |
3892 | 513 |
whenBoxCreatedEvaluate:nil. |
514 |
Dialog |
|
515 |
requestFileName:'enter a fileName:' |
|
516 |
default:'' |
|
517 |
version:nil |
|
518 |
ifFail:['none'] |
|
519 |
pattern:'*.conf' |
|
4627 | 520 |
fromDirectory:Filename currentDirectory pathName |
3892 | 521 |
whenBoxCreatedEvaluate:nil |
522 |
" |
|
523 |
" |
|
524 |
FileDialog |
|
525 |
requestFileName:'enter a fileName:' |
|
526 |
default:'' |
|
527 |
version:#old |
|
528 |
ifFail:['none'] |
|
529 |
pattern:'*.conf' |
|
4627 | 530 |
fromDirectory:Filename currentDirectory pathName |
3892 | 531 |
whenBoxCreatedEvaluate:nil |
532 |
" |
|
533 |
" |
|
534 |
FileDialog |
|
535 |
requestFileName:'enter a fileName:' |
|
536 |
default:'' |
|
537 |
version:#mustBeNew |
|
538 |
ifFail:['none'] |
|
539 |
pattern:'*.conf' |
|
4627 | 540 |
fromDirectory:Filename currentDirectory pathName |
3892 | 541 |
whenBoxCreatedEvaluate:nil |
542 |
" |
|
3904 | 543 |
! |
544 |
||
545 |
requestFileNames:titleString default:defaultName ok:okText abort:abortText ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback |
|
546 |
"launch a Dialog, which allows user to enter a filename. |
|
547 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
548 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
549 |
The box will show okText in its okButton, abortText in the abortButton. |
|
550 |
The matchPattern is set to pattern initially. |
|
3905 | 551 |
Return all selected Filenames as filenames in a collection, or nil if cancel was pressed |
3904 | 552 |
" |
553 |
||
554 |
||
4795 | 555 |
^ self |
556 |
requestFileNames:titleString |
|
557 |
default:defaultName |
|
558 |
ok:okText |
|
559 |
abort:abortText |
|
560 |
ifFail:failBlock |
|
561 |
pattern:pattern |
|
562 |
fromDirectory:aDirectoryPath |
|
563 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
564 |
asLoadDialog:nil. |
|
3956 | 565 |
|
566 |
||
567 |
" |
|
568 |
FileDialog |
|
569 |
requestFileNames:'enter a fileName:' |
|
570 |
default:'' |
|
571 |
ok:nil |
|
572 |
abort:nil |
|
573 |
ifFail:['none'] |
|
574 |
pattern:'*.conf' |
|
4627 | 575 |
fromDirectory:Filename currentDirectory pathName |
3956 | 576 |
whenBoxCreatedEvaluate:nil. |
577 |
" |
|
578 |
! |
|
579 |
||
580 |
requestFileNames:titleString default:defaultName ok:okText abort:abortText ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:asLoadDialog |
|
581 |
"launch a Dialog, which allows user to enter a filename. |
|
582 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
583 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
584 |
The box will show okText in its okButton, abortText in the abortButton. |
|
585 |
The matchPattern is set to pattern initially. |
|
586 |
Return all selected Filenames as filenames in a collection, or nil if cancel was pressed |
|
587 |
" |
|
588 |
||
589 |
||
3904 | 590 |
| instance enteredFileNames lastDirectory| |
591 |
||
4795 | 592 |
instance := self |
593 |
startApplicationFor:titleString |
|
594 |
default:defaultName |
|
595 |
ok:okText |
|
596 |
abort:abortText |
|
597 |
ifFail:failBlock |
|
598 |
pattern:pattern |
|
599 |
fromDirectory:aDirectoryPath |
|
600 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
601 |
asLoadDialog:asLoadDialog |
|
5329 | 602 |
viewFiles:true |
4795 | 603 |
multipleSelect:true. |
3904 | 604 |
|
3996 | 605 |
enteredFileNames := instance currentSelectedFiles. |
3904 | 606 |
(enteredFileNames isEmpty or:[instance result isNil]) ifTrue:[ |
607 |
^ failBlock value |
|
608 |
]. |
|
609 |
lastDirectory := enteredFileNames first. |
|
610 |
lastDirectory := lastDirectory isFilename ifTrue:[lastDirectory directory] ifFalse:[lastDirectory]. |
|
611 |
FileSelectionBox lastFileSelectionDirectory:(lastDirectory directoryName). |
|
612 |
^ enteredFileNames |
|
613 |
||
614 |
" |
|
615 |
FileDialog |
|
616 |
requestFileNames:'enter a fileName:' |
|
617 |
default:'' |
|
618 |
ok:nil |
|
619 |
abort:nil |
|
620 |
ifFail:['none'] |
|
621 |
pattern:'*.conf' |
|
4627 | 622 |
fromDirectory:Filename currentDirectory pathName |
3956 | 623 |
whenBoxCreatedEvaluate:nil |
624 |
asLoadDialog:true. |
|
3904 | 625 |
" |
626 |
! |
|
627 |
||
5790 | 628 |
startApplicationFor:titleString default:initialDefaultFileNameArg ok:okTextArg abort:abortTextArg ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:asLoadDialog viewFiles:viewFiles multipleSelect:multipleSelect |
3904 | 629 |
"launch a Dialog, which allows user to enter a filename. |
630 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
631 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
632 |
The box will show okText in its okButton, abortText in the abortButton. |
|
633 |
The matchPattern is set to pattern initially. |
|
634 |
Return the string, or nil if cancel was pressed |
|
635 |
The version argument allows validation of the files existance; |
|
636 |
it may be any of: |
|
637 |
#mustBeNew - fail (return empty string) if the file exists |
|
638 |
#new - confirm if the file exists |
|
639 |
#mustBeOld - fail if the file does not exist |
|
640 |
#old - confirm if the file does not exist |
|
641 |
#any (other) - no validation |
|
642 |
" |
|
643 |
||
644 |
||
5790 | 645 |
|defaultDir instance defaultFile okText abortText initialDefaultFileName| |
646 |
||
647 |
initialDefaultFileName := initialDefaultFileNameArg. |
|
648 |
initialDefaultFileName notNil ifTrue:[ |
|
13001 | 649 |
initialDefaultFileName := initialDefaultFileName asFilename. |
5790 | 650 |
]. |
5163 | 651 |
|
652 |
okText := okTextArg. |
|
653 |
okText isNil ifTrue:[ okText := self resources string:'OK' ]. |
|
654 |
abortText := abortTextArg. |
|
655 |
abortText isNil ifTrue:[ abortText := self resources string:'Cancel' ]. |
|
3904 | 656 |
|
657 |
defaultDir := aDirectoryPath. |
|
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
658 |
"/ defaultDir isNil ifTrue:[ |
5790 | 659 |
"/ (initialDefaultFileName size > 0 and:[initialDefaultFileName exists]) ifTrue:[ |
660 |
"/ defaultDir := initialDefaultFileName asAbsoluteFilename directory. |
|
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
661 |
"/ ] ifFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
662 |
"/ defaultDir := FileSelectionBox lastFileSelectionDirectory. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
663 |
"/ defaultDir isNil ifTrue:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
664 |
"/ defaultDir := Filename currentDirectory asAbsoluteFilename. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
665 |
"/ ]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
666 |
"/ defaultDir asFilename exists ifFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
667 |
"/ defaultDir := nil |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
668 |
"/ ]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
669 |
"/ ] |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
670 |
"/ ]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
671 |
(initialDefaultFileName notNil |
5790 | 672 |
and:[initialDefaultFileName isAbsolute |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
673 |
and:[true "initialDefaultFileName asFilename exists"]]) ifTrue:[ |
5790 | 674 |
defaultDir := initialDefaultFileName asAbsoluteFilename. |
6953
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
675 |
true "viewFiles" ifTrue:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
676 |
defaultFile := defaultDir asAbsoluteFilename. |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
677 |
defaultDir := defaultDir directory. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
678 |
]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
679 |
] ifFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
680 |
defaultDir isNil ifTrue:[ |
5193 | 681 |
defaultDir := FileSelectionBox lastFileSelectionDirectory. |
682 |
defaultDir isNil ifTrue:[ |
|
683 |
defaultDir := Filename currentDirectory asAbsoluteFilename. |
|
684 |
]. |
|
5188
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
685 |
defaultDir asFilename exists ifFalse:[ |
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
686 |
defaultDir := nil |
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
687 |
]. |
3956 | 688 |
] |
3904 | 689 |
]. |
4206 | 690 |
defaultDir := defaultDir asFilename asAbsoluteFilename. |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
691 |
"/ [defaultDir exists] whileFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
692 |
"/ defaultDir := defaultDir directory. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
693 |
"/ ]. |
5066
57de46852214
Do not select '/tmp/tmp' if '/tmp' is given as default directory
Stefan Vogel <sv@exept.de>
parents:
5062
diff
changeset
|
694 |
|
6953
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
695 |
defaultFile isNil ifTrue:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
696 |
viewFiles ifFalse:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
697 |
defaultFile := defaultDir asAbsoluteFilename. |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
698 |
] ifTrue:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
699 |
(initialDefaultFileName notNil and:[initialDefaultFileName withoutSuffix baseName ~= '*']) ifTrue:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
700 |
defaultFile := defaultDir construct:initialDefaultFileName baseName. |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
701 |
] ifFalse:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
702 |
defaultFile := defaultDir. |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
703 |
]. |
3956 | 704 |
]. |
3904 | 705 |
]. |
3956 | 706 |
|
3904 | 707 |
instance := self new. |
5066
57de46852214
Do not select '/tmp/tmp' if '/tmp' is given as default directory
Stefan Vogel <sv@exept.de>
parents:
5062
diff
changeset
|
708 |
defaultDir notNil ifTrue:[instance directory:defaultDir]. |
15766 | 709 |
instance |
710 |
multipleSelect:multipleSelect ? false; |
|
17410 | 711 |
startFilename:defaultFile; |
712 |
pattern:(pattern isEmptyOrNil ifTrue:['*'] ifFalse:[pattern]); |
|
713 |
initialText:titleString; |
|
714 |
beLoadDialog:asLoadDialog ? false; |
|
715 |
viewFiles:viewFiles ? true. |
|
5571
333ee892a087
thumbsUp/Down in confirm dialog
Claus Gittinger <cg@exept.de>
parents:
5375
diff
changeset
|
716 |
|
19357 | 717 |
instance okLabelHolder value:okText. |
718 |
instance cancelLabelHolder value:abortText. |
|
15766 | 719 |
|
3953 | 720 |
self setDoubleClickActionFor:instance. |
3904 | 721 |
instance allButOpenInterface:#windowSpec. |
722 |
boxCreatedCallback notNil ifTrue:[boxCreatedCallback value:instance]. |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
723 |
|
8661
086147f751d0
AboutToOpenBoxNotificationSignal moved to SimpleView and now raised
Claus Gittinger <cg@exept.de>
parents:
8586
diff
changeset
|
724 |
"/ Dialog aboutToOpenBoxNotificationSignal raiseRequestWith:instance. |
19357 | 725 |
instance treeBrowser sortCaseless value: (Filename isCaseSensitive not). |
3904 | 726 |
instance openWindowModal. |
727 |
^ instance |
|
6953
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
728 |
|
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
729 |
"Modified: / 23-08-2006 / 12:24:54 / cg" |
7571 | 730 |
"Modified: / 13-12-2006 / 16:25:42 / User" |
17410 | 731 |
"Modified (format): / 14-02-2017 / 12:49:34 / cg" |
3892 | 732 |
! ! |
733 |
||
734 |
!FileDialog class methodsFor:'accessing'! |
|
735 |
||
19267 | 736 |
additionalFolderItemsInMenu |
737 |
"any additional folders to be shown in the 'File' menu; |
|
738 |
each element can be either a filename or a pair with filename and menu-item-label." |
|
739 |
||
740 |
"/ FileDialog additionalFolderItemsInMenu:#('/Users/exept' ('/Users/exept/cg_work' 'WorkDir')) |
|
741 |
^ AdditionalFolderItemsInMenu |
|
742 |
! |
|
743 |
||
744 |
additionalFolderItemsInMenu:aCollectionOfFoldernames |
|
745 |
"any additional folders to be shown in the 'File' menu; |
|
746 |
each element can be either a filename or a pair with filename and menu-item-label." |
|
747 |
||
748 |
"/ FileDialog additionalFolderItemsInMenu:#('/Users/exept' ('/Users/exept/cg_work' 'WorkDir')) |
|
749 |
AdditionalFolderItemsInMenu := aCollectionOfFoldernames |
|
750 |
! |
|
751 |
||
6650 | 752 |
classResources |
9110 | 753 |
^ (FileBrowserV2 ? AbstractFileBrowser) classResources |
6650 | 754 |
! |
755 |
||
5931 | 756 |
lastExtent |
757 |
^ LastExtent |
|
758 |
! |
|
759 |
||
760 |
lastExtent:anExtent |
|
761 |
LastExtent := anExtent |
|
762 |
! |
|
763 |
||
3953 | 764 |
setDoubleClickActionFor:instance |
765 |
||
766 |
instance doubleClickAction:[:anIndex| |
|
767 |
| item | |
|
768 |
item := instance treeBrowser fileList at:anIndex ifAbsent:nil. |
|
769 |
item notNil ifTrue:[ |
|
5329 | 770 |
(instance viewFiles and:[item isDirectory not]) ifTrue:[ |
3953 | 771 |
instance doAccept. |
772 |
] |
|
773 |
] |
|
774 |
]. |
|
3892 | 775 |
! ! |
776 |
||
8585 | 777 |
!FileDialog class methodsFor:'help specs'! |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
778 |
|
17919 | 779 |
helpSpec |
8585 | 780 |
"This resource specification was automatically generated |
781 |
by the UIHelpTool of ST/X." |
|
782 |
||
783 |
"Do not manually edit this!! If it is corrupted, |
|
784 |
the UIHelpTool may not be able to read the specification." |
|
785 |
||
786 |
" |
|
787 |
UIHelpTool openOnClass:FileDialog |
|
788 |
" |
|
789 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
790 |
<resource: #help> |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
791 |
|
17919 | 792 |
^ FileBrowserV2 helpSpec addPairsFrom:#( |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
793 |
|
8585 | 794 |
#openFileBrowser |
13003 | 795 |
'Open a FileBrowser on the selected directory' |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
796 |
|
8585 | 797 |
) |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
798 |
! ! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
799 |
|
3892 | 800 |
!FileDialog class methodsFor:'interface specs'! |
801 |
||
802 |
windowSpec |
|
803 |
"This resource specification was automatically generated |
|
804 |
by the UIPainter of ST/X." |
|
805 |
||
806 |
"Do not manually edit this!! If it is corrupted, |
|
807 |
the UIPainter may not be able to read the specification." |
|
808 |
||
809 |
" |
|
810 |
UIPainter new openOnClass:FileDialog andSelector:#windowSpec |
|
811 |
FileDialog new openInterface:#windowSpec |
|
812 |
FileDialog open |
|
813 |
" |
|
814 |
||
815 |
<resource: #canvas> |
|
816 |
||
817 |
^ |
|
13741 | 818 |
#(FullSpec |
819 |
name: windowSpec |
|
19012 | 820 |
uuid: 'b13cef1a-c417-11e9-a4e5-10ddb1cc5928' |
13741 | 821 |
window: |
822 |
(WindowSpec |
|
823 |
label: 'FileDialog' |
|
824 |
name: 'FileDialog' |
|
18527 | 825 |
uuid: '686277b6-e9f6-11e8-8cdd-b8f6b1108e05' |
19012 | 826 |
min: (Point 10 10) bounds: (Rectangle 0 0 460 482) menu: mainMenu |
13741 | 827 |
performer: treeBrowser |
19012 | 828 |
) component: |
13741 | 829 |
(SpecCollection |
830 |
collection: ( |
|
831 |
(VerticalPanelViewSpec |
|
832 |
name: 'FilePanel' |
|
19012 | 833 |
layout: (LayoutFrame 0 0 0 0 0 1 -40 1) uuid: '6862e00c-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 834 |
horizontalLayout: fit |
835 |
verticalLayout: bottomFit |
|
836 |
horizontalSpace: 0 |
|
837 |
verticalSpace: 3 |
|
838 |
elementsChangeSize: true |
|
839 |
component: |
|
840 |
(SpecCollection |
|
841 |
collection: ( |
|
842 |
(ViewSpec |
|
843 |
name: 'FilePart' |
|
18527 | 844 |
uuid: '6862e340-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 845 |
component: |
846 |
(SpecCollection |
|
847 |
collection: ( |
|
848 |
(MenuPanelSpec |
|
849 |
name: 'ToolBar1' |
|
19012 | 850 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 40 0) uuid: '6862e46c-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 851 |
tabable: true |
852 |
menu: toolBarMenu |
|
853 |
textDefault: true |
|
19012 | 854 |
) |
13741 | 855 |
(VariableHorizontalPanelSpec |
856 |
name: 'DeviceAndFilterPanel' |
|
19012 | 857 |
layout: (LayoutFrame 0 0 40 0 0 1 70 0) uuid: '6862e674-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 858 |
level: 1 |
859 |
showHandle: true |
|
860 |
component: |
|
861 |
(SpecCollection |
|
862 |
collection: ( |
|
863 |
(ViewSpec |
|
864 |
name: 'Box1' |
|
18527 | 865 |
uuid: '6862e7f0-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 866 |
component: |
867 |
(SpecCollection |
|
868 |
collection: ( |
|
869 |
(ComboListSpec |
|
870 |
name: 'ComboList1' |
|
19012 | 871 |
layout: (LayoutFrame 1 0 1 0.0 -1 1 -1 1) uuid: '6862e9e4-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 872 |
visibilityChannel: driveSelectorVisible |
873 |
model: selectedDeviceDrive |
|
874 |
comboList: listOfDeviceDrives |
|
875 |
useIndex: false |
|
876 |
hidePullDownMenuButton: false |
|
877 |
) |
|
19012 | 878 |
) |
879 |
) |
|
880 |
) |
|
13741 | 881 |
(ViewSpec |
882 |
name: 'Box2' |
|
18527 | 883 |
uuid: '6862ec82-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 884 |
component: |
885 |
(SpecCollection |
|
886 |
collection: ( |
|
887 |
(LabelSpec |
|
888 |
label: 'Filter:' |
|
889 |
name: 'FilterLabel' |
|
19012 | 890 |
layout: (LayoutFrame 1 0 2 0 59 0 -2 1) uuid: '6862ed9a-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 891 |
translateLabel: true |
892 |
adjust: right |
|
19012 | 893 |
) |
13741 | 894 |
(InputFieldSpec |
895 |
name: 'FilterEntryField' |
|
19012 | 896 |
layout: (LayoutFrame 60 0 -27 1 -2 1 -2 1) uuid: '6862ef8e-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 897 |
model: filterHolder |
898 |
immediateAccept: true |
|
899 |
acceptOnReturn: true |
|
900 |
acceptOnTab: true |
|
901 |
acceptOnLostFocus: true |
|
902 |
acceptOnPointerLeave: false |
|
903 |
postBuildCallback: postBuildFilterField: |
|
904 |
) |
|
19012 | 905 |
) |
906 |
) |
|
13741 | 907 |
) |
19012 | 908 |
) |
909 |
) handles: (Any 0.29999999999999999 1.0) |
|
910 |
) |
|
13741 | 911 |
(SubCanvasSpec |
912 |
name: 'DirectoryTreeBrowser' |
|
19012 | 913 |
layout: (LayoutFrame 0 0.0 70 0 0 1.0 -34 1) uuid: '6862f1d2-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 914 |
tabable: true |
915 |
hasHorizontalScrollBar: false |
|
916 |
hasVerticalScrollBar: false |
|
917 |
majorKey: DirectoryTreeBrowser |
|
918 |
subAspectHolders: |
|
19012 | 919 |
(Array |
13741 | 920 |
(SubChannelInfoSpec |
921 |
subAspect: filterModel |
|
922 |
aspect: filterHolder |
|
19012 | 923 |
) |
13741 | 924 |
(SubChannelInfoSpec |
925 |
subAspect: rootHolder |
|
926 |
aspect: rootDirectoryHolder |
|
19012 | 927 |
) |
13741 | 928 |
(SubChannelInfoSpec |
929 |
subAspect: showHiddenFiles |
|
930 |
aspect: showHiddenFiles |
|
19012 | 931 |
) |
932 |
) createNewApplication: true |
|
13741 | 933 |
createNewBuilder: true |
934 |
postBuildCallback: postBuildTreeBrowser: |
|
19012 | 935 |
) |
13741 | 936 |
(LabelSpec |
937 |
label: 'Filename:' |
|
938 |
name: 'FilenameLabel' |
|
19012 | 939 |
layout: (LayoutFrame 3 0 -28 1 110 0 -1 1) uuid: '6862f5b0-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 940 |
translateLabel: true |
941 |
labelChannel: filenameLabelHolder |
|
942 |
adjust: left |
|
19012 | 943 |
) |
13741 | 944 |
(FilenameInputFieldSpec |
945 |
name: 'FilenameEntryField' |
|
19012 | 946 |
layout: (LayoutFrame 110 0 -28 1 -2 1 -1 1) uuid: '6862f6be-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 947 |
tabable: true |
948 |
model: filenameHolder |
|
949 |
immediateAccept: false |
|
950 |
acceptOnPointerLeave: true |
|
951 |
hasKeyboardFocusInitially: true |
|
952 |
postBuildCallback: postBuildFileNameField: |
|
953 |
) |
|
19012 | 954 |
(ViewSpec |
955 |
name: 'SearchInfoBox' |
|
956 |
layout: (LayoutFrame 0 0 -30 1 0 1 0 1) uuid: 'efe63378-c414-11e9-a4e5-10ddb1cc5928' |
|
957 |
visibilityChannel: searchInfoBoxVisibleHolder |
|
958 |
component: |
|
959 |
(SpecCollection |
|
960 |
collection: ( |
|
961 |
(LabelSpec |
|
962 |
label: 'Searching:' |
|
963 |
name: 'Label1' |
|
964 |
layout: (LayoutFrame 3 0 -28 1 110 0 -1 1) uuid: '6862f5b0-e9f6-11e8-8cdd-b8f6b1108e05' |
|
965 |
translateLabel: true |
|
966 |
adjust: left |
|
967 |
) |
|
968 |
(LabelSpec |
|
969 |
name: 'Label2' |
|
970 |
layout: (LayoutFrame 110 0 -28 1 0 1 -1 1) uuid: '6862f5b0-e9f6-11e8-8cdd-b8f6b1108e05' |
|
971 |
translateLabel: false |
|
972 |
labelChannel: searchedDirectoryInfoHolder |
|
973 |
adjust: left |
|
974 |
) |
|
975 |
) |
|
976 |
) |
|
977 |
) |
|
978 |
) |
|
979 |
) extent: (Point 460 442) |
|
13741 | 980 |
) |
19012 | 981 |
) |
982 |
) postBuildCallback: postBuildVerticalPanelView: |
|
983 |
) |
|
13741 | 984 |
(HorizontalPanelViewSpec |
985 |
name: 'ButtonPanel' |
|
19012 | 986 |
layout: (LayoutFrame 0 0.0 -34 1 -16 1 0 1) uuid: '6862f89e-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 987 |
visibilityChannel: buttonPanelVisibleHolder |
988 |
horizontalLayout: fitSpace |
|
989 |
verticalLayout: center |
|
990 |
horizontalSpace: 3 |
|
991 |
verticalSpace: 3 |
|
992 |
reverseOrderIfOKAtLeft: true |
|
993 |
component: |
|
994 |
(SpecCollection |
|
995 |
collection: ( |
|
996 |
(ActionButtonSpec |
|
997 |
label: 'Cancel' |
|
998 |
name: 'cancelButton' |
|
18527 | 999 |
uuid: '6862f9e8-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 1000 |
translateLabel: true |
1001 |
labelChannel: cancelLabelHolder |
|
1002 |
tabable: true |
|
1003 |
model: doCancel |
|
18527 | 1004 |
extent: (Point 143 30) |
19012 | 1005 |
) |
13741 | 1006 |
(ActionButtonSpec |
1007 |
label: 'Append' |
|
1008 |
name: 'appendButton' |
|
18527 | 1009 |
uuid: '6862fba0-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 1010 |
visibilityChannel: appendButtonVisibleHolder |
1011 |
translateLabel: true |
|
1012 |
labelChannel: appendLabelHolder |
|
1013 |
tabable: true |
|
1014 |
model: appendPressed |
|
18527 | 1015 |
extent: (Point 144 30) |
19012 | 1016 |
) |
13741 | 1017 |
(ActionButtonSpec |
1018 |
label: 'OK' |
|
1019 |
name: 'okButton' |
|
18527 | 1020 |
uuid: '6862fce0-e9f6-11e8-8cdd-b8f6b1108e05' |
13741 | 1021 |
translateLabel: true |
1022 |
labelChannel: okLabelHolder |
|
1023 |
tabable: true |
|
1024 |
model: okPressed |
|
15766 | 1025 |
enableChannel: okLabelEnabled |
13741 | 1026 |
isDefault: true |
18527 | 1027 |
extent: (Point 144 30) |
13741 | 1028 |
) |
19012 | 1029 |
) |
1030 |
) keepSpaceForOSXResizeHandleH: true |
|
13741 | 1031 |
) |
19012 | 1032 |
) |
1033 |
) |
|
1034 |
) |
|
3892 | 1035 |
! ! |
1036 |
||
1037 |
!FileDialog class methodsFor:'menu specs'! |
|
1038 |
||
9113 | 1039 |
mainMenu |
1040 |
"This resource specification was automatically generated |
|
1041 |
by the MenuEditor of ST/X." |
|
1042 |
||
1043 |
"Do not manually edit this!! If it is corrupted, |
|
1044 |
the MenuEditor may not be able to read the specification." |
|
1045 |
||
18749 | 1046 |
|
9113 | 1047 |
" |
1048 |
MenuEditor new openOnClass:FileDialog andSelector:#mainMenu |
|
1049 |
(Menu new fromLiteralArrayEncoding:(FileDialog mainMenu)) startUp |
|
1050 |
" |
|
1051 |
||
1052 |
<resource: #menu> |
|
1053 |
||
1054 |
^ |
|
19012 | 1055 |
#(Menu |
1056 |
(MenuItem |
|
1057 |
label: 'Directory' |
|
1058 |
submenu: |
|
1059 |
(Menu |
|
1060 |
(MenuItem |
|
1061 |
label: 'Up' |
|
1062 |
itemValue: doGoDirectoryUp |
|
1063 |
) |
|
1064 |
(MenuItem |
|
1065 |
label: '-' |
|
1066 |
) |
|
1067 |
(MenuItem |
|
1068 |
activeHelpKey: directoryBack |
|
1069 |
enabled: enableBack |
|
1070 |
label: 'Back' |
|
1071 |
itemValue: doBack |
|
1072 |
) |
|
1073 |
(MenuItem |
|
1074 |
activeHelpKey: directoryBack |
|
1075 |
enabled: enableForward |
|
1076 |
label: 'Forward' |
|
1077 |
itemValue: doForward |
|
1078 |
) |
|
1079 |
(MenuItem |
|
1080 |
label: '-' |
|
1081 |
) |
|
1082 |
(MenuItem |
|
1083 |
enabled: enableHome |
|
1084 |
label: 'Home Directory' |
|
1085 |
itemValue: doGotoHomeDirectory |
|
1086 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon16x16 'Home Directory') |
|
1087 |
) |
|
1088 |
(MenuItem |
|
1089 |
enabled: enableGotoDesktopDirectory |
|
1090 |
label: 'Desktop Directory' |
|
1091 |
itemValue: doGotoDesktopDirectory |
|
1092 |
labelImage: (ResourceRetriever ToolbarIconLibrary desktop16x16Icon 'Desktop Directory') |
|
1093 |
) |
|
1094 |
(MenuItem |
|
1095 |
enabled: enableGotoDocuments |
|
1096 |
label: 'Documents Directory' |
|
1097 |
itemValue: doGotoDocumentsDirectory |
|
1098 |
) |
|
1099 |
(MenuItem |
|
1100 |
enabled: enableGotoDownloads |
|
1101 |
label: 'Downloads Directory' |
|
1102 |
itemValue: doGotoDownloadsDirectory |
|
1103 |
) |
|
1104 |
(MenuItem |
|
19267 | 1105 |
label: 'Menu Slice' |
1106 |
submenuChannel: additionalFoldersMenuSlice |
|
1107 |
isMenuSlice: true |
|
1108 |
) |
|
1109 |
(MenuItem |
|
1110 |
label: '-' |
|
1111 |
) |
|
1112 |
(MenuItem |
|
19012 | 1113 |
label: 'Bookmarks' |
1114 |
submenuChannel: bookmarksMenu |
|
1115 |
labelImage: (ResourceRetriever ToolbarIconLibrary bookmarks14x14 'Bookmarks') |
|
1116 |
) |
|
1117 |
(MenuItem |
|
1118 |
label: 'Visited Directories' |
|
1119 |
submenuChannel: visitedDirectoriesMenu |
|
1120 |
) |
|
9113 | 1121 |
) |
19012 | 1122 |
) |
1123 |
(MenuItem |
|
1124 |
label: 'View' |
|
1125 |
submenu: |
|
1126 |
(Menu |
|
1127 |
(MenuItem |
|
1128 |
label: 'Sort' |
|
1129 |
submenuChannel: sortMenu |
|
1130 |
) |
|
1131 |
(MenuItem |
|
1132 |
label: 'Show' |
|
1133 |
submenuChannel: showMenuSpecForDialog |
|
1134 |
) |
|
1135 |
(MenuItem |
|
1136 |
label: '-' |
|
1137 |
) |
|
1138 |
(MenuItem |
|
1139 |
label: 'Update' |
|
1140 |
itemValue: updateCurrentDirectory |
|
1141 |
) |
|
1142 |
) |
|
1143 |
) |
|
1144 |
(MenuItem |
|
1145 |
label: 'Tools' |
|
1146 |
submenu: |
|
1147 |
(Menu |
|
1148 |
(MenuItem |
|
1149 |
label: 'Terminal' |
|
1150 |
itemValue: openTerminal |
|
1151 |
labelImage: (ResourceRetriever ToolbarIconLibrary terminal16x16Icon 'Terminal') |
|
1152 |
) |
|
1153 |
) |
|
1154 |
) |
|
1155 |
(MenuItem |
|
1156 |
label: 'Find' |
|
1157 |
submenu: |
|
1158 |
(Menu |
|
1159 |
(MenuItem |
|
1160 |
label: 'File...' |
|
1161 |
itemValue: doFindAndSelectFile |
|
1162 |
labelImage: (ResourceRetriever ToolbarIconLibrary search16x16Icon 'File...') |
|
1163 |
) |
|
1164 |
(MenuItem |
|
19265 | 1165 |
enabled: findAndSelectNextFileEnabledHolder |
19012 | 1166 |
label: 'Next...' |
1167 |
itemValue: doFindAndSelectNextFile |
|
1168 |
shortcutKey: FindNext |
|
1169 |
) |
|
1170 |
) |
|
1171 |
) |
|
1172 |
) |
|
9113 | 1173 |
! |
1174 |
||
3892 | 1175 |
toolBarMenu |
1176 |
"This resource specification was automatically generated |
|
1177 |
by the MenuEditor of ST/X." |
|
1178 |
||
1179 |
"Do not manually edit this!! If it is corrupted, |
|
1180 |
the MenuEditor may not be able to read the specification." |
|
1181 |
||
1182 |
" |
|
1183 |
MenuEditor new openOnClass:FileDialog andSelector:#toolBarMenu |
|
1184 |
(Menu new fromLiteralArrayEncoding:(FileDialog toolBarMenu)) startUp |
|
1185 |
" |
|
1186 |
||
1187 |
<resource: #menu> |
|
1188 |
||
1189 |
^ |
|
5873 | 1190 |
#(Menu |
1191 |
( |
|
1192 |
(MenuItem |
|
1193 |
activeHelpKey: directoryBack |
|
1194 |
enabled: enableBack |
|
1195 |
label: 'Back' |
|
1196 |
itemValue: doBack |
|
1197 |
translateLabel: true |
|
1198 |
isButton: true |
|
1199 |
submenuChannel: menuDirHistoryBack |
|
6087 | 1200 |
labelImage: (ResourceRetriever AbstractFileBrowser historyBackIcon) |
5873 | 1201 |
keepLinkedMenu: true |
3892 | 1202 |
) |
5873 | 1203 |
(MenuItem |
1204 |
label: '' |
|
3892 | 1205 |
) |
5873 | 1206 |
(MenuItem |
1207 |
activeHelpKey: directoryForward |
|
1208 |
enabled: enableForward |
|
1209 |
label: 'Forward' |
|
1210 |
itemValue: doForward |
|
1211 |
translateLabel: true |
|
1212 |
isButton: true |
|
1213 |
submenuChannel: menuDirHistoryForward |
|
6087 | 1214 |
labelImage: (ResourceRetriever AbstractFileBrowser historyForwardIcon) |
5873 | 1215 |
keepLinkedMenu: true |
3892 | 1216 |
) |
5873 | 1217 |
(MenuItem |
6462 | 1218 |
label: '-' |
1219 |
) |
|
1220 |
(MenuItem |
|
1221 |
activeHelpKey: directoryUp |
|
1222 |
enabled: enableDirectoryUp |
|
1223 |
label: 'DirectoryUp' |
|
1224 |
itemValue: doGoDirectoryUp |
|
1225 |
translateLabel: true |
|
1226 |
isButton: true |
|
1227 |
labelImage: (ResourceRetriever AbstractFileBrowser directoryUpIcon) |
|
3892 | 1228 |
) |
5873 | 1229 |
(MenuItem |
1230 |
activeHelpKey: fileHome |
|
1231 |
enabled: enableHome |
|
1232 |
label: 'Home' |
|
1233 |
itemValue: doGotoHomeDirectory |
|
1234 |
translateLabel: true |
|
1235 |
isButton: true |
|
6096 | 1236 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon) |
3892 | 1237 |
) |
5873 | 1238 |
(MenuItem |
8092 | 1239 |
activeHelpKey: fileDesktop |
18512 | 1240 |
enabled: enableGotoDesktopDirectory |
8092 | 1241 |
label: 'Desktop' |
1242 |
itemValue: doGotoDesktopDirectory |
|
1243 |
translateLabel: true |
|
1244 |
isButton: true |
|
1245 |
labelImage: (ResourceRetriever ToolbarIconLibrary desktopIcon) |
|
1246 |
) |
|
1247 |
(MenuItem |
|
6098 | 1248 |
activeHelpKey: fileGotoBookmark |
1249 |
label: 'Bookmarks' |
|
1250 |
translateLabel: true |
|
1251 |
isButton: true |
|
9113 | 1252 |
submenuChannel: gotoBookmarksMenu |
6098 | 1253 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryBookmarksIcon) |
1254 |
) |
|
1255 |
(MenuItem |
|
5873 | 1256 |
label: '-' |
1257 |
isVisible: newDirectoryVisibilityHolder |
|
3923 | 1258 |
) |
5873 | 1259 |
(MenuItem |
6122 | 1260 |
label: 'New Directory...' |
5873 | 1261 |
itemValue: newDirectory |
1262 |
translateLabel: true |
|
1263 |
isButton: true |
|
1264 |
isVisible: newDirectoryVisibilityHolder |
|
6088 | 1265 |
labelImage: (ResourceRetriever AbstractFileBrowser newDirectoryIcon) |
3923 | 1266 |
) |
8585 | 1267 |
(MenuItem |
1268 |
label: '-' |
|
19174 | 1269 |
isVisible: browseMenuItemVisibleHolder |
8585 | 1270 |
) |
1271 |
(MenuItem |
|
1272 |
activeHelpKey: openFileBrowser |
|
1273 |
label: 'Browse' |
|
1274 |
itemValue: doBrowseDirectory |
|
1275 |
translateLabel: true |
|
1276 |
isButton: true |
|
15725 | 1277 |
isVisible: browseMenuItemVisibleHolder |
8585 | 1278 |
labelImage: (ResourceRetriever ToolbarIconLibrary startFileBrowserIcon) |
1279 |
) |
|
3892 | 1280 |
) |
1281 |
nil |
|
1282 |
nil |
|
1283 |
) |
|
19174 | 1284 |
|
1285 |
"Modified: / 10-09-2019 / 18:41:59 / Stefan Vogel" |
|
9113 | 1286 |
! |
1287 |
||
1288 |
viewInContentsBrowserMenu |
|
1289 |
^ DirectoryContentsBrowser showMenuSpec |
|
3892 | 1290 |
! ! |
1291 |
||
8182 | 1292 |
!FileDialog class methodsFor:'plugIn spec'! |
1293 |
||
1294 |
aspectSelectors |
|
1295 |
"This resource specification was automatically generated |
|
1296 |
by the UIPainter of ST/X." |
|
1297 |
||
1298 |
"Do not manually edit this. If it is corrupted, |
|
1299 |
the UIPainter may not be able to read the specification." |
|
1300 |
||
1301 |
"Return a description of exported aspects; |
|
1302 |
these can be connected to aspects of an embedding application |
|
1303 |
(if this app is embedded in a subCanvas)." |
|
1304 |
||
1305 |
^ #( |
|
1306 |
#filenameHolder |
|
1307 |
#filterHolder |
|
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1308 |
#rootDirectoryHolder |
8182 | 1309 |
). |
1310 |
||
1311 |
! ! |
|
1312 |
||
3892 | 1313 |
!FileDialog methodsFor:'accessing'! |
1314 |
||
18749 | 1315 |
appendWasPressed |
1316 |
"valid after the dialog has been closed: true if append was pressed" |
|
1317 |
||
1318 |
^ appendWasPressed |
|
1319 |
! |
|
1320 |
||
3996 | 1321 |
currentSelectedFiles |
1322 |
||
1323 |
| selectedFiles| |
|
1324 |
||
1325 |
selectedFiles := treeBrowser currentFileNameHolder value. |
|
12828 | 1326 |
^ selectedFiles reject:[:aFile| aFile isDirectory ]. |
3996 | 1327 |
! |
1328 |
||
18015 | 1329 |
defaultWindowExtent |
1330 |
"return my default window extent or nil. |
|
1331 |
Return nil if the defaul extent should be computed by other means." |
|
1332 |
||
1333 |
^ LastExtent |
|
1334 |
||
1335 |
"Created: / 20-03-2018 / 11:26:14 / stefan" |
|
1336 |
! |
|
1337 |
||
3892 | 1338 |
directory |
1339 |
"return the value of the instance variable 'directory' (automatically generated)" |
|
1340 |
||
1341 |
^ directory |
|
1342 |
! |
|
1343 |
||
1344 |
directory:something |
|
1345 |
"set the value of the instance variable 'directory' (automatically generated)" |
|
1346 |
||
1347 |
directory := something. |
|
1348 |
! |
|
1349 |
||
1350 |
initialText |
|
13090 | 1351 |
^ resources string:(initialText ? 'File Dialog') |
3892 | 1352 |
! |
1353 |
||
1354 |
initialText:something |
|
1355 |
initialText := something. |
|
1356 |
! |
|
1357 |
||
1358 |
pattern |
|
1359 |
"return the value of the instance variable 'pattern' (automatically generated)" |
|
1360 |
||
1361 |
^ pattern |
|
1362 |
! |
|
1363 |
||
1364 |
pattern:something |
|
1365 |
"set the value of the instance variable 'pattern' (automatically generated)" |
|
1366 |
||
1367 |
pattern := something. |
|
1368 |
! |
|
1369 |
||
1370 |
result |
|
1371 |
"return the value of the instance variable 'result' (automatically generated)" |
|
1372 |
||
1373 |
^ result |
|
1374 |
! |
|
1375 |
||
1376 |
result:something |
|
1377 |
"set the value of the instance variable 'result' (automatically generated)" |
|
1378 |
||
1379 |
result := something. |
|
1380 |
! |
|
1381 |
||
3904 | 1382 |
selectedDirectories |
1383 |
||
1384 |
| selectedFiles| |
|
1385 |
||
1386 |
selectedFiles := treeBrowser currentFileNameHolder value. |
|
1387 |
^ selectedFiles select:[:aFile| aFile isDirectory]. |
|
1388 |
! |
|
1389 |
||
3892 | 1390 |
startFilename |
1391 |
startFilename isNil ifTrue:[ |
|
1392 |
startFilename := Filename currentDirectory asAbsoluteFilename. |
|
1393 |
]. |
|
1394 |
^ startFilename |
|
1395 |
! |
|
1396 |
||
1397 |
startFilename:something |
|
1398 |
startFilename := something. |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1399 |
! ! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1400 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1401 |
!FileDialog methodsFor:'accessing-behavior'! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1402 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1403 |
asLoadDialog |
4804 | 1404 |
^ self isLoadDialog |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1405 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1406 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1407 |
asLoadDialog:aBoolean |
4804 | 1408 |
self beLoadDialog:aBoolean |
1409 |
! |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1410 |
|
4804 | 1411 |
beLoadDialog:aBoolean |
1412 |
||
1413 |
isLoadDialog := aBoolean |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1414 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1415 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1416 |
doubleClickAction |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1417 |
"return the value of the instance variable 'doubleClickAction' (automatically generated)" |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1418 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1419 |
^ doubleClickAction |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1420 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1421 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1422 |
doubleClickAction:something |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1423 |
"set the value of the instance variable 'doubleClickAction' (automatically generated)" |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1424 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1425 |
doubleClickAction := something. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1426 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1427 |
|
4804 | 1428 |
isLoadDialog |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1429 |
|
4804 | 1430 |
^ isLoadDialog ? true |
1431 |
! |
|
1432 |
||
1433 |
multipleSelect |
|
1434 |
^ multipleSelect ? false |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1435 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1436 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1437 |
multipleSelect:aBoolean |
4804 | 1438 |
multipleSelect := aBoolean. |
1439 |
treeBrowser notNil ifTrue:[ |
|
1440 |
treeBrowser multipleSelect:aBoolean. |
|
1441 |
]. |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1442 |
! ! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1443 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1444 |
!FileDialog methodsFor:'accessing-components'! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1445 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1446 |
addButton:aButton |
6068 | 1447 |
|buttonPanel okButton| |
1448 |
||
1449 |
buttonPanel := self componentAt:#ButtonPanel. |
|
1450 |
okButton := self okButton. |
|
1451 |
||
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1452 |
DialogBox defaultOKButtonAtLeft ifTrue:[ |
6068 | 1453 |
buttonPanel addSubView:aButton before:okButton |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1454 |
] ifFalse:[ |
6068 | 1455 |
buttonPanel addSubView:aButton after:okButton |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1456 |
]. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1457 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1458 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1459 |
okButton |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1460 |
^ (self componentAt:#okButton) |
3892 | 1461 |
! |
1462 |
||
3904 | 1463 |
treeBrowser |
1464 |
"return the value of the instance variable 'treeBrowser' (automatically generated)" |
|
1465 |
||
1466 |
^ treeBrowser |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1467 |
! ! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1468 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1469 |
!FileDialog methodsFor:'accessing-look'! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1470 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1471 |
hideButtonPanel |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1472 |
self buttonPanelVisibleHolder value:false |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1473 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1474 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1475 |
newDirectoryVisibilityHolder |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1476 |
newDirectoryVisibilityHolder isNil ifTrue:[ |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1477 |
newDirectoryVisibilityHolder := true asValue. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1478 |
]. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1479 |
^ newDirectoryVisibilityHolder |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1480 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1481 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1482 |
showButtonPanel |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1483 |
self buttonPanelVisibleHolder value:true |
3904 | 1484 |
! |
1485 |
||
3892 | 1486 |
viewFiles |
19166 | 1487 |
"if true, files can be selected; if false, only directories" |
3892 | 1488 |
|
1489 |
^ viewFiles |
|
1490 |
! |
|
1491 |
||
19174 | 1492 |
viewFiles:aBoolean |
19166 | 1493 |
"if true, files can be selected; if false, only directories" |
3892 | 1494 |
|
19174 | 1495 |
viewFiles := aBoolean. |
1496 |
||
1497 |
"Modified (comment): / 10-09-2019 / 18:36:08 / Stefan Vogel" |
|
3892 | 1498 |
! ! |
1499 |
||
1500 |
!FileDialog methodsFor:'aspects'! |
|
1501 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1502 |
appendButtonVisibleHolder |
15451 | 1503 |
"if set, an additional 'append' button is shown |
1504 |
(to let user append to a file, instead of overwriting the file)" |
|
1505 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1506 |
appendButtonVisibleHolder isNil ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1507 |
appendButtonVisibleHolder := false asValue. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1508 |
]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1509 |
^ appendButtonVisibleHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1510 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1511 |
|
5193 | 1512 |
appendLabelHolder |
1513 |
appendLabelHolder isNil ifTrue:[ |
|
1514 |
appendLabelHolder := 'Append' asValue. |
|
1515 |
]. |
|
1516 |
^ appendLabelHolder |
|
1517 |
! |
|
1518 |
||
4804 | 1519 |
aspectOrNil:aKey forSubApplication:aSubApp |
1520 |
"this hook provides an aspect for a subApp" |
|
1521 |
||
1522 |
aKey == #currentFileNameHolder ifTrue:[ |
|
1523 |
directory notNil ifTrue:[ |
|
1524 |
^ (OrderedCollection with:directory) asValue |
|
1525 |
] |
|
1526 |
]. |
|
1527 |
^ nil |
|
1528 |
! |
|
1529 |
||
15451 | 1530 |
browseMenuItemVisible:aBoolean |
1531 |
"controls if an 'open filebrowser' menu item is to be shown in the toolbar" |
|
1532 |
||
1533 |
self browseMenuItemVisibleHolder value:aBoolean |
|
1534 |
! |
|
1535 |
||
1536 |
browseMenuItemVisibleHolder |
|
1537 |
"controls if an 'open filebrowser' menu item is to be shown in the toolbar" |
|
1538 |
||
19174 | 1539 |
browseMenuItemVisibleHolder isNil ifTrue:[ |
1540 |
browseMenuItemVisibleHolder := true "false" asValue. |
|
5969 | 1541 |
]. |
19174 | 1542 |
^ browseMenuItemVisibleHolder. |
15451 | 1543 |
! |
1544 |
||
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1545 |
buttonPanelVisibleHolder |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1546 |
buttonPanelVisibleHolder isNil ifTrue:[ |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1547 |
buttonPanelVisibleHolder := true asValue. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1548 |
buttonPanelVisibleHolder onChangeSend:#buttonPanelVisibilityChanged to:self. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1549 |
]. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1550 |
^ buttonPanelVisibleHolder. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1551 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1552 |
|
3892 | 1553 |
cancelLabelHolder |
1554 |
||
1555 |
cancelLabelHolder isNil ifTrue:[ |
|
1556 |
cancelLabelHolder := 'Cancel' asValue. |
|
1557 |
]. |
|
1558 |
^ cancelLabelHolder. |
|
1559 |
! |
|
1560 |
||
1561 |
enableBack |
|
4804 | 1562 |
^ treeBrowser enableBack. |
3892 | 1563 |
! |
1564 |
||
1565 |
enableDirectoryUp |
|
4804 | 1566 |
^ treeBrowser enableDirectoryUp. |
3892 | 1567 |
! |
1568 |
||
1569 |
enableForward |
|
4804 | 1570 |
^ treeBrowser enableForward. |
3892 | 1571 |
! |
1572 |
||
18533 | 1573 |
enableGotoDesktopDirectory |
18512 | 1574 |
^ treeBrowser enableGotoDesktopDirectory. |
18533 | 1575 |
|
1576 |
"Created: / 30-11-2018 / 17:05:19 / Stefan Vogel" |
|
18512 | 1577 |
! |
1578 |
||
1579 |
enableGotoDocuments |
|
1580 |
^ treeBrowser enableGotoDocumentsDirectory. |
|
1581 |
! |
|
1582 |
||
1583 |
enableGotoDownloads |
|
1584 |
^ treeBrowser enableGotoDownloadsDirectory. |
|
8169 | 1585 |
! |
1586 |
||
3892 | 1587 |
enableHome |
4804 | 1588 |
^ treeBrowser enableHome. |
3892 | 1589 |
! |
1590 |
||
9269
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1591 |
fileEntryFieldHolder |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1592 |
"for directoryTreeBrowser" |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1593 |
|
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1594 |
^ self filenameHolder |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1595 |
! |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1596 |
|
3892 | 1597 |
filenameHolder |
1598 |
"Return a value holder with the filename. |
|
1599 |
Shown in the filename input-field. |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1600 |
Being the selection in the tree." |
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1601 |
|
3892 | 1602 |
|holder| |
7581 | 1603 |
|
3892 | 1604 |
holder := builder bindingAt:#filenameHolder. |
1605 |
||
7581 | 1606 |
holder isNil ifTrue:[ |
13001 | 1607 |
holder := startFilename asValue. |
3892 | 1608 |
holder addDependent:self. |
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1609 |
builder aspectAt:#filenameHolder put:holder. |
3892 | 1610 |
]. |
1611 |
||
1612 |
^ holder. |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1613 |
|
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1614 |
"Modified: / 09-07-2010 / 19:25:15 / cg" |
3892 | 1615 |
! |
1616 |
||
8183 | 1617 |
filenameHolder:aHolder |
8182 | 1618 |
"needed when used as subcanvas" |
8183 | 1619 |
|
1620 |
|holder| |
|
8182 | 1621 |
|
8183 | 1622 |
holder := builder aspectAt:#filenameHolder. |
1623 |
holder notNil ifTrue:[ |
|
1624 |
holder removeDependent:self |
|
1625 |
]. |
|
8182 | 1626 |
builder aspectAt:#filenameHolder put:aHolder. |
8183 | 1627 |
aHolder addDependent:self |
8182 | 1628 |
! |
1629 |
||
3904 | 1630 |
filenameLabelHolder |
1631 |
"Return a value holder for the input string. |
|
1632 |
" |
|
1633 |
filenameLabelHolder isNil ifTrue:[ |
|
1634 |
filenameLabelHolder := 'Filename:' asValue. |
|
1635 |
]. |
|
1636 |
^ filenameLabelHolder |
|
1637 |
! |
|
1638 |
||
3892 | 1639 |
filterHolder |
8183 | 1640 |
"Return a value holder for filter" |
3892 | 1641 |
|
1642 |
filterHolder isNil ifTrue:[ |
|
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1643 |
filterHolder := (self pattern ? '*') asValue. |
3892 | 1644 |
]. |
1645 |
^ filterHolder |
|
1646 |
! |
|
1647 |
||
8183 | 1648 |
filterHolder:aHolder |
1649 |
"needed when used as subcanvas" |
|
1650 |
||
1651 |
filterHolder := aHolder. |
|
1652 |
! |
|
1653 |
||
9113 | 1654 |
gotoBookmarksMenu |
6098 | 1655 |
<resource: #programMenu> |
1656 |
||
9113 | 1657 |
^ treeBrowser gotoBookmarksMenu |
7567
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1658 |
"/ |menu bookmarks| |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1659 |
"/ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1660 |
"/ menu := treeBrowser class emptyMenuSpec decodeAsLiteralArray. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1661 |
"/ menu findGuiResourcesIn:self. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1662 |
"/ menu receiver:self. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1663 |
"/ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1664 |
"/ "/ add the bookmark items ... |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1665 |
"/ bookmarks := treeBrowser class directoryBookmarks. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1666 |
"/ bookmarks notEmptyOrNil ifTrue:[ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1667 |
"/ bookmarks do:[:dirName | |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1668 |
"/ menu addItem:((MenuItem label:dirName asString value:[ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1669 |
"/ (treeBrowser currentSelectedDirectories includes:dirName) ifFalse:[ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1670 |
"/ treeBrowser setCurrentFileName:dirName. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1671 |
"/ ]. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1672 |
"/ ])). |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1673 |
"/ ]. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1674 |
"/ ]. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1675 |
"/ ^ menu |
6098 | 1676 |
|
7567
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1677 |
"Modified: / 06-12-2006 / 12:05:06 / cg" |
6098 | 1678 |
! |
1679 |
||
6065 | 1680 |
listOfDeviceDrives |
1681 |
||
1682 |
listOfDeviceDrives isNil ifTrue:[ |
|
1683 |
listOfDeviceDrives := Filename volumes. |
|
1684 |
]. |
|
1685 |
^ listOfDeviceDrives |
|
1686 |
! |
|
1687 |
||
15766 | 1688 |
okLabelEnabled |
1689 |
<resource: #uiAspect> |
|
1690 |
||
1691 |
okLabelEnabled isNil ifTrue:[ |
|
1692 |
isLoadDialog ifTrue:[ |
|
17410 | 1693 |
okLabelEnabled := |
1694 |
BlockValue |
|
1695 |
with:[:filename| |
|
1696 |
|ok| |
|
1697 |
||
1698 |
ok := true. |
|
1699 |
||
1700 |
multipleSelect ifTrue:[ |
|
1701 |
ok := treeBrowser selectedFiles notEmpty |
|
1702 |
and:[ treeBrowser selectedFiles conform:[:each | each isRegularFile] ] |
|
1703 |
] ifFalse:[ |
|
1704 |
filename isEmptyOrNil ifTrue:[ |
|
1705 |
ok := false |
|
1706 |
] ifFalse:[ |
|
1707 |
|physicalFilename| |
|
1708 |
||
1709 |
physicalFilename := filename asFilename physicalFilename. |
|
1710 |
physicalFilename isNil ifTrue:[ |
|
1711 |
ok := false |
|
1712 |
] ifFalse:[ |
|
1713 |
viewFiles |
|
1714 |
ifTrue:[ ok := physicalFilename isRegularFile ] |
|
1715 |
ifFalse:[ ok := physicalFilename isDirectory ] |
|
1716 |
]. |
|
1717 |
] |
|
1718 |
]. |
|
1719 |
ok |
|
1720 |
] |
|
1721 |
argument:self filenameHolder. |
|
15766 | 1722 |
] ifFalse:[ |
1723 |
okLabelEnabled := true. |
|
1724 |
]. |
|
1725 |
]. |
|
1726 |
^ okLabelEnabled. |
|
17410 | 1727 |
|
1728 |
"Modified: / 14-02-2017 / 13:00:40 / cg" |
|
15766 | 1729 |
! |
1730 |
||
3892 | 1731 |
okLabelHolder |
16185 | 1732 |
<resource: #uiAspect> |
3892 | 1733 |
|
1734 |
okLabelHolder isNil ifTrue:[ |
|
1735 |
okLabelHolder := 'OK' asValue. |
|
1736 |
]. |
|
1737 |
^ okLabelHolder. |
|
6065 | 1738 |
! |
1739 |
||
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1740 |
rootDirectoryHolder |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1741 |
"Return a value holder for filter" |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1742 |
|
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1743 |
rootDirectoryHolder isNil ifTrue:[ |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1744 |
rootDirectoryHolder := self initialRootDirectory asValue. |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1745 |
]. |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1746 |
^ rootDirectoryHolder |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1747 |
! |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1748 |
|
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1749 |
rootDirectoryHolder:aHolder |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1750 |
"Return a value holder for filter" |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1751 |
|
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1752 |
rootDirectoryHolder := aHolder. |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1753 |
! |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1754 |
|
19012 | 1755 |
searchInfoBoxVisibleHolder |
1756 |
"set during search-file operation" |
|
1757 |
||
1758 |
searchInfoBoxVisibleHolder isNil ifTrue:[ |
|
1759 |
searchInfoBoxVisibleHolder := false asValue. |
|
1760 |
]. |
|
1761 |
^ searchInfoBoxVisibleHolder |
|
1762 |
! |
|
1763 |
||
1764 |
searchedDirectoryInfoHolder |
|
1765 |
"updated during search-file operation" |
|
1766 |
||
1767 |
searchedDirectoryInfoHolder isNil ifTrue:[ |
|
1768 |
searchedDirectoryInfoHolder := nil asValue. |
|
1769 |
]. |
|
1770 |
^ searchedDirectoryInfoHolder |
|
1771 |
! |
|
1772 |
||
6065 | 1773 |
selectedDeviceDrive |
1774 |
||
1775 |
selectedDeviceDrive isNil ifTrue:[ |
|
1776 |
selectedDeviceDrive := self listOfDeviceDrives first asValue. |
|
1777 |
selectedDeviceDrive addDependent:self. |
|
1778 |
]. |
|
1779 |
^ selectedDeviceDrive |
|
9110 | 1780 |
! |
1781 |
||
9113 | 1782 |
showDirectoryTree |
1783 |
^ false |
|
1784 |
! |
|
1785 |
||
1786 |
showDiskUsageHolder |
|
1787 |
^ treeBrowser showDiskUsageHolder |
|
1788 |
! |
|
1789 |
||
9110 | 1790 |
showHiddenFiles |
9113 | 1791 |
^ treeBrowser showHiddenFiles |
1792 |
! |
|
1793 |
||
1794 |
shownFiles |
|
1795 |
^ treeBrowser shownFiles |
|
1796 |
! |
|
1797 |
||
19357 | 1798 |
sortCaseless |
1799 |
^ treeBrowser sortCaseless |
|
1800 |
! |
|
1801 |
||
9113 | 1802 |
sortCaselessInTreeBrowser |
19357 | 1803 |
<resource: #obsolete> |
1804 |
||
1805 |
"only for backward compat. |
|
1806 |
We do not need two such flags" |
|
1807 |
||
9113 | 1808 |
^ treeBrowser sortCaselessInTreeBrowser |
1809 |
! |
|
1810 |
||
1811 |
sortInTreeVisibilityHolder |
|
1812 |
^ true |
|
1813 |
! |
|
1814 |
||
1815 |
sortPropertyInTree |
|
1816 |
^ treeBrowser sortBlockProperty |
|
1817 |
! |
|
1818 |
||
1819 |
viewDirsInContentsBrowser |
|
1820 |
^ false |
|
1821 |
! |
|
1822 |
||
1823 |
viewFilesInDirectoryTree |
|
1824 |
^ false |
|
1825 |
! |
|
1826 |
||
1827 |
viewNoteBookApplicationHolder |
|
9110 | 1828 |
^ false |
3892 | 1829 |
! ! |
1830 |
||
1831 |
!FileDialog methodsFor:'change & update'! |
|
1832 |
||
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1833 |
buttonPanelVisibilityChanged |
12848
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1834 |
|panel filePart partAbove| |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1835 |
|
12848
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1836 |
panel := builder componentAt:#FilePanel. |
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1837 |
panel isNil ifTrue:[ |
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1838 |
filePart := builder componentAt:#FilePart. |
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1839 |
]. |
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1840 |
partAbove := panel ? filePart. |
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1841 |
partAbove notNil ifTrue:[ |
5598 | 1842 |
buttonPanelVisibleHolder value ifTrue:[ |
12848
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1843 |
partAbove layout bottomOffset:-40 |
5598 | 1844 |
] ifFalse:[ |
12848
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1845 |
partAbove layout bottomOffset:0 |
5598 | 1846 |
]. |
12848
90fde21c7de4
class: Expecco::ExpeccoDebugView
Claus Gittinger <cg@exept.de>
parents:
12828
diff
changeset
|
1847 |
partAbove containerChangedSize "/ force resize |
5598 | 1848 |
] |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1849 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1850 |
|
9765 | 1851 |
fileSelectionChanged |
19120 | 1852 |
|files singleSelectedFileOrDirectory newFile entryFieldFilename filenameHolder| |
9765 | 1853 |
|
19120 | 1854 |
"/ the name in the entry field |
9765 | 1855 |
filenameHolder := self filenameHolder. |
1856 |
||
19120 | 1857 |
"/ the selection in the tree |
9765 | 1858 |
files := treeBrowser currentFileNameHolder value. |
19120 | 1859 |
files size == 1 ifTrue:[ |
1860 |
singleSelectedFileOrDirectory := files first. |
|
1861 |
]. |
|
1862 |
singleSelectedFileOrDirectory isNil ifTrue:[ |
|
1863 |
"/ self halt. |
|
1864 |
^ self. |
|
1865 |
]. |
|
1866 |
singleSelectedFileOrDirectory := singleSelectedFileOrDirectory asFilename. |
|
9765 | 1867 |
|
19178 | 1868 |
"/ (viewFiles and:[singleSelectedFileOrDirectory isDirectory]) ifTrue:[ |
1869 |
"/ entryFieldFilename := filenameHolder value. |
|
1870 |
"/ (entryFieldFilename isEmptyOrNil or:[(entryFieldFilename := entryFieldFilename asFilename) isDirectory]) ifTrue:[ |
|
1871 |
"/ "currently no plain file is selected. Replace the currently selected nothing or directory" |
|
1872 |
"/ newFile := singleSelectedFileOrDirectory. |
|
1873 |
"/ ] ifFalse:[ |
|
1874 |
"/ self startFilename asFilename baseName = entryFieldFilename baseName ifTrue:[ |
|
1875 |
"/ newFile := singleSelectedFileOrDirectory construct:entryFieldFilename baseName. |
|
1876 |
"/ ]. |
|
1877 |
"/ ]. |
|
1878 |
||
1879 |
viewFiles ifFalse:[ |
|
1880 |
newFile := singleSelectedFileOrDirectory. |
|
1881 |
] ifTrue:[ |
|
1882 |
singleSelectedFileOrDirectory isDirectory ifFalse:[ |
|
1883 |
"/ user clicked on a file |
|
19166 | 1884 |
newFile := singleSelectedFileOrDirectory. |
19178 | 1885 |
] ifTrue:[ |
1886 |
"/ user clicked on a directory; |
|
1887 |
"/ if the entry field holds a file, keep the basename |
|
1888 |
(entryFieldFilename := filenameHolder value) notEmptyOrNil ifTrue:[ |
|
1889 |
entryFieldFilename := entryFieldFilename asFilename. |
|
1890 |
entryFieldFilename isDirectory ifFalse:[ |
|
1891 |
self startFilename asFilename baseName = entryFieldFilename baseName ifTrue:[ |
|
1892 |
newFile := singleSelectedFileOrDirectory construct:entryFieldFilename baseName. |
|
1893 |
]. |
|
1894 |
] ifTrue:[ |
|
1895 |
newFile := singleSelectedFileOrDirectory. |
|
1896 |
]. |
|
1897 |
] ifFalse:[ |
|
1898 |
newFile := singleSelectedFileOrDirectory. |
|
1899 |
"/ self halt. |
|
19120 | 1900 |
]. |
9765 | 1901 |
]. |
1902 |
]. |
|
19120 | 1903 |
newFile notNil ifTrue:[ |
1904 |
filenameHolder value:newFile withoutNotifying:self. |
|
1905 |
||
1906 |
OperatingSystem supportsVolumes ifTrue:[ |
|
1907 |
| volume | |
|
1908 |
||
1909 |
volume := newFile volume. |
|
1910 |
self selectedDeviceDrive value:volume withoutNotifying:self. |
|
9765 | 1911 |
]. |
1912 |
]. |
|
1913 |
||
1914 |
"Created: / 14-02-2011 / 17:54:08 / cg" |
|
17410 | 1915 |
"Modified (format): / 14-02-2017 / 12:50:11 / cg" |
19174 | 1916 |
"Modified: / 10-09-2019 / 18:56:59 / Stefan Vogel" |
9765 | 1917 |
! |
1918 |
||
6065 | 1919 |
selectedDeviceDriveChanged |
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1920 |
|newDrive curSel newFile| |
6065 | 1921 |
|
1922 |
newDrive := self selectedDeviceDrive value. |
|
1923 |
curSel := treeBrowser currentFileNameHolder value. |
|
1924 |
curSel notEmpty ifTrue:[ |
|
1925 |
curSel first volume = newDrive ifTrue:[ ^self]. |
|
1926 |
]. |
|
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1927 |
|
6065 | 1928 |
newDrive notNil ifTrue:[ |
1929 |
newFile := newDrive asFilename. |
|
1930 |
newFile isReadable ifTrue:[ |
|
1931 |
treeBrowser gotoFile:newFile. |
|
1932 |
^self. |
|
1933 |
]. |
|
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1934 |
self warn:'Cannot open drive %1' with:newFile asFilename volume. |
6065 | 1935 |
]. |
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1936 |
|
16477 | 1937 |
newDrive := curSel notEmpty |
1938 |
ifTrue:[ curSel first volume ] |
|
1939 |
ifFalse:[ |
|
1940 |
OperatingSystem isMSWINDOWSlike ifTrue:['C:'] ifFalse:['/'] |
|
1941 |
"/ Filename defaultVolumeName. |
|
1942 |
]. |
|
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1943 |
self selectedDeviceDrive value:newDrive. |
6065 | 1944 |
! |
1945 |
||
3892 | 1946 |
update:something with:aParameter from:changedObject |
9765 | 1947 |
|newLabel fn| |
3892 | 1948 |
|
1949 |
changedObject == treeBrowser currentFileNameHolder ifTrue:[ |
|
9765 | 1950 |
self fileSelectionChanged. |
1951 |
^ self. |
|
3892 | 1952 |
]. |
4804 | 1953 |
|
6065 | 1954 |
changedObject == self selectedDeviceDrive ifTrue:[ |
1955 |
self selectedDeviceDriveChanged. |
|
1956 |
^ self. |
|
1957 |
]. |
|
3904 | 1958 |
changedObject == treeBrowser viewFilesInDirectoryTree ifTrue:[ |
1959 |
changedObject value ifTrue:[ |
|
4804 | 1960 |
newLabel := 'Filename:'. |
3904 | 1961 |
] ifFalse:[ |
4804 | 1962 |
newLabel := 'Directory:'. |
1963 |
]. |
|
1964 |
self filenameLabelHolder value:(resources string:newLabel) |
|
3904 | 1965 |
]. |
9765 | 1966 |
changedObject == self filenameHolder ifTrue:[ |
4804 | 1967 |
fn := changedObject value asFilename. |
1968 |
(fn exists) ifFalse:[^ self]. |
|
17410 | 1969 |
treeBrowser currentFileNameHolder value:(OrderedCollection with:fn) withoutNotifying:self. |
5949 | 1970 |
fn isDirectory ifTrue:[ |
1971 |
treeBrowser expandEnforceSelectedItems. |
|
1972 |
]. |
|
3892 | 1973 |
]. |
1974 |
^ super update:something with:aParameter from:changedObject |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1975 |
|
9765 | 1976 |
"Modified: / 14-02-2011 / 17:54:35 / cg" |
17410 | 1977 |
"Modified (format): / 14-02-2017 / 12:50:30 / cg" |
3892 | 1978 |
! ! |
1979 |
||
12816 | 1980 |
!FileDialog methodsFor:'construction-adding'! |
1981 |
||
1982 |
addComponent: aView |
|
12875 | 1983 |
verticalPanelView addComponent: aView |
12816 | 1984 |
|
1985 |
"Created: / 03-06-2013 / 17:47:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1986 |
! ! |
|
1987 |
||
19267 | 1988 |
!FileDialog methodsFor:'error handling'! |
1989 |
||
1990 |
additionalFoldersMenuSlice |
|
1991 |
|slice| |
|
1992 |
||
1993 |
"/ AdditionalFolderItemsInMenu := #('/foo' '/etc' '/Users') |
|
1994 |
"/ AdditionalFolderItemsInMenu := #('/foo' ('/etc' 'Other') '/Users') |
|
1995 |
AdditionalFolderItemsInMenu notEmptyOrNil ifTrue:[ |
|
1996 |
slice := Menu new. |
|
1997 |
AdditionalFolderItemsInMenu do:[:eachFolderNameOrPair | |
|
1998 |
|item fn label| |
|
1999 |
||
2000 |
eachFolderNameOrPair isArray ifTrue:[ |
|
2001 |
fn := eachFolderNameOrPair first asFilename. |
|
2002 |
label := eachFolderNameOrPair second. |
|
2003 |
] ifFalse:[ |
|
2004 |
fn := eachFolderNameOrPair asFilename. |
|
2005 |
label := eachFolderNameOrPair. |
|
2006 |
]. |
|
2007 |
item := MenuItem new. |
|
2008 |
item label:label. |
|
2009 |
item itemValue:[ self gotoFile:fn ]. |
|
2010 |
item enabled:[ fn exists and:[fn isDirectory and:[fn isExecutable]]]. |
|
2011 |
slice addItem:item. |
|
2012 |
]. |
|
2013 |
]. |
|
2014 |
^ slice |
|
2015 |
! ! |
|
2016 |
||
3892 | 2017 |
!FileDialog methodsFor:'event handling'! |
2018 |
||
18749 | 2019 |
processEvent:anEvent |
2020 |
"filter keyboard edit-events typed into the listOfItemsView. |
|
2021 |
Return true, if I have eaten the event" |
|
2022 |
||
2023 |
<resource: #keyboard (#FindNext)> |
|
2024 |
||
2025 |
anEvent isKeyPressEvent ifFalse:[^ false]. |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
2026 |
|
18749 | 2027 |
anEvent key == #FindNext ifTrue:[ |
2028 |
self doFindAndSelectNextFile. |
|
2029 |
^ true |
|
2030 |
]. |
|
2031 |
^ false |
|
2032 |
||
2033 |
"Created: / 02-05-2019 / 21:17:15 / Claus Gittinger" |
|
3892 | 2034 |
! ! |
2035 |
||
2036 |
!FileDialog methodsFor:'initialization & release'! |
|
2037 |
||
5932 | 2038 |
closeDownViews |
9765 | 2039 |
self rememberExtent. |
5932 | 2040 |
super closeDownViews. |
9765 | 2041 |
|
2042 |
"Modified: / 14-02-2011 / 17:55:14 / cg" |
|
5932 | 2043 |
! |
2044 |
||
2045 |
closeWindow |
|
9765 | 2046 |
self rememberExtent. |
5932 | 2047 |
super closeWindow. |
9765 | 2048 |
|
2049 |
"Modified: / 14-02-2011 / 17:55:55 / cg" |
|
5932 | 2050 |
! |
2051 |
||
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2052 |
commonPostOpen |
8182 | 2053 |
|selection| |
3892 | 2054 |
|
17316 | 2055 |
super commonPostOpen. |
2056 |
||
3892 | 2057 |
"/ self windowGroup addPreEventHook:self. |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
2058 |
|
19062 | 2059 |
treeBrowser rootHolder value:(self initialRootDirectory). |
2060 |
||
3892 | 2061 |
treeBrowser currentFileNameHolder addDependent:self. |
5598 | 2062 |
treeBrowser doubleClickAction:self doubleClickAction. |
3904 | 2063 |
treeBrowser viewFilesInDirectoryTree addDependent:self. |
5863
e31e066a41d9
root is one up (showing containing directory)
Claus Gittinger <cg@exept.de>
parents:
5858
diff
changeset
|
2064 |
|
4804 | 2065 |
treeBrowser viewFilesInDirectoryTree setValue:(self viewFiles ? true). |
4796 | 2066 |
treeBrowser viewFilesInDirectoryTree changed. |
4804 | 2067 |
|
2068 |
self isLoadDialog ifTrue:[ |
|
4796 | 2069 |
treeBrowser newVisibilityHolder value:false. |
2070 |
treeBrowser allowFileOperations value:false. |
|
2071 |
self newDirectoryVisibilityHolder value:false. |
|
2072 |
]. |
|
5927 | 2073 |
treeBrowser expandEnforceSelectedItems. |
5929 | 2074 |
|
2075 |
selection := treeBrowser treeSelectionHolder value. |
|
2076 |
selection notEmptyOrNil ifTrue:[ |
|
5930 | 2077 |
selection := selection asCollection first. |
5929 | 2078 |
selection enforcedExpand. |
2079 |
treeBrowser browser makeItemVisible:selection withMinimumLines:5. |
|
2080 |
]. |
|
18749 | 2081 |
self windowGroup addPreEventHook:self. |
2082 |
||
2083 |
"Modified: / 02-05-2019 / 21:15:18 / Claus Gittinger" |
|
4796 | 2084 |
! |
2085 |
||
6409 | 2086 |
initialRootDirectory |
2087 |
"returns the directory the browser is open on |
|
2088 |
" |
|
2089 |
|root| |
|
2090 |
||
9678 | 2091 |
initialRoot isNil ifTrue:[ |
6409 | 2092 |
|
9678 | 2093 |
(root := self directory) notNil ifTrue:[ |
2094 |
root := root asFilename. |
|
6409 | 2095 |
|
2096 |
root isDirectory ifFalse:[ |
|
9678 | 2097 |
root := root directory. |
2098 |
root isDirectory ifFalse:[ |
|
2099 |
root := nil. |
|
2100 |
] |
|
6409 | 2101 |
] |
9678 | 2102 |
]. |
2103 |
root isNil ifTrue:[ |
|
2104 |
root := Filename currentDirectory. |
|
2105 |
]. |
|
2106 |
initialRoot := root asAbsoluteFilename. |
|
6409 | 2107 |
]. |
9678 | 2108 |
^ initialRoot |
2109 |
||
2110 |
"Modified: / 27-12-2010 / 09:56:30 / cg" |
|
6409 | 2111 |
! |
2112 |
||
15767 | 2113 |
initialize |
15768 | 2114 |
super initialize. |
15767 | 2115 |
isLoadDialog := false. |
19174 | 2116 |
viewFiles := true. |
2117 |
multipleSelect := false. |
|
2118 |
||
2119 |
"Modified: / 10-09-2019 / 18:40:07 / Stefan Vogel" |
|
15767 | 2120 |
! |
2121 |
||
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2122 |
postBuildFileNameField:aWidget |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2123 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2124 |
filenameField := aWidget. |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2125 |
! |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2126 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2127 |
postBuildFilterField:aWidget |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2128 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2129 |
filterField := aWidget. |
4796 | 2130 |
! |
2131 |
||
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2132 |
postBuildTreeBrowser:aSubCanvasView |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2133 |
treeBrowser := aSubCanvasView client. |
6409 | 2134 |
treeBrowser rootHolder value:(self initialRootDirectory value). |
9113 | 2135 |
treeBrowser sortPropertyInTree:(treeBrowser sortBlockProperty). |
9553 | 2136 |
treeBrowser showHiddenFiles value:true. |
2137 |
||
2138 |
"Modified: / 24-08-2010 / 16:07:16 / sr" |
|
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2139 |
! |
4796 | 2140 |
|
12875 | 2141 |
postBuildVerticalPanelView:aView |
2142 |
verticalPanelView := aView. |
|
12816 | 2143 |
|
2144 |
"Created: / 03-06-2013 / 17:41:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2145 |
! |
|
2146 |
||
13004 | 2147 |
postBuildWith:aBuilder |
2148 |
|win hMin| |
|
2149 |
||
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2150 |
treeBrowser multipleSelect:multipleSelect. |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2151 |
appendWasPressed := false. |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2152 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2153 |
(aBuilder componentAt:'cancelButton') cursor:(Cursor thumbsDown). |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2154 |
(aBuilder componentAt:'appendButton') cursor:(Cursor thumbsUp). |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2155 |
(aBuilder componentAt:'okButton') cursor:(Cursor thumbsUp). |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
2156 |
|
13004 | 2157 |
win := aBuilder window . |
13187 | 2158 |
win minExtent notNil ifTrue:[ |
2159 |
"minExtent is nil if window is not a TopView" |
|
2160 |
hMin := (win margin * 2) |
|
2161 |
+ (aBuilder menuBar isNil ifTrue:[0] ifFalse:[aBuilder menuBar preferredHeight]) |
|
2162 |
+ (aBuilder componentAt:#FilenameEntryField) height |
|
2163 |
+ (aBuilder componentAt:#ToolBar1) preferredHeight |
|
2164 |
+ (aBuilder componentAt:#ButtonPanel) preferredHeight. |
|
13004 | 2165 |
|
13187 | 2166 |
win minExtent:(win minExtent x @ hMin). |
2167 |
]. |
|
13090 | 2168 |
win topView label:self initialText. |
13004 | 2169 |
|
6632 | 2170 |
super postBuildWith:aBuilder |
5932 | 2171 |
! |
2172 |
||
8182 | 2173 |
postOpenAsSubcanvasWith:aBuilder |
2174 |
super postOpenAsSubcanvasWith:aBuilder. |
|
2175 |
||
2176 |
"No ok and cancel buttons, when dialog is part of a larger dialog" |
|
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
2177 |
self hideButtonPanel. |
8183 | 2178 |
|
9809
fa5280b1259f
changed: #postOpenAsSubcanvasWith:
Stefan Vogel <sv@exept.de>
parents:
9769
diff
changeset
|
2179 |
"filenameHolder contains the initial file name, or nil" |
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
2180 |
self startFilename:self filenameHolder value. |
9809
fa5280b1259f
changed: #postOpenAsSubcanvasWith:
Stefan Vogel <sv@exept.de>
parents:
9769
diff
changeset
|
2181 |
treeBrowser currentFileNameHolder value:(Array with:self startFilename). |
8182 | 2182 |
! |
2183 |
||
12816 | 2184 |
preOpenWith:aBuilder |
12883 | 2185 |
"called right before being opened" |
2186 |
||
18015 | 2187 |
verticalPanelView notNil ifTrue:[ |
2188 |
"/ SV: disabled, because dialogs where opened full height: |
|
2189 |
"/ "Increase height of the window so height of the file part |
|
2190 |
"/ remains the same. This cares for any components added by a hook" |
|
2191 |
"/ |
|
2192 |
"/ |delta| |
|
2193 |
"/ |
|
2194 |
"/ delta := verticalPanelView preferredHeight - verticalPanelView height. |
|
2195 |
"/ delta > 0 ifTrue:[ |
|
2196 |
"/ "/ components where added (possibly in the aboutToOpenBoxNotifiction |
|
2197 |
"/ aBuilder window height: (aBuilder window height + delta). |
|
2198 |
"/ ]. |
|
12875 | 2199 |
|
18015 | 2200 |
"/ This code was disabled without comment: |
12883 | 2201 |
"/ sumH := 0. |
2202 |
"/ verticalPanelView subViews from:2 do:[:view| |
|
2203 |
"/ sumH := sumH + view preferredHeight. |
|
2204 |
"/ ]. |
|
2205 |
"/ sumH ~~ 0 ifTrue:[ |
|
18015 | 2206 |
"/ newVPanelHeight := verticalPanelView preferredHeight. |
12883 | 2207 |
"/ aBuilder window height: aBuilder window height + sumH. |
2208 |
"/ ]. |
|
8182 | 2209 |
]. |
12816 | 2210 |
|
14151 | 2211 |
treeBrowser currentFileNameHolder value:(Array with:self startFilename). |
2212 |
||
12816 | 2213 |
"Created: / 03-06-2013 / 18:19:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
18015 | 2214 |
"Modified (format): / 20-03-2018 / 11:34:26 / stefan" |
8182 | 2215 |
! |
2216 |
||
9765 | 2217 |
rememberExtent |
18015 | 2218 |
"if the user changed the size of the dialog, the next time the dialog |
2219 |
is opened with this size. |
|
2220 |
But ignore height changes < 40 pixels. On some systems the height of the title bar |
|
2221 |
is added to the height. (https://expeccoalm.exept.de/D160693)" |
|
2222 |
||
2223 |
|currentExtent| |
|
2224 |
||
2225 |
currentExtent := self window topView extent. |
|
2226 |
(LastExtent isNil or:[(LastExtent y - currentExtent y) abs > 40]) ifTrue:[ |
|
2227 |
self class lastExtent:currentExtent. |
|
2228 |
]. |
|
9765 | 2229 |
|
2230 |
"Created: / 14-02-2011 / 17:55:11 / cg" |
|
18015 | 2231 |
"Modified: / 20-03-2018 / 11:44:06 / stefan" |
4796 | 2232 |
! ! |
2233 |
||
9113 | 2234 |
!FileDialog methodsFor:'menus'! |
2235 |
||
2236 |
bookmarksMenu |
|
2237 |
^ treeBrowser bookmarksMenu |
|
2238 |
! |
|
2239 |
||
2240 |
directoryMenu |
|
2241 |
^ treeBrowser directoryMenu |
|
2242 |
! |
|
2243 |
||
2244 |
showMenuSpecForDialog |
|
2245 |
^ treeBrowser class showMenuSpecForDialog |
|
2246 |
! |
|
2247 |
||
2248 |
sortMenu |
|
2249 |
^ treeBrowser class sortInTreeMenu |
|
2250 |
! |
|
2251 |
||
2252 |
visitedDirectoriesMenu |
|
2253 |
^ treeBrowser visitedDirectoriesMenu |
|
2254 |
! ! |
|
2255 |
||
4796 | 2256 |
!FileDialog methodsFor:'private'! |
2257 |
||
2258 |
returnWasPressedInFilterField |
|
8663 | 2259 |
|wg ev| |
4796 | 2260 |
|
8663 | 2261 |
((wg := self windowGroup) notNil |
2262 |
and:[ (ev := wg lastEvent) notNil |
|
2263 |
and:[ ev isKeyEvent |
|
2264 |
and:[ ev key == #Return |
|
2265 |
and:[ (ev targetView isSameOrComponentOf:filterField) |
|
2266 |
or:[false "ev targetView isSameOrComponentOf:filenameField"]]]]]) ifTrue:[ |
|
4796 | 2267 |
^ true |
2268 |
]. |
|
2269 |
^ false |
|
2270 |
! |
|
2271 |
||
2272 |
returnWasPressedInFilterOrFilenameField |
|
17990 | 2273 |
|wg ev| |
4796 | 2274 |
|
17990 | 2275 |
((wg := self windowGroup) notNil |
2276 |
and:[(ev := wg lastEvent) notNil |
|
2277 |
and:[ev notNil |
|
4796 | 2278 |
and:[ev isKeyEvent |
2279 |
and:[ev key == #Return |
|
2280 |
and:[( ev targetView isSameOrComponentOf:filterField) |
|
17990 | 2281 |
or:[false "ev targetView isSameOrComponentOf:filenameField"]]]]]]) ifTrue:[ |
4796 | 2282 |
^ true |
2283 |
]. |
|
2284 |
^ false |
|
2285 |
! ! |
|
2286 |
||
6065 | 2287 |
!FileDialog methodsFor:'queries'! |
2288 |
||
2289 |
driveSelectorVisible |
|
2290 |
^ OperatingSystem isMSDOSlike |
|
2291 |
! ! |
|
2292 |
||
4796 | 2293 |
!FileDialog methodsFor:'user actions'! |
2294 |
||
2295 |
appendPressed |
|
2296 |
appendWasPressed := true. |
|
2297 |
self commonAcceptAction. |
|
2298 |
! |
|
2299 |
||
2300 |
commonAcceptAction |
|
2301 |
filenameField accept. |
|
2302 |
self result:(self filenameHolder value asString). |
|
2303 |
||
2304 |
^ super doAccept |
|
2305 |
! |
|
2306 |
||
2307 |
doAccept |
|
2308 |
"force accept - ignore in filterField" |
|
2309 |
||
2310 |
self returnWasPressedInFilterField ifTrue:[ |
|
2311 |
^ self |
|
2312 |
]. |
|
4996
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
2313 |
treeBrowser hasOpenEditor ifTrue:[ |
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
2314 |
"/ have to send the event to the TreeView |
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
2315 |
treeBrowser browser closeEditor. |
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
2316 |
^ self |
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
2317 |
]. |
4796 | 2318 |
appendWasPressed := false. |
2319 |
self commonAcceptAction. |
|
2320 |
! |
|
2321 |
||
2322 |
doBack |
|
2323 |
||
2324 |
treeBrowser doBack. |
|
2325 |
! |
|
2326 |
||
5966 | 2327 |
doBrowseDirectory |
17651 | 2328 |
FileBrowser default openOn:(treeBrowser currentDirectory ? treeBrowser rootHolder value). |
5966 | 2329 |
|
17651 | 2330 |
"Modified: / 01-09-2017 / 14:05:09 / cg" |
5966 | 2331 |
! |
2332 |
||
4796 | 2333 |
doCancel |
2334 |
||
2335 |
self result:nil. |
|
2336 |
^ super doCancel. |
|
2337 |
! |
|
2338 |
||
18268 | 2339 |
doFindAndSelectFile |
19012 | 2340 |
"search for a file matching a requested pattern" |
2341 |
||
2342 |
|fileNameInEditField initialSearchPattern patternAndTopDirectoryForSearch |
|
2343 |
searchPattern topDirectoryForSearch searchRoot list| |
|
18749 | 2344 |
|
19012 | 2345 |
(fileNameInEditField := filenameField contents) notEmptyOrNil ifTrue:[ |
2346 |
initialSearchPattern := fileNameInEditField asFilename baseName. |
|
2347 |
] ifFalse:[ |
|
2348 |
initialSearchPattern := LastFindPattern ? '*.txt' |
|
2349 |
]. |
|
18268 | 2350 |
|
19012 | 2351 |
patternAndTopDirectoryForSearch := Dialog |
18268 | 2352 |
request:'Filename Pattern (match):' |
19012 | 2353 |
initialAnswer:initialSearchPattern |
2354 |
and:'Search under:' |
|
2355 |
initialAnswer:(directory ? Filename currentDirectory) name |
|
19265 | 2356 |
label:'Search for File (not Folder)'. |
19012 | 2357 |
patternAndTopDirectoryForSearch isEmptyOrNil ifTrue:[^ self]. |
2358 |
||
2359 |
searchPattern := patternAndTopDirectoryForSearch first. |
|
2360 |
topDirectoryForSearch := patternAndTopDirectoryForSearch second. |
|
2361 |
||
2362 |
LastFindPattern := searchPattern. |
|
2363 |
||
2364 |
list := HierarchicalFileList new. |
|
2365 |
searchRoot := HierarchicalFileList::HierarchicalFileItem fileName:topDirectoryForSearch. |
|
2366 |
list root:searchRoot. |
|
18749 | 2367 |
|
18748 | 2368 |
self withWaitCursorDo:[ |
19012 | 2369 |
[ |
2370 |
|dirHolder| |
|
2371 |
||
2372 |
dirHolder := self searchedDirectoryInfoHolder. |
|
2373 |
self searchInfoBoxVisibleHolder value:true. |
|
2374 |
self windowGroup processExposeEvents. |
|
2375 |
||
2376 |
treeBrowser |
|
2377 |
findAndSelectNextFileMatching:searchPattern |
|
2378 |
under:searchRoot |
|
2379 |
searchInfoInto:[:path | dirHolder value:path. self windowGroup processExposeEvents]. |
|
2380 |
] ensure:[ |
|
2381 |
self searchInfoBoxVisibleHolder value:false |
|
2382 |
] |
|
18748 | 2383 |
]. |
18268 | 2384 |
|
2385 |
"Created: / 17-07-2018 / 12:44:20 / Claus Gittinger" |
|
18749 | 2386 |
"Modified (format): / 02-05-2019 / 20:44:14 / Claus Gittinger" |
2387 |
! |
|
2388 |
||
2389 |
doFindAndSelectNextFile |
|
2390 |
"search the next file matching the previous pattern" |
|
2391 |
||
19264 | 2392 |
LastFindPattern isEmptyOrNil ifTrue:[ |
2393 |
self doFindAndSelectFile. |
|
2394 |
^ self. |
|
2395 |
]. |
|
18749 | 2396 |
self withWaitCursorDo:[ |
2397 |
treeBrowser findAndSelectNextFileMatching:LastFindPattern. |
|
2398 |
]. |
|
2399 |
||
2400 |
"Created: / 02-05-2019 / 21:18:13 / Claus Gittinger" |
|
18268 | 2401 |
! |
2402 |
||
4796 | 2403 |
doForward |
2404 |
||
2405 |
treeBrowser doForward. |
|
2406 |
! |
|
2407 |
||
2408 |
doGoDirectoryUp |
|
2409 |
||
2410 |
treeBrowser doGoDirectoryUp. |
|
2411 |
! |
|
2412 |
||
8092 | 2413 |
doGotoDesktopDirectory |
2414 |
||
2415 |
treeBrowser doGotoDesktopDirectory. |
|
2416 |
! |
|
2417 |
||
18037 | 2418 |
doGotoDocumentsDirectory |
2419 |
||
2420 |
treeBrowser doGotoDocumentsDirectory. |
|
2421 |
! |
|
2422 |
||
2423 |
doGotoDownloadsDirectory |
|
2424 |
||
2425 |
treeBrowser doGotoDownloadsDirectory. |
|
2426 |
! |
|
2427 |
||
4796 | 2428 |
doGotoHomeDirectory |
2429 |
||
2430 |
treeBrowser doGotoHomeDirectory. |
|
2431 |
! |
|
2432 |
||
19265 | 2433 |
findAndSelectNextFileEnabledHolder |
2434 |
^ [LastFindPattern notEmptyOrNil]. |
|
2435 |
! |
|
2436 |
||
19267 | 2437 |
gotoFile:fn |
2438 |
treeBrowser gotoFile:fn. |
|
2439 |
! |
|
2440 |
||
4796 | 2441 |
menuDirHistory:backOrForward |
2442 |
||
2443 |
^ treeBrowser menuDirHistory:backOrForward. |
|
2444 |
! |
|
2445 |
||
2446 |
menuDirHistoryBack |
|
2447 |
||
2448 |
^ treeBrowser menuDirHistory:#back. |
|
2449 |
! |
|
2450 |
||
2451 |
menuDirHistoryForward |
|
2452 |
||
2453 |
^ treeBrowser menuDirHistory:#forward. |
|
2454 |
! |
|
2455 |
||
2456 |
newDirectory |
|
17380 | 2457 |
"forward to the treebrowser component, which already has this functionality" |
2458 |
||
2459 |
^ treeBrowser newDirectory |
|
4796 | 2460 |
|
17380 | 2461 |
"Modified (comment): / 04-02-2017 / 14:41:43 / cg" |
4796 | 2462 |
! |
2463 |
||
2464 |
okPressed |
|
2465 |
self doAccept |
|
9113 | 2466 |
! |
2467 |
||
19012 | 2468 |
openTerminal |
2469 |
"forward to the treebrowser component, which already has this functionality" |
|
2470 |
||
2471 |
^ treeBrowser openTerminal |
|
2472 |
! |
|
2473 |
||
9113 | 2474 |
updateCurrentDirectory |
2475 |
treeBrowser updateCurrentDirectory |
|
4796 | 2476 |
! ! |
2477 |
||
2478 |
!FileDialog class methodsFor:'documentation'! |
|
2479 |
||
2480 |
version |
|
15725 | 2481 |
^ '$Header$' |
12883 | 2482 |
! |
2483 |
||
2484 |
version_CVS |
|
15725 | 2485 |
^ '$Header$' |
19195 | 2486 |
! |
2487 |
||
2488 |
version_HG |
|
2489 |
||
2490 |
^ '$Changeset: <not expanded> $' |
|
2491 |
! |
|
2492 |
||
2493 |
version_SVN |
|
2494 |
^ '$Id$' |
|
4796 | 2495 |
! ! |
12816 | 2496 |