author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 30 Jan 2012 17:49:41 +0000 | |
branch | jv |
changeset 12128 | a7ff7d66ee85 |
parent 12125 | 0c49a3b13e43 |
child 12431 | 9f0c59c742d5 |
permissions | -rw-r--r-- |
5140 | 1 |
" |
2 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
8250 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
3892 | 14 |
SimpleDialog subclass:#FileDialog |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
15 |
instanceVariableNames:'aspects treeBrowser directory pattern filterHolder initialText |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
16 |
multipleSelect doubleClickAction cancelLabelHolder okLabelHolder |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
17 |
startFilename result filterField filenameField viewFiles |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
18 |
filenameLabelHolder isLoadDialog newDirectoryVisibilityHolder |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
19 |
appendButtonVisibleHolder appendWasPressed |
6065 | 20 |
buttonPanelVisibleHolder appendLabelHolder browseVisibleHolder |
9678 | 21 |
selectedDeviceDrive listOfDeviceDrives rootDirectoryHolder |
22 |
initialRoot' |
|
5931 | 23 |
classVariableNames:'LastExtent' |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
24 |
poolDictionaries:'' |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
25 |
category:'Interface-Tools-File' |
3892 | 26 |
! |
27 |
||
28 |
!FileDialog class methodsFor:'documentation'! |
|
29 |
||
5140 | 30 |
copyright |
31 |
" |
|
32 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
33 |
All Rights Reserved |
|
34 |
||
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
42 |
! |
|
43 |
||
3892 | 44 |
documentation |
45 |
" |
|
9767 | 46 |
A slightly better file dialog |
3892 | 47 |
|
48 |
[author:] |
|
49 |
Martin Walser (martin@vercingetorix) |
|
50 |
||
51 |
[instance variables:] |
|
52 |
||
53 |
[class variables:] |
|
54 |
||
55 |
[see also:] |
|
56 |
||
57 |
" |
|
58 |
! |
|
59 |
||
60 |
examples |
|
61 |
" |
|
62 |
[exBegin] |
|
63 |
FileDialog open |
|
64 |
[exEnd] |
|
65 |
||
66 |
[exBegin] |
|
5188
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
67 |
FileDialog |
4804 | 68 |
requestFileName:'enter a fileName:' |
69 |
default:'' |
|
70 |
version:nil |
|
71 |
ifFail:['none'] |
|
72 |
pattern:'*.conf' |
|
73 |
fromDirectory:'/etc' |
|
74 |
whenBoxCreatedEvaluate:nil. |
|
75 |
[exEnd] |
|
76 |
[exBegin] |
|
77 |
|fd| |
|
78 |
||
79 |
fd := FileDialog new. |
|
80 |
fd multipleSelect:true. |
|
81 |
fd open |
|
3892 | 82 |
[exEnd] |
83 |
" |
|
5062 | 84 |
! |
85 |
||
86 |
todo |
|
87 |
" |
|
9769 | 88 |
- make the filedialog windows like |
5062 | 89 |
filename entry field shows only the filename not the whole directory |
90 |
the tree allways starts in currrent directory |
|
91 |
the parent tree is shown in a compobox where the perents are selectable |
|
9769 | 92 |
|
5062 | 93 |
- do not expand the ~ or relative pathnames to absolute pathnames |
94 |
" |
|
3892 | 95 |
! ! |
96 |
||
97 |
!FileDialog class methodsFor:'instance creation'! |
|
98 |
||
99 |
requestDirectoryName:title default:aFileName ifFail:failBlock |
|
100 |
"same as requestFileName, but only show directories" |
|
101 |
||
4795 | 102 |
^ self |
103 |
requestDirectoryName:title |
|
104 |
default:aFileName |
|
105 |
ok:nil |
|
106 |
abort:nil |
|
107 |
version:nil |
|
108 |
pattern:nil |
|
109 |
fromDirectory:nil |
|
110 |
ifFail:failBlock |
|
111 |
whenBoxCreatedEvaluate:nil |
|
112 |
asLoadDialog:nil. |
|
3892 | 113 |
|
114 |
" |
|
3904 | 115 |
FileDialog |
3892 | 116 |
requestDirectoryName:'which directory ?' |
4627 | 117 |
default:Filename currentDirectory pathName |
3892 | 118 |
ifFail:'none' |
119 |
" |
|
120 |
! |
|
121 |
||
5336 | 122 |
requestDirectoryName:title default:aFileName ok:okText abort:abortText ifFail:failBlock |
123 |
"same as requestFileName, but only show directories" |
|
124 |
||
125 |
^ self |
|
126 |
requestDirectoryName:title |
|
127 |
default:aFileName |
|
128 |
ok:okText |
|
129 |
abort:abortText |
|
130 |
version:nil |
|
131 |
pattern:nil |
|
132 |
fromDirectory:nil |
|
133 |
ifFail:failBlock |
|
134 |
whenBoxCreatedEvaluate:nil |
|
135 |
asLoadDialog:nil. |
|
136 |
||
137 |
" |
|
138 |
FileDialog |
|
139 |
requestDirectoryName:'which directory ?' |
|
140 |
default:Filename currentDirectory pathName |
|
141 |
ok:'Yes' |
|
142 |
abort:'No' |
|
143 |
ifFail:'none' |
|
144 |
" |
|
145 |
! |
|
146 |
||
5823 | 147 |
requestDirectoryName:title default:aFileName ok:okText abort:abortText ifFail:failBlock acceptReturnAsOK:aBoolean |
148 |
"same as requestFileName, but only show directories" |
|
149 |
||
150 |
^ self |
|
151 |
requestDirectoryName:title |
|
152 |
default:aFileName |
|
153 |
ok:okText |
|
154 |
abort:abortText |
|
155 |
version:nil |
|
156 |
pattern:nil |
|
157 |
fromDirectory:nil |
|
158 |
ifFail:failBlock |
|
159 |
whenBoxCreatedEvaluate:[:box|box doubleClickAction:[:index|box doAccept]] |
|
160 |
asLoadDialog:nil. |
|
161 |
||
162 |
" |
|
163 |
FileDialog |
|
164 |
requestDirectoryName:'which directory ?' |
|
165 |
default:Filename currentDirectory pathName |
|
166 |
ok:'Yes' |
|
167 |
abort:'No' |
|
168 |
ifFail:'none' |
|
169 |
" |
|
170 |
! |
|
171 |
||
3956 | 172 |
requestDirectoryName:titleString default:aFileName ok:okText abort:abortText version:versionSymbol pattern:pattern fromDirectory:aDirectoryPath ifFail:failBlock whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:aBoolean |
3892 | 173 |
"same as requestFileName, but only show directories" |
174 |
||
3956 | 175 |
|enteredFileName instance enteredFileNameString| |
3892 | 176 |
|
4795 | 177 |
instance := self |
178 |
startApplicationFor:titleString |
|
179 |
default:aFileName |
|
180 |
ok:okText |
|
181 |
abort:abortText |
|
182 |
ifFail:failBlock |
|
183 |
pattern:pattern |
|
184 |
fromDirectory:aDirectoryPath |
|
185 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
186 |
asLoadDialog:aBoolean |
|
5329 | 187 |
viewFiles:false |
4795 | 188 |
multipleSelect:false. |
3892 | 189 |
|
190 |
enteredFileNameString := instance result. |
|
191 |
enteredFileNameString isNil ifTrue:[ |
|
192 |
^ failBlock value |
|
193 |
]. |
|
194 |
enteredFileName := enteredFileNameString asFilename. |
|
195 |
enteredFileNameString := enteredFileName asString. |
|
196 |
(enteredFileName notNil |
|
197 |
and:[enteredFileNameString notEmpty]) ifTrue:[ |
|
198 |
versionSymbol isNil ifTrue:[ ^ enteredFileNameString]. |
|
199 |
versionSymbol == #mustBeNew ifTrue:[ |
|
200 |
"/ file may not exist |
|
201 |
enteredFileName exists ifTrue:[^ '']. |
|
202 |
]. |
|
203 |
versionSymbol == #new ifTrue:[ |
|
204 |
"/ file may not exist |
|
205 |
enteredFileName exists ifTrue:[ |
|
6356 | 206 |
(Dialog confirm:(self classResources stringWithCRs:'''%1'' exists.\\Continue anyway ?' with:enteredFileNameString)) |
3892 | 207 |
ifFalse:[^ '']. |
208 |
]. |
|
209 |
]. |
|
210 |
versionSymbol == #mustBeOld ifTrue:[ |
|
211 |
enteredFileName exists ifFalse:[^ '']. |
|
212 |
]. |
|
213 |
versionSymbol == #old ifTrue:[ |
|
214 |
"/ file may not exist |
|
215 |
enteredFileName exists ifFalse:[ |
|
6356 | 216 |
(self confirm:(self classResources stringWithCRs:'''%1'' does not exist yet.\\Continue anyway ?' with:enteredFileNameString)) |
3892 | 217 |
ifFalse:[^ '']. |
218 |
]. |
|
219 |
]. |
|
220 |
FileSelectionBox lastFileSelectionDirectory:(enteredFileNameString). |
|
221 |
]. |
|
222 |
^ enteredFileNameString |
|
223 |
||
224 |
" |
|
225 |
FileDialog |
|
226 |
requestDirectoryName:'which directory ?' |
|
4627 | 227 |
default:Filename currentDirectory pathName |
3892 | 228 |
ifFail:nil |
229 |
" |
|
3956 | 230 |
" |
231 |
FileDialog |
|
232 |
requestDirectoryName:'which directory ?' |
|
4627 | 233 |
default:Filename currentDirectory pathName |
3956 | 234 |
ok:nil |
235 |
abort:nil |
|
236 |
version:nil |
|
237 |
pattern:nil |
|
238 |
fromDirectory:nil |
|
239 |
ifFail:nil |
|
240 |
whenBoxCreatedEvaluate:nil |
|
241 |
asLoadDialog:true |
|
242 |
" |
|
3892 | 243 |
! |
244 |
||
5336 | 245 |
requestDirectoryName:title default:aFileName ok:okText ifFail:failBlock |
246 |
"same as requestFileName, but only show directories" |
|
247 |
||
248 |
^ self |
|
249 |
requestDirectoryName:title |
|
250 |
default:aFileName |
|
251 |
ok:okText |
|
252 |
abort:nil |
|
253 |
version:nil |
|
254 |
pattern:nil |
|
255 |
fromDirectory:nil |
|
256 |
ifFail:failBlock |
|
257 |
whenBoxCreatedEvaluate:nil |
|
258 |
asLoadDialog:nil. |
|
259 |
||
260 |
" |
|
261 |
FileDialog |
|
262 |
requestDirectoryName:'which directory ?' |
|
263 |
default:Filename currentDirectory pathName |
|
264 |
ok:'Yes' |
|
265 |
ifFail:'none' |
|
266 |
" |
|
267 |
! |
|
268 |
||
9765 | 269 |
requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:pattern fromDirectory:aDirectoryPathOrNil |
270 |
"launch a Dialog, which allows user to enter a filename. |
|
271 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
272 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
273 |
The box will show okText in its okButton, abortText in the abortButton. |
|
274 |
The matchPattern is set to pattern initially. |
|
275 |
Return the string, or nil if cancel was pressed." |
|
276 |
||
277 |
^ self |
|
278 |
requestFileName:titleString |
|
279 |
default:defaultName |
|
280 |
ok:okText |
|
281 |
abort:abortText |
|
282 |
pattern:pattern |
|
283 |
fromDirectory:aDirectoryPathOrNil |
|
284 |
whenBoxCreatedEvaluate:nil |
|
285 |
||
286 |
"Created: / 14-02-2011 / 17:59:21 / cg" |
|
287 |
! |
|
288 |
||
3892 | 289 |
requestFileName:titleString default:defaultName ok:okText abort:abortText pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback |
290 |
||
4795 | 291 |
^ self |
292 |
requestFileName:titleString |
|
293 |
default:defaultName |
|
294 |
ok:okText |
|
295 |
abort:abortText |
|
296 |
version:nil |
|
297 |
ifFail:nil |
|
298 |
pattern:pattern |
|
299 |
fromDirectory:aDirectoryPathOrNil |
|
300 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
3892 | 301 |
! |
302 |
||
303 |
requestFileName:titleString default:defaultName ok:okText abort:abortText version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback |
|
304 |
"launch a Dialog, which allows user to enter a filename. |
|
305 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
306 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
307 |
The box will show okText in its okButton, abortText in the abortButton. |
|
308 |
The matchPattern is set to pattern initially. |
|
309 |
Return the string, or nil if cancel was pressed |
|
310 |
The version argument allows validation of the files existance; |
|
311 |
it may be any of: |
|
312 |
#mustBeNew - fail (return empty string) if the file exists |
|
313 |
#new - confirm if the file exists |
|
314 |
#mustBeOld - fail if the file does not exist |
|
315 |
#old - confirm if the file does not exist |
|
316 |
#any (other) - no validation |
|
317 |
" |
|
318 |
||
4795 | 319 |
^ self |
320 |
requestFileName:titleString |
|
321 |
default:defaultName |
|
322 |
ok:okText |
|
323 |
abort:abortText |
|
324 |
version:versionSymbol |
|
325 |
ifFail:failBlock |
|
326 |
pattern:pattern |
|
327 |
fromDirectory:aDirectoryPath |
|
328 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
329 |
asLoadDialog:nil |
|
3956 | 330 |
! |
331 |
||
332 |
requestFileName:titleString default:defaultName ok:okText abort:abortText version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:aBoolean |
|
333 |
"launch a Dialog, which allows user to enter a filename. |
|
334 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
335 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
336 |
The box will show okText in its okButton, abortText in the abortButton. |
|
337 |
The matchPattern is set to pattern initially. |
|
338 |
Return the string, or nil if cancel was pressed |
|
339 |
The version argument allows validation of the files existance; |
|
340 |
it may be any of: |
|
341 |
#mustBeNew - fail (return empty string) if the file exists |
|
342 |
#new - confirm if the file exists |
|
343 |
#mustBeOld - fail if the file does not exist |
|
344 |
#old - confirm if the file does not exist |
|
345 |
#any (other) - no validation |
|
346 |
" |
|
347 |
||
3892 | 348 |
|
3904 | 349 |
| instance enteredFileName enteredFileNameString| |
3892 | 350 |
|
4795 | 351 |
instance := self |
352 |
startApplicationFor:titleString |
|
353 |
default:defaultName |
|
354 |
ok:okText |
|
355 |
abort:abortText |
|
356 |
ifFail:failBlock |
|
357 |
pattern:pattern |
|
358 |
fromDirectory:aDirectoryPath |
|
359 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
360 |
asLoadDialog:aBoolean |
|
5329 | 361 |
viewFiles:true |
4795 | 362 |
multipleSelect:false. |
3892 | 363 |
|
364 |
enteredFileNameString := instance result. |
|
6482
00207f456339
isEmptyOrNil / notEmptyOrNil refactoring
Claus Gittinger <cg@exept.de>
parents:
6462
diff
changeset
|
365 |
(enteredFileNameString isEmptyOrNil) ifTrue:[ |
3892 | 366 |
^ failBlock value |
367 |
]. |
|
368 |
enteredFileName := enteredFileNameString asFilename. |
|
5867 | 369 |
enteredFileNameString := enteredFileName asString. |
5858
d5648b365b8d
returns construct with defaultName if directory selected on requestFilename
penk
parents:
5853
diff
changeset
|
370 |
|
3892 | 371 |
(enteredFileName notNil |
372 |
and:[enteredFileNameString notEmpty]) ifTrue:[ |
|
4666 | 373 |
FileSelectionBox lastFileSelectionDirectory:(enteredFileName directoryName). |
3892 | 374 |
versionSymbol isNil ifTrue:[ ^ enteredFileNameString]. |
375 |
versionSymbol == #mustBeNew ifTrue:[ |
|
376 |
"/ file may not exist |
|
377 |
enteredFileName exists ifTrue:[^ '']. |
|
378 |
]. |
|
379 |
versionSymbol == #new ifTrue:[ |
|
380 |
"/ file may not exist |
|
381 |
enteredFileName exists ifTrue:[ |
|
6356 | 382 |
(Dialog confirm:(self classResources stringWithCRs:'''%1'' exists.\\Continue anyway ?' with:enteredFileNameString)) |
3892 | 383 |
ifFalse:[^ '']. |
384 |
]. |
|
385 |
]. |
|
386 |
versionSymbol == #mustBeOld ifTrue:[ |
|
387 |
enteredFileName exists ifFalse:[^ '']. |
|
388 |
]. |
|
389 |
versionSymbol == #old ifTrue:[ |
|
390 |
"/ file may not exist |
|
391 |
enteredFileName exists ifFalse:[ |
|
6356 | 392 |
(self confirm:(self classResources stringWithCRs:'''%1'' does not exist yet.\\Continue anyway ?' with:enteredFileNameString)) |
3892 | 393 |
ifFalse:[^ '']. |
394 |
]. |
|
395 |
]. |
|
396 |
]. |
|
397 |
^ enteredFileNameString |
|
3956 | 398 |
" |
399 |
FileDialog |
|
400 |
requestFileName:'enter a fileName:' |
|
401 |
default:'' |
|
402 |
ok:nil |
|
403 |
abort:nil |
|
404 |
version:nil |
|
405 |
ifFail:['none'] |
|
5858
d5648b365b8d
returns construct with defaultName if directory selected on requestFilename
penk
parents:
5853
diff
changeset
|
406 |
pattern:'*' |
4627 | 407 |
fromDirectory:Filename currentDirectory pathName |
3956 | 408 |
whenBoxCreatedEvaluate:nil |
409 |
asLoadDialog:true |
|
410 |
" |
|
3892 | 411 |
! |
412 |
||
9765 | 413 |
requestFileName:titleString default:defaultName pattern:pattern fromDirectory:aDirectory |
414 |
"launch a Dialog, which allows user to enter a filename. |
|
415 |
The files presented initially are those from the current directory. |
|
416 |
The box will show ok/cancel in its buttons. |
|
417 |
The matchPattern is set to pattern initially. |
|
418 |
Return the string or nil if cancel was pressed." |
|
419 |
||
420 |
|resources| |
|
421 |
||
422 |
resources := self classResources. |
|
423 |
^ self |
|
424 |
requestFileName:titleString |
|
425 |
default:defaultName |
|
426 |
ok:(resources string:'OK') |
|
427 |
abort:(resources string:'Cancel') |
|
428 |
pattern:pattern |
|
429 |
fromDirectory:aDirectory |
|
430 |
||
431 |
"Created: / 14-02-2011 / 17:59:14 / cg" |
|
432 |
! |
|
433 |
||
3892 | 434 |
requestFileName:titleString default:defaultName version:versionSymbol ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPathOrNil whenBoxCreatedEvaluate:boxCreatedCallback |
435 |
||
4795 | 436 |
^ self |
437 |
requestFileName:titleString |
|
438 |
default:defaultName |
|
439 |
ok:nil |
|
440 |
abort:nil |
|
441 |
version:versionSymbol |
|
442 |
ifFail:failBlock |
|
443 |
pattern:pattern |
|
444 |
fromDirectory:aDirectoryPathOrNil |
|
445 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
3892 | 446 |
|
447 |
" |
|
448 |
FileDialog |
|
449 |
requestFileName:'enter a fileName:' |
|
450 |
default:'' |
|
451 |
version:nil |
|
452 |
ifFail:['none'] |
|
453 |
pattern:'*.conf' |
|
4627 | 454 |
fromDirectory:Filename currentDirectory pathName |
3892 | 455 |
whenBoxCreatedEvaluate:nil. |
456 |
Dialog |
|
457 |
requestFileName:'enter a fileName:' |
|
458 |
default:'' |
|
459 |
version:nil |
|
460 |
ifFail:['none'] |
|
461 |
pattern:'*.conf' |
|
4627 | 462 |
fromDirectory:Filename currentDirectory pathName |
3892 | 463 |
whenBoxCreatedEvaluate:nil |
464 |
" |
|
465 |
" |
|
466 |
FileDialog |
|
467 |
requestFileName:'enter a fileName:' |
|
468 |
default:'' |
|
469 |
version:#old |
|
470 |
ifFail:['none'] |
|
471 |
pattern:'*.conf' |
|
4627 | 472 |
fromDirectory:Filename currentDirectory pathName |
3892 | 473 |
whenBoxCreatedEvaluate:nil |
474 |
" |
|
475 |
" |
|
476 |
FileDialog |
|
477 |
requestFileName:'enter a fileName:' |
|
478 |
default:'' |
|
479 |
version:#mustBeNew |
|
480 |
ifFail:['none'] |
|
481 |
pattern:'*.conf' |
|
4627 | 482 |
fromDirectory:Filename currentDirectory pathName |
3892 | 483 |
whenBoxCreatedEvaluate:nil |
484 |
" |
|
3904 | 485 |
! |
486 |
||
487 |
requestFileNames:titleString default:defaultName ok:okText abort:abortText ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback |
|
488 |
"launch a Dialog, which allows user to enter a filename. |
|
489 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
490 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
491 |
The box will show okText in its okButton, abortText in the abortButton. |
|
492 |
The matchPattern is set to pattern initially. |
|
3905 | 493 |
Return all selected Filenames as filenames in a collection, or nil if cancel was pressed |
3904 | 494 |
" |
495 |
||
496 |
||
4795 | 497 |
^ self |
498 |
requestFileNames:titleString |
|
499 |
default:defaultName |
|
500 |
ok:okText |
|
501 |
abort:abortText |
|
502 |
ifFail:failBlock |
|
503 |
pattern:pattern |
|
504 |
fromDirectory:aDirectoryPath |
|
505 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
506 |
asLoadDialog:nil. |
|
3956 | 507 |
|
508 |
||
509 |
" |
|
510 |
FileDialog |
|
511 |
requestFileNames:'enter a fileName:' |
|
512 |
default:'' |
|
513 |
ok:nil |
|
514 |
abort:nil |
|
515 |
ifFail:['none'] |
|
516 |
pattern:'*.conf' |
|
4627 | 517 |
fromDirectory:Filename currentDirectory pathName |
3956 | 518 |
whenBoxCreatedEvaluate:nil. |
519 |
" |
|
520 |
! |
|
521 |
||
522 |
requestFileNames:titleString default:defaultName ok:okText abort:abortText ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:asLoadDialog |
|
523 |
"launch a Dialog, which allows user to enter a filename. |
|
524 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
525 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
526 |
The box will show okText in its okButton, abortText in the abortButton. |
|
527 |
The matchPattern is set to pattern initially. |
|
528 |
Return all selected Filenames as filenames in a collection, or nil if cancel was pressed |
|
529 |
" |
|
530 |
||
531 |
||
3904 | 532 |
| instance enteredFileNames lastDirectory| |
533 |
||
4795 | 534 |
instance := self |
535 |
startApplicationFor:titleString |
|
536 |
default:defaultName |
|
537 |
ok:okText |
|
538 |
abort:abortText |
|
539 |
ifFail:failBlock |
|
540 |
pattern:pattern |
|
541 |
fromDirectory:aDirectoryPath |
|
542 |
whenBoxCreatedEvaluate:boxCreatedCallback |
|
543 |
asLoadDialog:asLoadDialog |
|
5329 | 544 |
viewFiles:true |
4795 | 545 |
multipleSelect:true. |
3904 | 546 |
|
3996 | 547 |
enteredFileNames := instance currentSelectedFiles. |
3904 | 548 |
(enteredFileNames isEmpty or:[instance result isNil]) ifTrue:[ |
549 |
^ failBlock value |
|
550 |
]. |
|
551 |
lastDirectory := enteredFileNames first. |
|
552 |
lastDirectory := lastDirectory isFilename ifTrue:[lastDirectory directory] ifFalse:[lastDirectory]. |
|
553 |
FileSelectionBox lastFileSelectionDirectory:(lastDirectory directoryName). |
|
554 |
^ enteredFileNames |
|
555 |
||
556 |
" |
|
557 |
FileDialog |
|
558 |
requestFileNames:'enter a fileName:' |
|
559 |
default:'' |
|
560 |
ok:nil |
|
561 |
abort:nil |
|
562 |
ifFail:['none'] |
|
563 |
pattern:'*.conf' |
|
4627 | 564 |
fromDirectory:Filename currentDirectory pathName |
3956 | 565 |
whenBoxCreatedEvaluate:nil |
566 |
asLoadDialog:true. |
|
3904 | 567 |
" |
568 |
! |
|
569 |
||
5790 | 570 |
startApplicationFor:titleString default:initialDefaultFileNameArg ok:okTextArg abort:abortTextArg ifFail:failBlock pattern:pattern fromDirectory:aDirectoryPath whenBoxCreatedEvaluate:boxCreatedCallback asLoadDialog:asLoadDialog viewFiles:viewFiles multipleSelect:multipleSelect |
3904 | 571 |
"launch a Dialog, which allows user to enter a filename. |
572 |
The files presented initially are those in aDirectoryPathOrNil, or the |
|
573 |
last fileBox directory (default: current directory) (if a nil path is given). |
|
574 |
The box will show okText in its okButton, abortText in the abortButton. |
|
575 |
The matchPattern is set to pattern initially. |
|
576 |
Return the string, or nil if cancel was pressed |
|
577 |
The version argument allows validation of the files existance; |
|
578 |
it may be any of: |
|
579 |
#mustBeNew - fail (return empty string) if the file exists |
|
580 |
#new - confirm if the file exists |
|
581 |
#mustBeOld - fail if the file does not exist |
|
582 |
#old - confirm if the file does not exist |
|
583 |
#any (other) - no validation |
|
584 |
" |
|
585 |
||
586 |
||
5790 | 587 |
|defaultDir instance defaultFile okText abortText initialDefaultFileName| |
588 |
||
589 |
initialDefaultFileName := initialDefaultFileNameArg. |
|
590 |
initialDefaultFileName notNil ifTrue:[ |
|
591 |
initialDefaultFileName := initialDefaultFileName asFilename |
|
592 |
]. |
|
5163 | 593 |
|
594 |
okText := okTextArg. |
|
595 |
okText isNil ifTrue:[ okText := self resources string:'OK' ]. |
|
596 |
abortText := abortTextArg. |
|
597 |
abortText isNil ifTrue:[ abortText := self resources string:'Cancel' ]. |
|
3904 | 598 |
|
599 |
defaultDir := aDirectoryPath. |
|
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
600 |
"/ defaultDir isNil ifTrue:[ |
5790 | 601 |
"/ (initialDefaultFileName size > 0 and:[initialDefaultFileName exists]) ifTrue:[ |
602 |
"/ defaultDir := initialDefaultFileName asAbsoluteFilename directory. |
|
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
603 |
"/ ] ifFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
604 |
"/ defaultDir := FileSelectionBox lastFileSelectionDirectory. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
605 |
"/ defaultDir isNil ifTrue:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
606 |
"/ defaultDir := Filename currentDirectory asAbsoluteFilename. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
607 |
"/ ]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
608 |
"/ defaultDir asFilename exists ifFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
609 |
"/ defaultDir := nil |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
610 |
"/ ]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
611 |
"/ ] |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
612 |
"/ ]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
613 |
(initialDefaultFileName notNil |
5790 | 614 |
and:[initialDefaultFileName isAbsolute |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
615 |
and:[true "initialDefaultFileName asFilename exists"]]) ifTrue:[ |
5790 | 616 |
defaultDir := initialDefaultFileName asAbsoluteFilename. |
6953
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
617 |
true "viewFiles" ifTrue:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
618 |
defaultFile := defaultDir asAbsoluteFilename. |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
619 |
defaultDir := defaultDir directory. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
620 |
]. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
621 |
] ifFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
622 |
defaultDir isNil ifTrue:[ |
5193 | 623 |
defaultDir := FileSelectionBox lastFileSelectionDirectory. |
624 |
defaultDir isNil ifTrue:[ |
|
625 |
defaultDir := Filename currentDirectory asAbsoluteFilename. |
|
626 |
]. |
|
5188
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
627 |
defaultDir asFilename exists ifFalse:[ |
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
628 |
defaultDir := nil |
283a77f6efe2
care for non-existing initial dir.
Claus Gittinger <cg@exept.de>
parents:
5173
diff
changeset
|
629 |
]. |
3956 | 630 |
] |
3904 | 631 |
]. |
4206 | 632 |
defaultDir := defaultDir asFilename asAbsoluteFilename. |
5220
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
633 |
"/ [defaultDir exists] whileFalse:[ |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
634 |
"/ defaultDir := defaultDir directory. |
1de409e5ea52
initial text overwrites given directoryPath
Claus Gittinger <cg@exept.de>
parents:
5193
diff
changeset
|
635 |
"/ ]. |
5066
57de46852214
Do not select '/tmp/tmp' if '/tmp' is given as default directory
Stefan Vogel <sv@exept.de>
parents:
5062
diff
changeset
|
636 |
|
6953
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
637 |
defaultFile isNil ifTrue:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
638 |
viewFiles ifFalse:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
639 |
defaultFile := defaultDir asAbsoluteFilename. |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
640 |
] ifTrue:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
641 |
(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
|
642 |
defaultFile := defaultDir construct:initialDefaultFileName baseName. |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
643 |
] ifFalse:[ |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
644 |
defaultFile := defaultDir. |
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
645 |
]. |
3956 | 646 |
]. |
3904 | 647 |
]. |
3956 | 648 |
|
3904 | 649 |
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
|
650 |
defaultDir notNil ifTrue:[instance directory:defaultDir]. |
3958 | 651 |
instance multipleSelect:multipleSelect ? false. |
3904 | 652 |
instance startFilename:defaultFile. |
6482
00207f456339
isEmptyOrNil / notEmptyOrNil refactoring
Claus Gittinger <cg@exept.de>
parents:
6462
diff
changeset
|
653 |
instance pattern:((pattern isEmptyOrNil) ifTrue:['*'] ifFalse:[pattern]). |
3904 | 654 |
instance initialText:titleString. |
655 |
instance okLabelHolder value:okText. |
|
656 |
instance cancelLabelHolder value:abortText. |
|
5571
333ee892a087
thumbsUp/Down in confirm dialog
Claus Gittinger <cg@exept.de>
parents:
5375
diff
changeset
|
657 |
|
4804 | 658 |
instance beLoadDialog:asLoadDialog ? false. |
5329 | 659 |
instance viewFiles:viewFiles ? true. |
3953 | 660 |
self setDoubleClickActionFor:instance. |
3904 | 661 |
instance allButOpenInterface:#windowSpec. |
662 |
boxCreatedCallback notNil ifTrue:[boxCreatedCallback value:instance]. |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
663 |
|
8661
086147f751d0
AboutToOpenBoxNotificationSignal moved to SimpleView and now raised
Claus Gittinger <cg@exept.de>
parents:
8586
diff
changeset
|
664 |
"/ Dialog aboutToOpenBoxNotificationSignal raiseRequestWith:instance. |
7571 | 665 |
instance treeBrowser sortCaselessInTreeBrowser value: (Filename isCaseSensitive not). |
3904 | 666 |
instance openWindowModal. |
667 |
^ instance |
|
6953
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
668 |
|
651025031ea2
initial tree-selection when selecting a directory changed.
Claus Gittinger <cg@exept.de>
parents:
6728
diff
changeset
|
669 |
"Modified: / 23-08-2006 / 12:24:54 / cg" |
7571 | 670 |
"Modified: / 13-12-2006 / 16:25:42 / User" |
3892 | 671 |
! ! |
672 |
||
673 |
!FileDialog class methodsFor:'accessing'! |
|
674 |
||
6650 | 675 |
classResources |
9110 | 676 |
^ (FileBrowserV2 ? AbstractFileBrowser) classResources |
6650 | 677 |
! |
678 |
||
5931 | 679 |
lastExtent |
680 |
^ LastExtent |
|
681 |
! |
|
682 |
||
683 |
lastExtent:anExtent |
|
684 |
LastExtent := anExtent |
|
685 |
! |
|
686 |
||
3953 | 687 |
setDoubleClickActionFor:instance |
688 |
||
689 |
instance doubleClickAction:[:anIndex| |
|
690 |
| item | |
|
691 |
item := instance treeBrowser fileList at:anIndex ifAbsent:nil. |
|
692 |
item notNil ifTrue:[ |
|
5329 | 693 |
(instance viewFiles and:[item isDirectory not]) ifTrue:[ |
3953 | 694 |
instance doAccept. |
695 |
] |
|
696 |
] |
|
697 |
]. |
|
3892 | 698 |
! ! |
699 |
||
8585 | 700 |
!FileDialog class methodsFor:'help specs'! |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
701 |
|
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
702 |
flyByHelpSpec |
8585 | 703 |
"This resource specification was automatically generated |
704 |
by the UIHelpTool of ST/X." |
|
705 |
||
706 |
"Do not manually edit this!! If it is corrupted, |
|
707 |
the UIHelpTool may not be able to read the specification." |
|
708 |
||
709 |
" |
|
710 |
UIHelpTool openOnClass:FileDialog |
|
711 |
" |
|
712 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
713 |
<resource: #help> |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
714 |
|
8585 | 715 |
^ FileBrowserV2 flyByHelpSpec addPairsFrom:#( |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
716 |
|
8585 | 717 |
#openFileBrowser |
718 |
'Open a FileBrowser on the selected Directory' |
|
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
719 |
|
8585 | 720 |
) |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
721 |
! ! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
722 |
|
3892 | 723 |
!FileDialog class methodsFor:'interface specs'! |
724 |
||
725 |
windowSpec |
|
726 |
"This resource specification was automatically generated |
|
727 |
by the UIPainter of ST/X." |
|
728 |
||
729 |
"Do not manually edit this!! If it is corrupted, |
|
730 |
the UIPainter may not be able to read the specification." |
|
731 |
||
732 |
" |
|
733 |
UIPainter new openOnClass:FileDialog andSelector:#windowSpec |
|
734 |
FileDialog new openInterface:#windowSpec |
|
735 |
FileDialog open |
|
736 |
" |
|
737 |
||
738 |
<resource: #canvas> |
|
739 |
||
740 |
^ |
|
5229 | 741 |
#(FullSpec |
742 |
name: windowSpec |
|
743 |
window: |
|
744 |
(WindowSpec |
|
745 |
label: 'FileDialog' |
|
746 |
name: 'FileDialog' |
|
747 |
min: (Point 10 10) |
|
5873 | 748 |
bounds: (Rectangle 0 0 407 400) |
9113 | 749 |
menu: mainMenu |
750 |
performer: treeBrowser |
|
3892 | 751 |
) |
5229 | 752 |
component: |
753 |
(SpecCollection |
|
754 |
collection: ( |
|
755 |
(ViewSpec |
|
756 |
name: 'FilePart' |
|
757 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -32 1.0) |
|
758 |
component: |
|
759 |
(SpecCollection |
|
760 |
collection: ( |
|
761 |
(MenuPanelSpec |
|
762 |
name: 'ToolBar1' |
|
8250 | 763 |
layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 40 0) |
5229 | 764 |
tabable: true |
765 |
menu: toolBarMenu |
|
766 |
textDefault: true |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
767 |
) |
5229 | 768 |
(VariableHorizontalPanelSpec |
7919
6da8791c2e93
geometry (make underline visible); variable panel handle
fm
parents:
7581
diff
changeset
|
769 |
name: 'DeviceAndFilterPanel' |
8250 | 770 |
layout: (LayoutFrame 0 0 40 0 0 1 70 0) |
5229 | 771 |
level: 1 |
7919
6da8791c2e93
geometry (make underline visible); variable panel handle
fm
parents:
7581
diff
changeset
|
772 |
showHandle: true |
5229 | 773 |
component: |
774 |
(SpecCollection |
|
775 |
collection: ( |
|
776 |
(ViewSpec |
|
777 |
name: 'Box1' |
|
6065 | 778 |
component: |
779 |
(SpecCollection |
|
780 |
collection: ( |
|
781 |
(ComboListSpec |
|
782 |
name: 'ComboList1' |
|
7919
6da8791c2e93
geometry (make underline visible); variable panel handle
fm
parents:
7581
diff
changeset
|
783 |
layout: (LayoutFrame 1 0 1 0.0 -1 1 -1 1) |
6065 | 784 |
visibilityChannel: driveSelectorVisible |
785 |
model: selectedDeviceDrive |
|
786 |
comboList: listOfDeviceDrives |
|
787 |
useIndex: false |
|
788 |
hidePullDownMenuButton: false |
|
789 |
) |
|
790 |
) |
|
791 |
||
792 |
) |
|
4804 | 793 |
) |
5229 | 794 |
(ViewSpec |
795 |
name: 'Box2' |
|
796 |
component: |
|
797 |
(SpecCollection |
|
798 |
collection: ( |
|
799 |
(LabelSpec |
|
800 |
label: 'Filter:' |
|
801 |
name: 'FilterLabel' |
|
7919
6da8791c2e93
geometry (make underline visible); variable panel handle
fm
parents:
7581
diff
changeset
|
802 |
layout: (LayoutFrame 1 0 2 0 59 0 -2 1) |
5229 | 803 |
translateLabel: true |
804 |
adjust: right |
|
4804 | 805 |
) |
5229 | 806 |
(InputFieldSpec |
807 |
name: 'FilterEntryField' |
|
7919
6da8791c2e93
geometry (make underline visible); variable panel handle
fm
parents:
7581
diff
changeset
|
808 |
layout: (LayoutFrame 60 0 -27 1 -2 1 -2 1) |
5229 | 809 |
model: filterHolder |
810 |
immediateAccept: true |
|
811 |
acceptOnReturn: true |
|
812 |
acceptOnTab: true |
|
813 |
acceptOnLostFocus: true |
|
814 |
acceptOnPointerLeave: false |
|
815 |
postBuildCallback: postBuildFilterField: |
|
4804 | 816 |
) |
817 |
) |
|
818 |
||
819 |
) |
|
820 |
) |
|
821 |
) |
|
822 |
||
823 |
) |
|
9113 | 824 |
handles: (Any 0.2972972972973 1.0) |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
825 |
) |
8250 | 826 |
(SubCanvasSpec |
827 |
name: 'DirectoryTreeBrowser' |
|
828 |
layout: (LayoutFrame 0 0.0 70 0 0 1.0 -30 1) |
|
829 |
tabable: true |
|
830 |
hasHorizontalScrollBar: false |
|
831 |
hasVerticalScrollBar: false |
|
832 |
majorKey: DirectoryTreeBrowser |
|
833 |
subAspectHolders: |
|
834 |
(Array |
|
835 |
||
836 |
(SubChannelInfoSpec |
|
837 |
subAspect: filterModel |
|
838 |
aspect: filterHolder |
|
839 |
) |
|
840 |
(SubChannelInfoSpec |
|
841 |
subAspect: rootHolder |
|
842 |
aspect: rootDirectoryHolder |
|
843 |
) |
|
9113 | 844 |
|
9110 | 845 |
(SubChannelInfoSpec |
846 |
subAspect: showHiddenFiles |
|
847 |
aspect: showHiddenFiles |
|
9113 | 848 |
) |
8250 | 849 |
) |
850 |
createNewApplication: true |
|
851 |
createNewBuilder: true |
|
852 |
postBuildCallback: postBuildTreeBrowser: |
|
853 |
) |
|
5230 | 854 |
(LabelSpec |
855 |
label: 'Filename:' |
|
856 |
name: 'FilenameLabel' |
|
7919
6da8791c2e93
geometry (make underline visible); variable panel handle
fm
parents:
7581
diff
changeset
|
857 |
layout: (LayoutFrame 3 0 -25 1 73 0 -1 1) |
5230 | 858 |
translateLabel: true |
859 |
labelChannel: filenameLabelHolder |
|
860 |
adjust: left |
|
861 |
) |
|
862 |
(FilenameInputFieldSpec |
|
863 |
name: 'FilenameEntryField' |
|
7919
6da8791c2e93
geometry (make underline visible); variable panel handle
fm
parents:
7581
diff
changeset
|
864 |
layout: (LayoutFrame 70 0 -25 1 -4 1 -1 1) |
5230 | 865 |
tabable: true |
866 |
model: filenameHolder |
|
867 |
immediateAccept: false |
|
868 |
acceptOnPointerLeave: false |
|
5853 | 869 |
hasKeyboardFocusInitially: true |
5230 | 870 |
postBuildCallback: postBuildFileNameField: |
871 |
) |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
872 |
) |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
873 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
874 |
) |
3892 | 875 |
) |
5229 | 876 |
(HorizontalPanelViewSpec |
877 |
name: 'ButtonPanel' |
|
878 |
layout: (LayoutFrame 0 0.0 -32 1 0 1 0 1) |
|
879 |
visibilityChannel: buttonPanelVisibleHolder |
|
880 |
horizontalLayout: fitSpace |
|
881 |
verticalLayout: center |
|
882 |
horizontalSpace: 3 |
|
883 |
verticalSpace: 3 |
|
884 |
reverseOrderIfOKAtLeft: true |
|
885 |
component: |
|
886 |
(SpecCollection |
|
887 |
collection: ( |
|
888 |
(ActionButtonSpec |
|
889 |
label: 'Cancel' |
|
890 |
name: 'cancelButton' |
|
891 |
translateLabel: true |
|
892 |
labelChannel: cancelLabelHolder |
|
893 |
tabable: true |
|
894 |
model: doCancel |
|
5873 | 895 |
extent: (Point 131 22) |
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
896 |
) |
5229 | 897 |
(ActionButtonSpec |
898 |
label: 'Append' |
|
899 |
name: 'appendButton' |
|
900 |
visibilityChannel: appendButtonVisibleHolder |
|
901 |
translateLabel: true |
|
902 |
labelChannel: appendLabelHolder |
|
903 |
tabable: true |
|
904 |
model: appendPressed |
|
5873 | 905 |
extent: (Point 132 22) |
3892 | 906 |
) |
5229 | 907 |
(ActionButtonSpec |
908 |
label: 'OK' |
|
909 |
name: 'okButton' |
|
910 |
translateLabel: true |
|
911 |
labelChannel: okLabelHolder |
|
912 |
tabable: true |
|
913 |
model: okPressed |
|
914 |
isDefault: true |
|
5873 | 915 |
extent: (Point 132 22) |
3892 | 916 |
) |
917 |
) |
|
918 |
||
919 |
) |
|
920 |
) |
|
921 |
) |
|
922 |
||
923 |
) |
|
924 |
) |
|
925 |
! ! |
|
926 |
||
927 |
!FileDialog class methodsFor:'menu specs'! |
|
928 |
||
9113 | 929 |
mainMenu |
930 |
"This resource specification was automatically generated |
|
931 |
by the MenuEditor of ST/X." |
|
932 |
||
933 |
"Do not manually edit this!! If it is corrupted, |
|
934 |
the MenuEditor may not be able to read the specification." |
|
935 |
||
936 |
" |
|
937 |
MenuEditor new openOnClass:FileDialog andSelector:#mainMenu |
|
938 |
(Menu new fromLiteralArrayEncoding:(FileDialog mainMenu)) startUp |
|
939 |
" |
|
940 |
||
941 |
<resource: #menu> |
|
942 |
||
943 |
^ |
|
944 |
#(Menu |
|
945 |
( |
|
946 |
(MenuItem |
|
947 |
label: 'Directory' |
|
948 |
translateLabel: true |
|
949 |
submenu: |
|
950 |
(Menu |
|
951 |
( |
|
952 |
(MenuItem |
|
953 |
label: 'Up' |
|
954 |
itemValue: doGoDirectoryUp |
|
955 |
translateLabel: true |
|
956 |
) |
|
957 |
(MenuItem |
|
958 |
label: '-' |
|
959 |
) |
|
960 |
(MenuItem |
|
961 |
activeHelpKey: directoryBack |
|
962 |
enabled: enableBack |
|
963 |
label: 'Back' |
|
964 |
itemValue: doBack |
|
965 |
translateLabel: true |
|
966 |
) |
|
967 |
(MenuItem |
|
968 |
activeHelpKey: directoryBack |
|
969 |
enabled: enableForward |
|
970 |
label: 'Forward' |
|
971 |
itemValue: doForward |
|
972 |
translateLabel: true |
|
973 |
) |
|
974 |
(MenuItem |
|
975 |
label: '-' |
|
976 |
) |
|
977 |
(MenuItem |
|
978 |
enabled: enableHome |
|
979 |
label: 'Home Directory' |
|
980 |
itemValue: doGotoHomeDirectory |
|
981 |
translateLabel: true |
|
982 |
) |
|
983 |
(MenuItem |
|
984 |
label: 'Bookmarks' |
|
985 |
translateLabel: true |
|
986 |
submenuChannel: bookmarksMenu |
|
987 |
) |
|
988 |
(MenuItem |
|
989 |
label: 'Visited Directories' |
|
990 |
translateLabel: true |
|
991 |
submenuChannel: visitedDirectoriesMenu |
|
992 |
) |
|
993 |
) |
|
994 |
nil |
|
995 |
nil |
|
996 |
) |
|
997 |
) |
|
998 |
(MenuItem |
|
999 |
label: 'View' |
|
1000 |
translateLabel: true |
|
1001 |
submenu: |
|
1002 |
(Menu |
|
1003 |
( |
|
1004 |
(MenuItem |
|
1005 |
label: 'Sort' |
|
1006 |
translateLabel: true |
|
1007 |
submenuChannel: sortMenu |
|
1008 |
) |
|
1009 |
(MenuItem |
|
1010 |
label: 'Show' |
|
1011 |
translateLabel: true |
|
1012 |
submenuChannel: showMenuSpecForDialog |
|
1013 |
) |
|
1014 |
(MenuItem |
|
1015 |
label: '-' |
|
1016 |
) |
|
1017 |
(MenuItem |
|
1018 |
label: 'Update' |
|
1019 |
itemValue: updateCurrentDirectory |
|
1020 |
translateLabel: true |
|
1021 |
) |
|
1022 |
) |
|
1023 |
nil |
|
1024 |
nil |
|
1025 |
) |
|
1026 |
) |
|
1027 |
) |
|
1028 |
nil |
|
1029 |
nil |
|
1030 |
) |
|
1031 |
! |
|
1032 |
||
3892 | 1033 |
toolBarMenu |
1034 |
"This resource specification was automatically generated |
|
1035 |
by the MenuEditor of ST/X." |
|
1036 |
||
1037 |
"Do not manually edit this!! If it is corrupted, |
|
1038 |
the MenuEditor may not be able to read the specification." |
|
1039 |
||
1040 |
" |
|
1041 |
MenuEditor new openOnClass:FileDialog andSelector:#toolBarMenu |
|
1042 |
(Menu new fromLiteralArrayEncoding:(FileDialog toolBarMenu)) startUp |
|
1043 |
" |
|
1044 |
||
1045 |
<resource: #menu> |
|
1046 |
||
1047 |
^ |
|
5873 | 1048 |
#(Menu |
1049 |
( |
|
1050 |
(MenuItem |
|
1051 |
activeHelpKey: directoryBack |
|
1052 |
enabled: enableBack |
|
1053 |
label: 'Back' |
|
1054 |
itemValue: doBack |
|
1055 |
translateLabel: true |
|
1056 |
isButton: true |
|
1057 |
submenuChannel: menuDirHistoryBack |
|
6087 | 1058 |
labelImage: (ResourceRetriever AbstractFileBrowser historyBackIcon) |
5873 | 1059 |
keepLinkedMenu: true |
3892 | 1060 |
) |
5873 | 1061 |
(MenuItem |
1062 |
label: '' |
|
3892 | 1063 |
) |
5873 | 1064 |
(MenuItem |
1065 |
activeHelpKey: directoryForward |
|
1066 |
enabled: enableForward |
|
1067 |
label: 'Forward' |
|
1068 |
itemValue: doForward |
|
1069 |
translateLabel: true |
|
1070 |
isButton: true |
|
1071 |
submenuChannel: menuDirHistoryForward |
|
6087 | 1072 |
labelImage: (ResourceRetriever AbstractFileBrowser historyForwardIcon) |
5873 | 1073 |
keepLinkedMenu: true |
3892 | 1074 |
) |
5873 | 1075 |
(MenuItem |
6462 | 1076 |
label: '-' |
1077 |
) |
|
1078 |
(MenuItem |
|
1079 |
activeHelpKey: directoryUp |
|
1080 |
enabled: enableDirectoryUp |
|
1081 |
label: 'DirectoryUp' |
|
1082 |
itemValue: doGoDirectoryUp |
|
1083 |
translateLabel: true |
|
1084 |
isButton: true |
|
1085 |
labelImage: (ResourceRetriever AbstractFileBrowser directoryUpIcon) |
|
3892 | 1086 |
) |
5873 | 1087 |
(MenuItem |
1088 |
activeHelpKey: fileHome |
|
1089 |
enabled: enableHome |
|
1090 |
label: 'Home' |
|
1091 |
itemValue: doGotoHomeDirectory |
|
1092 |
translateLabel: true |
|
1093 |
isButton: true |
|
6096 | 1094 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon) |
3892 | 1095 |
) |
5873 | 1096 |
(MenuItem |
8092 | 1097 |
activeHelpKey: fileDesktop |
8586 | 1098 |
enabled: enableGotoDesktop |
8092 | 1099 |
label: 'Desktop' |
1100 |
itemValue: doGotoDesktopDirectory |
|
1101 |
translateLabel: true |
|
1102 |
isButton: true |
|
1103 |
labelImage: (ResourceRetriever ToolbarIconLibrary desktopIcon) |
|
1104 |
) |
|
1105 |
(MenuItem |
|
6098 | 1106 |
activeHelpKey: fileGotoBookmark |
1107 |
label: 'Bookmarks' |
|
1108 |
translateLabel: true |
|
1109 |
isButton: true |
|
9113 | 1110 |
submenuChannel: gotoBookmarksMenu |
6098 | 1111 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryBookmarksIcon) |
1112 |
) |
|
1113 |
(MenuItem |
|
5873 | 1114 |
label: '-' |
1115 |
isVisible: newDirectoryVisibilityHolder |
|
3923 | 1116 |
) |
5873 | 1117 |
(MenuItem |
6122 | 1118 |
label: 'New Directory...' |
5873 | 1119 |
itemValue: newDirectory |
1120 |
translateLabel: true |
|
1121 |
isButton: true |
|
1122 |
isVisible: newDirectoryVisibilityHolder |
|
6088 | 1123 |
labelImage: (ResourceRetriever AbstractFileBrowser newDirectoryIcon) |
3923 | 1124 |
) |
8585 | 1125 |
(MenuItem |
1126 |
label: '-' |
|
1127 |
isVisible: browseVisibleHolder |
|
1128 |
) |
|
1129 |
(MenuItem |
|
1130 |
activeHelpKey: openFileBrowser |
|
1131 |
label: 'Browse' |
|
1132 |
itemValue: doBrowseDirectory |
|
1133 |
translateLabel: true |
|
1134 |
isButton: true |
|
1135 |
isVisible: browseVisibleHolder |
|
1136 |
labelImage: (ResourceRetriever ToolbarIconLibrary startFileBrowserIcon) |
|
1137 |
) |
|
3892 | 1138 |
) |
1139 |
nil |
|
1140 |
nil |
|
1141 |
) |
|
9113 | 1142 |
! |
1143 |
||
1144 |
viewInContentsBrowserMenu |
|
1145 |
^ DirectoryContentsBrowser showMenuSpec |
|
3892 | 1146 |
! ! |
1147 |
||
8182 | 1148 |
!FileDialog class methodsFor:'plugIn spec'! |
1149 |
||
1150 |
aspectSelectors |
|
1151 |
"This resource specification was automatically generated |
|
1152 |
by the UIPainter of ST/X." |
|
1153 |
||
1154 |
"Do not manually edit this. If it is corrupted, |
|
1155 |
the UIPainter may not be able to read the specification." |
|
1156 |
||
1157 |
"Return a description of exported aspects; |
|
1158 |
these can be connected to aspects of an embedding application |
|
1159 |
(if this app is embedded in a subCanvas)." |
|
1160 |
||
1161 |
^ #( |
|
1162 |
#filenameHolder |
|
1163 |
#filterHolder |
|
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1164 |
#rootDirectoryHolder |
8182 | 1165 |
). |
1166 |
||
1167 |
! ! |
|
1168 |
||
3892 | 1169 |
!FileDialog methodsFor:'accessing'! |
1170 |
||
3996 | 1171 |
currentSelectedFiles |
1172 |
||
1173 |
| selectedFiles| |
|
1174 |
||
1175 |
selectedFiles := treeBrowser currentFileNameHolder value. |
|
1176 |
^ selectedFiles select:[:aFile| aFile isDirectory not]. |
|
1177 |
! |
|
1178 |
||
3892 | 1179 |
directory |
1180 |
"return the value of the instance variable 'directory' (automatically generated)" |
|
1181 |
||
1182 |
^ directory |
|
1183 |
! |
|
1184 |
||
1185 |
directory:something |
|
1186 |
"set the value of the instance variable 'directory' (automatically generated)" |
|
1187 |
||
1188 |
directory := something. |
|
1189 |
! |
|
1190 |
||
1191 |
initialText |
|
1192 |
||
5598 | 1193 |
initialText isNil ifTrue:[ |
1194 |
^ resources string:'File Dialog'. |
|
1195 |
]. |
|
1196 |
^ resources string:initialText |
|
3892 | 1197 |
! |
1198 |
||
1199 |
initialText:something |
|
1200 |
"set the value of the instance variable 'initialText' (automatically generated)" |
|
1201 |
||
1202 |
initialText := something. |
|
1203 |
! |
|
1204 |
||
1205 |
pattern |
|
1206 |
"return the value of the instance variable 'pattern' (automatically generated)" |
|
1207 |
||
1208 |
^ pattern |
|
1209 |
! |
|
1210 |
||
1211 |
pattern:something |
|
1212 |
"set the value of the instance variable 'pattern' (automatically generated)" |
|
1213 |
||
1214 |
pattern := something. |
|
1215 |
! |
|
1216 |
||
1217 |
result |
|
1218 |
"return the value of the instance variable 'result' (automatically generated)" |
|
1219 |
||
1220 |
^ result |
|
1221 |
! |
|
1222 |
||
1223 |
result:something |
|
1224 |
"set the value of the instance variable 'result' (automatically generated)" |
|
1225 |
||
1226 |
result := something. |
|
1227 |
! |
|
1228 |
||
3904 | 1229 |
selectedDirectories |
1230 |
||
1231 |
| selectedFiles| |
|
1232 |
||
1233 |
selectedFiles := treeBrowser currentFileNameHolder value. |
|
1234 |
^ selectedFiles select:[:aFile| aFile isDirectory]. |
|
1235 |
! |
|
1236 |
||
3892 | 1237 |
startFilename |
1238 |
"return the value of the instance variable 'startFilename' (automatically generated)" |
|
1239 |
||
1240 |
startFilename isNil ifTrue:[ |
|
1241 |
startFilename := Filename currentDirectory asAbsoluteFilename. |
|
1242 |
]. |
|
1243 |
^ startFilename |
|
1244 |
! |
|
1245 |
||
1246 |
startFilename:something |
|
1247 |
"set the value of the instance variable 'startFilename' (automatically generated)" |
|
1248 |
||
1249 |
startFilename := something. |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1250 |
! ! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1251 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1252 |
!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
|
1253 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1254 |
asLoadDialog |
4804 | 1255 |
^ self isLoadDialog |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1256 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1257 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1258 |
asLoadDialog:aBoolean |
4804 | 1259 |
self beLoadDialog:aBoolean |
1260 |
! |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1261 |
|
4804 | 1262 |
beLoadDialog:aBoolean |
1263 |
||
1264 |
isLoadDialog := aBoolean |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1265 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1266 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1267 |
doubleClickAction |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1268 |
"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
|
1269 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1270 |
^ doubleClickAction |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1271 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1272 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1273 |
doubleClickAction:something |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1274 |
"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
|
1275 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1276 |
doubleClickAction := something. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1277 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1278 |
|
4804 | 1279 |
isLoadDialog |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1280 |
|
4804 | 1281 |
^ isLoadDialog ? true |
1282 |
! |
|
1283 |
||
1284 |
multipleSelect |
|
1285 |
^ multipleSelect ? false |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1286 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1287 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1288 |
multipleSelect:aBoolean |
4804 | 1289 |
multipleSelect := aBoolean. |
1290 |
treeBrowser notNil ifTrue:[ |
|
1291 |
treeBrowser multipleSelect:aBoolean. |
|
1292 |
]. |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1293 |
! ! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1294 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1295 |
!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
|
1296 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1297 |
addButton:aButton |
6068 | 1298 |
|buttonPanel okButton| |
1299 |
||
1300 |
buttonPanel := self componentAt:#ButtonPanel. |
|
1301 |
okButton := self okButton. |
|
1302 |
||
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1303 |
DialogBox defaultOKButtonAtLeft ifTrue:[ |
6068 | 1304 |
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
|
1305 |
] ifFalse:[ |
6068 | 1306 |
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
|
1307 |
]. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1308 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1309 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1310 |
okButton |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1311 |
^ (self componentAt:#okButton) |
3892 | 1312 |
! |
1313 |
||
3904 | 1314 |
treeBrowser |
1315 |
"return the value of the instance variable 'treeBrowser' (automatically generated)" |
|
1316 |
||
1317 |
^ treeBrowser |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1318 |
! ! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1319 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1320 |
!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
|
1321 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1322 |
hideButtonPanel |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1323 |
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
|
1324 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1325 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1326 |
newDirectoryVisibilityHolder |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1327 |
newDirectoryVisibilityHolder isNil ifTrue:[ |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1328 |
newDirectoryVisibilityHolder := true asValue. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1329 |
]. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1330 |
^ newDirectoryVisibilityHolder |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1331 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1332 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1333 |
showButtonPanel |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1334 |
self buttonPanelVisibleHolder value:true |
3904 | 1335 |
! |
1336 |
||
3892 | 1337 |
viewFiles |
1338 |
"return the value of the instance variable 'viewFiles' (automatically generated)" |
|
1339 |
||
1340 |
^ viewFiles |
|
1341 |
! |
|
1342 |
||
1343 |
viewFiles:something |
|
1344 |
"set the value of the instance variable 'viewFiles' (automatically generated)" |
|
1345 |
||
1346 |
viewFiles := something. |
|
1347 |
! ! |
|
1348 |
||
1349 |
!FileDialog methodsFor:'aspects'! |
|
1350 |
||
4603
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1351 |
appendButtonVisibleHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1352 |
appendButtonVisibleHolder isNil ifTrue:[ |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1353 |
appendButtonVisibleHolder := false asValue. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1354 |
]. |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1355 |
^ appendButtonVisibleHolder |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1356 |
! |
49cca8deebde
support an additional "append" button
Claus Gittinger <cg@exept.de>
parents:
4562
diff
changeset
|
1357 |
|
5193 | 1358 |
appendLabelHolder |
1359 |
appendLabelHolder isNil ifTrue:[ |
|
1360 |
appendLabelHolder := 'Append' asValue. |
|
1361 |
]. |
|
1362 |
^ appendLabelHolder |
|
1363 |
! |
|
1364 |
||
4804 | 1365 |
aspectOrNil:aKey forSubApplication:aSubApp |
1366 |
"this hook provides an aspect for a subApp" |
|
1367 |
||
1368 |
aKey == #currentFileNameHolder ifTrue:[ |
|
1369 |
directory notNil ifTrue:[ |
|
1370 |
^ (OrderedCollection with:directory) asValue |
|
1371 |
] |
|
1372 |
]. |
|
1373 |
^ nil |
|
1374 |
! |
|
1375 |
||
5969 | 1376 |
browseVisibleHolder |
1377 |
browseVisibleHolder isNil ifTrue:[ |
|
8585 | 1378 |
browseVisibleHolder := true "false" asValue. |
5969 | 1379 |
]. |
1380 |
^ browseVisibleHolder. |
|
1381 |
! |
|
1382 |
||
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1383 |
buttonPanelVisibleHolder |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1384 |
buttonPanelVisibleHolder isNil ifTrue:[ |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1385 |
buttonPanelVisibleHolder := true asValue. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1386 |
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
|
1387 |
]. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1388 |
^ buttonPanelVisibleHolder. |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1389 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1390 |
|
3892 | 1391 |
cancelLabelHolder |
1392 |
||
1393 |
cancelLabelHolder isNil ifTrue:[ |
|
1394 |
cancelLabelHolder := 'Cancel' asValue. |
|
1395 |
]. |
|
1396 |
^ cancelLabelHolder. |
|
1397 |
! |
|
1398 |
||
1399 |
enableBack |
|
4804 | 1400 |
^ treeBrowser enableBack. |
3892 | 1401 |
! |
1402 |
||
1403 |
enableDirectoryUp |
|
4804 | 1404 |
^ treeBrowser enableDirectoryUp. |
3892 | 1405 |
! |
1406 |
||
1407 |
enableForward |
|
4804 | 1408 |
^ treeBrowser enableForward. |
3892 | 1409 |
! |
1410 |
||
8169 | 1411 |
enableGotoDesktop |
1412 |
^ treeBrowser enableGotoDesktop. |
|
1413 |
! |
|
1414 |
||
3892 | 1415 |
enableHome |
4804 | 1416 |
^ treeBrowser enableHome. |
3892 | 1417 |
! |
1418 |
||
9269
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1419 |
fileEntryFieldHolder |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1420 |
"for directoryTreeBrowser" |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1421 |
|
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1422 |
^ self filenameHolder |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1423 |
! |
4d09efee3752
added: #fileEntryFieldHolder
Claus Gittinger <cg@exept.de>
parents:
9113
diff
changeset
|
1424 |
|
3892 | 1425 |
filenameHolder |
1426 |
"Return a value holder with the filename. |
|
1427 |
Shown in the filename input-field. |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1428 |
Being the selection in the tree." |
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1429 |
|
3892 | 1430 |
|holder| |
7581 | 1431 |
|
3892 | 1432 |
holder := builder bindingAt:#filenameHolder. |
1433 |
||
7581 | 1434 |
holder isNil ifTrue:[ |
3892 | 1435 |
holder := ValueHolder new. |
1436 |
holder addDependent:self. |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1437 |
builder aspectAt:#filenameHolder put:holder. |
3892 | 1438 |
]. |
1439 |
||
1440 |
^ holder. |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1441 |
|
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1442 |
"Modified: / 09-07-2010 / 19:25:15 / cg" |
3892 | 1443 |
! |
1444 |
||
8183 | 1445 |
filenameHolder:aHolder |
8182 | 1446 |
"needed when used as subcanvas" |
8183 | 1447 |
|
1448 |
|holder| |
|
8182 | 1449 |
|
8183 | 1450 |
holder := builder aspectAt:#filenameHolder. |
1451 |
holder notNil ifTrue:[ |
|
1452 |
holder removeDependent:self |
|
1453 |
]. |
|
8182 | 1454 |
builder aspectAt:#filenameHolder put:aHolder. |
8183 | 1455 |
aHolder addDependent:self |
8182 | 1456 |
! |
1457 |
||
3904 | 1458 |
filenameLabelHolder |
1459 |
"Return a value holder for the input string. |
|
1460 |
" |
|
1461 |
filenameLabelHolder isNil ifTrue:[ |
|
1462 |
filenameLabelHolder := 'Filename:' asValue. |
|
1463 |
]. |
|
1464 |
^ filenameLabelHolder |
|
1465 |
! |
|
1466 |
||
3892 | 1467 |
filterHolder |
8183 | 1468 |
"Return a value holder for filter" |
3892 | 1469 |
|
1470 |
filterHolder isNil ifTrue:[ |
|
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1471 |
filterHolder := (self pattern ? '*') asValue. |
3892 | 1472 |
]. |
1473 |
^ filterHolder |
|
1474 |
! |
|
1475 |
||
8183 | 1476 |
filterHolder:aHolder |
1477 |
"needed when used as subcanvas" |
|
1478 |
||
1479 |
filterHolder := aHolder. |
|
1480 |
! |
|
1481 |
||
9113 | 1482 |
gotoBookmarksMenu |
6098 | 1483 |
<resource: #programMenu> |
1484 |
||
9113 | 1485 |
^ treeBrowser gotoBookmarksMenu |
7567
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1486 |
"/ |menu bookmarks| |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1487 |
"/ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1488 |
"/ menu := treeBrowser class emptyMenuSpec decodeAsLiteralArray. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1489 |
"/ menu findGuiResourcesIn:self. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1490 |
"/ menu receiver:self. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1491 |
"/ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1492 |
"/ "/ add the bookmark items ... |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1493 |
"/ bookmarks := treeBrowser class directoryBookmarks. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1494 |
"/ bookmarks notEmptyOrNil ifTrue:[ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1495 |
"/ bookmarks do:[:dirName | |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1496 |
"/ menu addItem:((MenuItem label:dirName asString value:[ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1497 |
"/ (treeBrowser currentSelectedDirectories includes:dirName) ifFalse:[ |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1498 |
"/ treeBrowser setCurrentFileName:dirName. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1499 |
"/ ]. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1500 |
"/ ])). |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1501 |
"/ ]. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1502 |
"/ ]. |
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1503 |
"/ ^ menu |
6098 | 1504 |
|
7567
9896e794a220
share the bookmarks-menu with the fileBrowser.
Claus Gittinger <cg@exept.de>
parents:
6953
diff
changeset
|
1505 |
"Modified: / 06-12-2006 / 12:05:06 / cg" |
6098 | 1506 |
! |
1507 |
||
6065 | 1508 |
listOfDeviceDrives |
1509 |
||
1510 |
listOfDeviceDrives isNil ifTrue:[ |
|
1511 |
listOfDeviceDrives := Filename volumes. |
|
1512 |
]. |
|
1513 |
^ listOfDeviceDrives |
|
1514 |
! |
|
1515 |
||
3892 | 1516 |
okLabelHolder |
1517 |
"automatically generated by UIPainter ..." |
|
1518 |
||
1519 |
"*** the code below creates a default model when invoked." |
|
1520 |
"*** (which may not be the one you wanted)" |
|
1521 |
"*** Please change as required and accept it in the browser." |
|
1522 |
"*** (and replace this comment by something more useful ;-)" |
|
1523 |
||
1524 |
okLabelHolder isNil ifTrue:[ |
|
1525 |
okLabelHolder := 'OK' asValue. |
|
1526 |
]. |
|
1527 |
^ okLabelHolder. |
|
6065 | 1528 |
! |
1529 |
||
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1530 |
rootDirectoryHolder |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1531 |
"Return a value holder for filter" |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1532 |
|
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1533 |
rootDirectoryHolder isNil ifTrue:[ |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1534 |
rootDirectoryHolder := self initialRootDirectory asValue. |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1535 |
]. |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1536 |
^ rootDirectoryHolder |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1537 |
! |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1538 |
|
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1539 |
rootDirectoryHolder:aHolder |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1540 |
"Return a value holder for filter" |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1541 |
|
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1542 |
rootDirectoryHolder := aHolder. |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1543 |
! |
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1544 |
|
6065 | 1545 |
selectedDeviceDrive |
1546 |
||
1547 |
selectedDeviceDrive isNil ifTrue:[ |
|
1548 |
selectedDeviceDrive := self listOfDeviceDrives first asValue. |
|
1549 |
selectedDeviceDrive addDependent:self. |
|
1550 |
]. |
|
1551 |
^ selectedDeviceDrive |
|
9110 | 1552 |
! |
1553 |
||
9113 | 1554 |
showDirectoryTree |
1555 |
^ false |
|
1556 |
! |
|
1557 |
||
1558 |
showDiskUsageHolder |
|
1559 |
^ treeBrowser showDiskUsageHolder |
|
1560 |
! |
|
1561 |
||
9110 | 1562 |
showHiddenFiles |
9113 | 1563 |
^ treeBrowser showHiddenFiles |
1564 |
! |
|
1565 |
||
1566 |
shownFiles |
|
1567 |
^ treeBrowser shownFiles |
|
1568 |
! |
|
1569 |
||
1570 |
sortCaselessInTreeBrowser |
|
1571 |
^ treeBrowser sortCaselessInTreeBrowser |
|
1572 |
! |
|
1573 |
||
1574 |
sortInTreeVisibilityHolder |
|
1575 |
^ true |
|
1576 |
! |
|
1577 |
||
1578 |
sortPropertyInTree |
|
1579 |
^ treeBrowser sortBlockProperty |
|
1580 |
! |
|
1581 |
||
1582 |
viewDirsInContentsBrowser |
|
1583 |
^ false |
|
1584 |
! |
|
1585 |
||
1586 |
viewFilesInDirectoryTree |
|
1587 |
^ false |
|
1588 |
! |
|
1589 |
||
1590 |
viewNoteBookApplicationHolder |
|
9110 | 1591 |
^ false |
3892 | 1592 |
! ! |
1593 |
||
1594 |
!FileDialog methodsFor:'change & update'! |
|
1595 |
||
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1596 |
buttonPanelVisibilityChanged |
5598 | 1597 |
|filePart| |
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1598 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1599 |
filePart := builder componentAt:#FilePart. |
5598 | 1600 |
filePart notNil ifTrue:[ |
1601 |
buttonPanelVisibleHolder value ifTrue:[ |
|
1602 |
filePart layout bottomOffset:-40 |
|
1603 |
] ifFalse:[ |
|
1604 |
filePart layout bottomOffset:0 |
|
1605 |
]. |
|
1606 |
filePart containerChangedSize "/ force resize |
|
1607 |
] |
|
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1608 |
! |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1609 |
|
9765 | 1610 |
fileSelectionChanged |
1611 |
|files newFile entryFieldFilename filenameHolder| |
|
1612 |
||
1613 |
filenameHolder := self filenameHolder. |
|
1614 |
||
1615 |
files := treeBrowser currentFileNameHolder value. |
|
1616 |
||
1617 |
(files isEmpty) ifTrue:[ |
|
1618 |
newFile := nil. |
|
1619 |
] ifFalse:[ |
|
1620 |
files size == 1 ifTrue:[ |
|
1621 |
newFile := files first. |
|
1622 |
] ifFalse:[ |
|
1623 |
newFile := ''. |
|
1624 |
]. |
|
1625 |
]. |
|
1626 |
(filenameHolder value notNil |
|
1627 |
and:[newFile notNil |
|
1628 |
and:[newFile asFilename isDirectory]]) ifTrue:[ |
|
1629 |
entryFieldFilename := filenameHolder value asFilename. |
|
1630 |
self startFilename asFilename baseName = entryFieldFilename baseName ifTrue:[ |
|
1631 |
entryFieldFilename isDirectory ifFalse:[ |
|
1632 |
newFile := newFile asFilename construct:entryFieldFilename baseName. |
|
1633 |
]. |
|
1634 |
]. |
|
1635 |
]. |
|
1636 |
filenameHolder value:newFile withoutNotifying:self. |
|
1637 |
OperatingSystem supportsVolumes ifTrue:[ |
|
1638 |
| volume | |
|
1639 |
volume := (files size >= 1) |
|
1640 |
ifTrue:[files first volume] |
|
1641 |
ifFalse:nil. |
|
1642 |
self selectedDeviceDrive value:volume. |
|
1643 |
]. |
|
1644 |
||
1645 |
"Created: / 14-02-2011 / 17:54:08 / cg" |
|
1646 |
! |
|
1647 |
||
6065 | 1648 |
selectedDeviceDriveChanged |
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1649 |
|newDrive curSel newFile| |
6065 | 1650 |
|
1651 |
newDrive := self selectedDeviceDrive value. |
|
1652 |
curSel := treeBrowser currentFileNameHolder value. |
|
1653 |
curSel notEmpty ifTrue:[ |
|
1654 |
curSel first volume = newDrive ifTrue:[ ^self]. |
|
1655 |
]. |
|
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1656 |
|
6065 | 1657 |
newDrive notNil ifTrue:[ |
1658 |
newFile := newDrive asFilename. |
|
1659 |
newFile isReadable ifTrue:[ |
|
1660 |
treeBrowser gotoFile:newFile. |
|
1661 |
^self. |
|
1662 |
]. |
|
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1663 |
self warn:'Cannot open drive %1' with:newFile asFilename volume. |
6065 | 1664 |
]. |
9683
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1665 |
|
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1666 |
newDrive := curSel notEmpty ifTrue:[ curSel first volume ] ifFalse:[ 'C:' ]. |
83fb945b7a5a
changed: #selectedDeviceDriveChanged
Claus Gittinger <cg@exept.de>
parents:
9678
diff
changeset
|
1667 |
self selectedDeviceDrive value:newDrive. |
6065 | 1668 |
! |
1669 |
||
3892 | 1670 |
update:something with:aParameter from:changedObject |
9765 | 1671 |
|newLabel fn| |
3892 | 1672 |
|
1673 |
changedObject == treeBrowser currentFileNameHolder ifTrue:[ |
|
9765 | 1674 |
self fileSelectionChanged. |
1675 |
^ self. |
|
3892 | 1676 |
]. |
4804 | 1677 |
|
6065 | 1678 |
changedObject == self selectedDeviceDrive ifTrue:[ |
1679 |
self selectedDeviceDriveChanged. |
|
1680 |
^ self. |
|
1681 |
]. |
|
3904 | 1682 |
changedObject == treeBrowser viewFilesInDirectoryTree ifTrue:[ |
1683 |
changedObject value ifTrue:[ |
|
4804 | 1684 |
newLabel := 'Filename:'. |
3904 | 1685 |
] ifFalse:[ |
4804 | 1686 |
newLabel := 'Directory:'. |
1687 |
]. |
|
1688 |
self filenameLabelHolder value:(resources string:newLabel) |
|
3904 | 1689 |
]. |
9765 | 1690 |
changedObject == self filenameHolder ifTrue:[ |
4804 | 1691 |
fn := changedObject value asFilename. |
1692 |
(fn exists) ifFalse:[^ self]. |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1693 |
treeBrowser currentFileNameHolder |
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1694 |
value:(OrderedCollection with:fn) withoutNotifying:self. |
5949 | 1695 |
fn isDirectory ifTrue:[ |
1696 |
treeBrowser expandEnforceSelectedItems. |
|
1697 |
]. |
|
3892 | 1698 |
]. |
1699 |
^ super update:something with:aParameter from:changedObject |
|
9514
c818ca8969f7
comment/format in: #filenameHolder
Claus Gittinger <cg@exept.de>
parents:
9476
diff
changeset
|
1700 |
|
9765 | 1701 |
"Modified: / 14-02-2011 / 17:54:35 / cg" |
3892 | 1702 |
! ! |
1703 |
||
1704 |
!FileDialog methodsFor:'event handling'! |
|
1705 |
||
4728
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1706 |
appendWasPressed |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1707 |
"valid after the dialog has been closed: true if append was pressed" |
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1708 |
|
545cd2c65dfa
hooks to allow use as component in a non-modal subcanvas
Claus Gittinger <cg@exept.de>
parents:
4666
diff
changeset
|
1709 |
^ appendWasPressed |
3892 | 1710 |
! ! |
1711 |
||
1712 |
!FileDialog methodsFor:'initialization & release'! |
|
1713 |
||
5932 | 1714 |
closeDownViews |
9765 | 1715 |
self rememberExtent. |
5932 | 1716 |
super closeDownViews. |
9765 | 1717 |
|
1718 |
"Modified: / 14-02-2011 / 17:55:14 / cg" |
|
5932 | 1719 |
! |
1720 |
||
1721 |
closeWindow |
|
9765 | 1722 |
self rememberExtent. |
5932 | 1723 |
super closeWindow. |
9765 | 1724 |
|
1725 |
"Modified: / 14-02-2011 / 17:55:55 / cg" |
|
5932 | 1726 |
! |
1727 |
||
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1728 |
commonPostOpen |
8182 | 1729 |
|selection| |
3892 | 1730 |
|
1731 |
"/ 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
|
1732 |
|
3892 | 1733 |
treeBrowser currentFileNameHolder addDependent:self. |
5598 | 1734 |
treeBrowser doubleClickAction:self doubleClickAction. |
3904 | 1735 |
treeBrowser viewFilesInDirectoryTree addDependent:self. |
5863
e31e066a41d9
root is one up (showing containing directory)
Claus Gittinger <cg@exept.de>
parents:
5858
diff
changeset
|
1736 |
|
6409 | 1737 |
treeBrowser rootHolder value:(self initialRootDirectory). |
4804 | 1738 |
treeBrowser viewFilesInDirectoryTree setValue:(self viewFiles ? true). |
4796 | 1739 |
treeBrowser viewFilesInDirectoryTree changed. |
4804 | 1740 |
|
1741 |
self isLoadDialog ifTrue:[ |
|
4796 | 1742 |
treeBrowser newVisibilityHolder value:false. |
1743 |
treeBrowser allowFileOperations value:false. |
|
1744 |
self newDirectoryVisibilityHolder value:false. |
|
1745 |
]. |
|
5927 | 1746 |
treeBrowser expandEnforceSelectedItems. |
5929 | 1747 |
|
1748 |
selection := treeBrowser treeSelectionHolder value. |
|
1749 |
selection notEmptyOrNil ifTrue:[ |
|
5930 | 1750 |
selection := selection asCollection first. |
5929 | 1751 |
selection enforcedExpand. |
1752 |
treeBrowser browser makeItemVisible:selection withMinimumLines:5. |
|
1753 |
]. |
|
4796 | 1754 |
! |
1755 |
||
6409 | 1756 |
initialRootDirectory |
1757 |
"returns the directory the browser is open on |
|
1758 |
" |
|
1759 |
|root| |
|
1760 |
||
9678 | 1761 |
initialRoot isNil ifTrue:[ |
6409 | 1762 |
|
9678 | 1763 |
(root := self directory) notNil ifTrue:[ |
1764 |
root := root asFilename. |
|
6409 | 1765 |
|
1766 |
root isDirectory ifFalse:[ |
|
9678 | 1767 |
root := root directory. |
1768 |
root isDirectory ifFalse:[ |
|
1769 |
root := nil. |
|
1770 |
] |
|
6409 | 1771 |
] |
9678 | 1772 |
]. |
1773 |
root isNil ifTrue:[ |
|
1774 |
root := Filename currentDirectory. |
|
1775 |
]. |
|
1776 |
initialRoot := root asAbsoluteFilename. |
|
6409 | 1777 |
]. |
9678 | 1778 |
^ initialRoot |
1779 |
||
1780 |
"Modified: / 27-12-2010 / 09:56:30 / cg" |
|
6409 | 1781 |
! |
1782 |
||
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1783 |
postBuildFileNameField:aWidget |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1784 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1785 |
filenameField := aWidget. |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1786 |
! |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1787 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1788 |
postBuildFilterField:aWidget |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1789 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1790 |
filterField := aWidget. |
4796 | 1791 |
! |
1792 |
||
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1793 |
postBuildTreeBrowser:aSubCanvasView |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1794 |
treeBrowser := aSubCanvasView client. |
6409 | 1795 |
treeBrowser rootHolder value:(self initialRootDirectory value). |
9113 | 1796 |
treeBrowser sortPropertyInTree:(treeBrowser sortBlockProperty). |
9553 | 1797 |
treeBrowser showHiddenFiles value:true. |
1798 |
||
1799 |
"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
|
1800 |
! |
4796 | 1801 |
|
5903
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1802 |
postBuildWith:aBuilder |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1803 |
treeBrowser multipleSelect:multipleSelect. |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1804 |
appendWasPressed := false. |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1805 |
|
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1806 |
(aBuilder componentAt:'cancelButton') cursor:(Cursor thumbsDown). |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1807 |
(aBuilder componentAt:'appendButton') cursor:(Cursor thumbsUp). |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1808 |
(aBuilder componentAt:'okButton') cursor:(Cursor thumbsUp). |
0c2fdcd6babf
make use of commonPostOpen in AppModel
Claus Gittinger <cg@exept.de>
parents:
5873
diff
changeset
|
1809 |
|
6632 | 1810 |
super postBuildWith:aBuilder |
5932 | 1811 |
! |
1812 |
||
8182 | 1813 |
postOpenAsSubcanvasWith:aBuilder |
1814 |
super postOpenAsSubcanvasWith:aBuilder. |
|
1815 |
||
1816 |
"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
|
1817 |
self hideButtonPanel. |
8183 | 1818 |
|
9809
fa5280b1259f
changed: #postOpenAsSubcanvasWith:
Stefan Vogel <sv@exept.de>
parents:
9769
diff
changeset
|
1819 |
"filenameHolder contains the initial file name, or nil" |
8191
1779a8c3730d
Make FileDialog usable as SubCanvas
Stefan Vogel <sv@exept.de>
parents:
8183
diff
changeset
|
1820 |
self startFilename:self filenameHolder value. |
9809
fa5280b1259f
changed: #postOpenAsSubcanvasWith:
Stefan Vogel <sv@exept.de>
parents:
9769
diff
changeset
|
1821 |
treeBrowser currentFileNameHolder value:(Array with:self startFilename). |
8182 | 1822 |
! |
1823 |
||
1824 |
postOpenWith:aBuilder |
|
1825 |
|lastExtent| |
|
1826 |
||
1827 |
super postOpenWith:aBuilder. |
|
8183 | 1828 |
treeBrowser currentFileNameHolder value:(OrderedCollection with:self startFilename). |
8182 | 1829 |
|
1830 |
lastExtent := self class lastExtent. |
|
1831 |
lastExtent notNil ifTrue:[ |
|
1832 |
self window topView extent:lastExtent. |
|
1833 |
]. |
|
1834 |
self window label:self initialText. |
|
1835 |
! |
|
1836 |
||
9765 | 1837 |
rememberExtent |
5932 | 1838 |
self class lastExtent:self window topView extent. |
9765 | 1839 |
|
1840 |
"Created: / 14-02-2011 / 17:55:11 / cg" |
|
4796 | 1841 |
! ! |
1842 |
||
9113 | 1843 |
!FileDialog methodsFor:'menus'! |
1844 |
||
1845 |
bookmarksMenu |
|
1846 |
^ treeBrowser bookmarksMenu |
|
1847 |
! |
|
1848 |
||
1849 |
directoryMenu |
|
1850 |
self halt. |
|
1851 |
^ treeBrowser directoryMenu |
|
1852 |
! |
|
1853 |
||
1854 |
showMenuSpecForDialog |
|
1855 |
^ treeBrowser class showMenuSpecForDialog |
|
1856 |
! |
|
1857 |
||
1858 |
sortMenu |
|
1859 |
^ treeBrowser class sortInTreeMenu |
|
1860 |
! |
|
1861 |
||
1862 |
visitedDirectoriesMenu |
|
1863 |
^ treeBrowser visitedDirectoriesMenu |
|
1864 |
! ! |
|
1865 |
||
4796 | 1866 |
!FileDialog methodsFor:'private'! |
1867 |
||
1868 |
returnWasPressedInFilterField |
|
8663 | 1869 |
|wg ev| |
4796 | 1870 |
|
8663 | 1871 |
((wg := self windowGroup) notNil |
1872 |
and:[ (ev := wg lastEvent) notNil |
|
1873 |
and:[ ev isKeyEvent |
|
1874 |
and:[ ev key == #Return |
|
1875 |
and:[ (ev targetView isSameOrComponentOf:filterField) |
|
1876 |
or:[false "ev targetView isSameOrComponentOf:filenameField"]]]]]) ifTrue:[ |
|
4796 | 1877 |
^ true |
1878 |
]. |
|
1879 |
^ false |
|
1880 |
! |
|
1881 |
||
1882 |
returnWasPressedInFilterOrFilenameField |
|
1883 |
|ev| |
|
1884 |
||
1885 |
ev := self windowGroup lastEvent. |
|
1886 |
(ev notNil |
|
1887 |
and:[ev isKeyEvent |
|
1888 |
and:[ev key == #Return |
|
1889 |
and:[( ev targetView isSameOrComponentOf:filterField) |
|
1890 |
or:[false "ev targetView isSameOrComponentOf:filenameField"]]]]) ifTrue:[ |
|
1891 |
^ true |
|
1892 |
]. |
|
1893 |
^ false |
|
1894 |
! ! |
|
1895 |
||
6065 | 1896 |
!FileDialog methodsFor:'queries'! |
1897 |
||
1898 |
driveSelectorVisible |
|
1899 |
^ OperatingSystem isMSDOSlike |
|
1900 |
! ! |
|
1901 |
||
4796 | 1902 |
!FileDialog methodsFor:'user actions'! |
1903 |
||
1904 |
appendPressed |
|
1905 |
appendWasPressed := true. |
|
1906 |
self commonAcceptAction. |
|
1907 |
! |
|
1908 |
||
1909 |
commonAcceptAction |
|
1910 |
filenameField accept. |
|
1911 |
self result:(self filenameHolder value asString). |
|
1912 |
||
1913 |
^ super doAccept |
|
1914 |
! |
|
1915 |
||
1916 |
doAccept |
|
1917 |
"force accept - ignore in filterField" |
|
1918 |
||
1919 |
self returnWasPressedInFilterField ifTrue:[ |
|
1920 |
^ self |
|
1921 |
]. |
|
4996
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
1922 |
treeBrowser hasOpenEditor ifTrue:[ |
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
1923 |
"/ 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
|
1924 |
treeBrowser browser closeEditor. |
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
1925 |
^ self |
5927cc0508e8
close the editor in treebrowser on rename if ENTER is pressed
penk
parents:
4824
diff
changeset
|
1926 |
]. |
4796 | 1927 |
appendWasPressed := false. |
1928 |
self commonAcceptAction. |
|
1929 |
! |
|
1930 |
||
1931 |
doBack |
|
1932 |
||
1933 |
treeBrowser doBack. |
|
1934 |
! |
|
1935 |
||
5966 | 1936 |
doBrowseDirectory |
1937 |
UserPreferences fileBrowserClass openOn:(treeBrowser currentDirectory ? treeBrowser rootHolder value). |
|
1938 |
||
1939 |
||
1940 |
! |
|
1941 |
||
4796 | 1942 |
doCancel |
1943 |
||
1944 |
self result:nil. |
|
1945 |
^ super doCancel. |
|
1946 |
! |
|
1947 |
||
1948 |
doForward |
|
1949 |
||
1950 |
treeBrowser doForward. |
|
1951 |
! |
|
1952 |
||
1953 |
doGoDirectoryUp |
|
1954 |
||
1955 |
treeBrowser doGoDirectoryUp. |
|
1956 |
! |
|
1957 |
||
8092 | 1958 |
doGotoDesktopDirectory |
1959 |
||
1960 |
treeBrowser doGotoDesktopDirectory. |
|
1961 |
! |
|
1962 |
||
4796 | 1963 |
doGotoHomeDirectory |
1964 |
||
1965 |
treeBrowser doGotoHomeDirectory. |
|
1966 |
! |
|
1967 |
||
1968 |
menuDirHistory:backOrForward |
|
1969 |
||
1970 |
^ treeBrowser menuDirHistory:backOrForward. |
|
1971 |
! |
|
1972 |
||
1973 |
menuDirHistoryBack |
|
1974 |
||
1975 |
^ treeBrowser menuDirHistory:#back. |
|
1976 |
! |
|
1977 |
||
1978 |
menuDirHistoryForward |
|
1979 |
||
1980 |
^ treeBrowser menuDirHistory:#forward. |
|
1981 |
! |
|
1982 |
||
1983 |
newDirectory |
|
1984 |
||
1985 |
^ treeBrowser newDirectory |
|
1986 |
! |
|
1987 |
||
1988 |
okPressed |
|
1989 |
self doAccept |
|
9113 | 1990 |
! |
1991 |
||
1992 |
updateCurrentDirectory |
|
1993 |
treeBrowser updateCurrentDirectory |
|
4796 | 1994 |
! ! |
1995 |
||
1996 |
!FileDialog class methodsFor:'documentation'! |
|
1997 |
||
1998 |
version |
|
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
1999 |
^ '$Id: FileDialog.st 7854 2012-01-30 17:49:41Z vranyj1 $' |
9110 | 2000 |
! |
2001 |
||
2002 |
version_CVS |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
9809
diff
changeset
|
2003 |
^ '§Header: /cvs/stx/stx/libtool/FileDialog.st,v 1.116 2011/04/04 08:09:15 stefan Exp §' |
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
2004 |
! |
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
2005 |
|
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
2006 |
version_SVN |
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
2007 |
^ '$Id: FileDialog.st 7854 2012-01-30 17:49:41Z vranyj1 $' |
12125 | 2008 |
! ! |