author | penk |
Wed, 06 Nov 2002 11:14:47 +0100 | |
changeset 4201 | be512c7e5ea8 |
parent 4191 | 441ab27e2c7e |
child 4203 | 09b6fcb69d8f |
permissions | -rw-r--r-- |
3892 | 1 |
"{ Package: 'stx:libtool' }" |
2 |
||
3 |
ApplicationModel subclass:#AbstractFileBrowser |
|
4101 | 4 |
instanceVariableNames:'aspects' |
4201 | 5 |
classVariableNames:'DirectoryHistory DefaultCommandPerMIME RuntimeAspects |
6 |
DirectoryBookmarks LastEnforcedNameSpace CommandHistory |
|
7 |
DefaultCommandPerSuffix CommandHistorySize LastFileDiffFile |
|
8 |
DefaultFilters' |
|
4101 | 9 |
poolDictionaries:'' |
10 |
category:'Interface-Tools-File' |
|
3892 | 11 |
! |
12 |
||
13 |
AbstractFileBrowser class instanceVariableNames:'DisabledCursorImage EnabledCursorImage' |
|
14 |
||
15 |
" |
|
16 |
The following class instance variables are inherited by this class: |
|
17 |
||
4101 | 18 |
ApplicationModel - ClassResources |
19 |
Model - |
|
20 |
Object - |
|
3892 | 21 |
" |
22 |
! |
|
23 |
||
24 |
Object subclass:#Clipboard |
|
4101 | 25 |
instanceVariableNames:'method files' |
26 |
classVariableNames:'' |
|
27 |
poolDictionaries:'' |
|
28 |
privateIn:AbstractFileBrowser |
|
3892 | 29 |
! |
30 |
||
31 |
Object subclass:#CodeExecutionLock |
|
4101 | 32 |
instanceVariableNames:'locked' |
33 |
classVariableNames:'' |
|
34 |
poolDictionaries:'' |
|
35 |
privateIn:AbstractFileBrowser |
|
3892 | 36 |
! |
37 |
||
38 |
OrderedCollection subclass:#DirectoryHistory |
|
4101 | 39 |
instanceVariableNames:'forwardList backList lastWasForwardPath lastBackPath lastAddPath' |
40 |
classVariableNames:'HistorySize' |
|
41 |
poolDictionaries:'' |
|
42 |
privateIn:AbstractFileBrowser |
|
3952 | 43 |
! |
44 |
||
45 |
Object subclass:#DirectoryHistoryItem |
|
4101 | 46 |
instanceVariableNames:'path position' |
47 |
classVariableNames:'' |
|
48 |
poolDictionaries:'' |
|
49 |
privateIn:AbstractFileBrowser::DirectoryHistory |
|
3892 | 50 |
! |
51 |
||
52 |
OrderedSet subclass:#FilenameHistory |
|
4101 | 53 |
instanceVariableNames:'' |
54 |
classVariableNames:'' |
|
55 |
poolDictionaries:'' |
|
56 |
privateIn:AbstractFileBrowser |
|
3892 | 57 |
! |
58 |
||
59 |
Object subclass:#SaveAspectItem |
|
4101 | 60 |
instanceVariableNames:'value isHolder' |
61 |
classVariableNames:'' |
|
62 |
poolDictionaries:'' |
|
63 |
privateIn:AbstractFileBrowser |
|
3892 | 64 |
! |
65 |
||
66 |
||
67 |
!AbstractFileBrowser class methodsFor:'classAccess'! |
|
68 |
||
3952 | 69 |
directoryHistoryClass |
70 |
||
71 |
^ AbstractFileBrowser::DirectoryHistory |
|
72 |
! |
|
73 |
||
3892 | 74 |
filenameHistoryClass |
75 |
||
76 |
^ FilenameHistory |
|
77 |
! ! |
|
78 |
||
3952 | 79 |
!AbstractFileBrowser class methodsFor:'classVarAccess'! |
80 |
||
81 |
directoryHistory |
|
82 |
||
83 |
DirectoryHistory isNil ifTrue:[ |
|
4190 | 84 |
DirectoryHistory := self directoryHistoryClass new. |
3964 | 85 |
"/ DirectoryHistory inspect. |
3952 | 86 |
]. |
87 |
^ DirectoryHistory |
|
88 |
! |
|
89 |
||
90 |
resetClassVars |
|
91 |
||
92 |
DirectoryHistory := nil. |
|
93 |
||
94 |
" |
|
95 |
AbstractFileBrowser resetClassVars |
|
96 |
" |
|
97 |
! ! |
|
98 |
||
3892 | 99 |
!AbstractFileBrowser class methodsFor:'defaults'! |
100 |
||
101 |
commandHistory |
|
102 |
||
103 |
CommandHistory isNil ifTrue:[ |
|
4190 | 104 |
CommandHistory := OrderedCollection new. |
3892 | 105 |
]. |
106 |
^ CommandHistory |
|
107 |
! |
|
108 |
||
109 |
commandHistorySize |
|
110 |
||
4190 | 111 |
"max no of entries in the HistoryList " |
3892 | 112 |
CommandHistorySize isNil ifTrue:[ |
4190 | 113 |
CommandHistorySize := 50 |
3892 | 114 |
]. |
115 |
^ CommandHistorySize |
|
116 |
! |
|
117 |
||
118 |
defaultCommandPerMIME |
|
119 |
||
120 |
DefaultCommandPerMIME isNil ifTrue:[ |
|
4190 | 121 |
self initializeDefaultCommands |
3892 | 122 |
]. |
123 |
^ DefaultCommandPerMIME |
|
124 |
! |
|
125 |
||
126 |
defaultFilterList |
|
127 |
||
128 |
DefaultFilters isNil ifTrue:[ |
|
4190 | 129 |
DefaultFilters := #( '*' |
130 |
'*.st' |
|
131 |
'*.htm*' |
|
132 |
'*.txt' |
|
133 |
'*.gif' |
|
134 |
'*.xpm' |
|
135 |
'*.jpg' |
|
136 |
'*.[h,c]*' |
|
137 |
) |
|
3892 | 138 |
]. |
139 |
^ DefaultFilters. |
|
140 |
! |
|
141 |
||
142 |
directoryBookmarks |
|
143 |
||
144 |
DirectoryBookmarks isNil ifTrue:[ |
|
4190 | 145 |
DirectoryBookmarks := OrderedCollection new. |
146 |
DirectoryBookmarks add:Filename homeDirectory asAbsoluteFilename. |
|
147 |
DirectoryBookmarks add:Filename tempDirectory. |
|
148 |
DirectoryBookmarks add:Filename currentDirectory asAbsoluteFilename. |
|
149 |
Smalltalk systemPath do:[:path | |
|
150 |
((path ~= '.') and:[path asFilename exists]) ifTrue:[ |
|
151 |
DirectoryBookmarks add:path asFilename. |
|
152 |
] |
|
153 |
] |
|
3892 | 154 |
]. |
155 |
^ DirectoryBookmarks |
|
156 |
||
157 |
"/ DirectoryBookmarks := nil |
|
158 |
! |
|
159 |
||
160 |
initializeDefaultCommands |
|
161 |
DefaultCommandPerMIME := Dictionary new. |
|
162 |
||
163 |
DefaultCommandPerMIME at:'application/x-tar-compressed' put:'gunzip < %1 | tar tvf -'. |
|
164 |
DefaultCommandPerMIME at:'application/pdf' put:'acroread -display %2 %1'. |
|
165 |
||
166 |
" |
|
167 |
self initializeDefaultCommands |
|
168 |
" |
|
169 |
! |
|
170 |
||
171 |
listOfRuntimeValuesToRemark |
|
172 |
||
4201 | 173 |
" list of all aspects that will be saved after close of FileBrowserV2" |
3892 | 174 |
|
175 |
^ #( |
|
4201 | 176 |
#rootHolder |
177 |
#filterModel |
|
178 |
#enableFileHistory |
|
179 |
#fileHistory |
|
180 |
#currentFileNameHolder |
|
181 |
#currentSortOrder |
|
182 |
#sortBlockProperty |
|
3892 | 183 |
) |
184 |
! |
|
185 |
||
186 |
resetAspects |
|
187 |
||
188 |
RuntimeAspects := nil. |
|
189 |
||
190 |
" |
|
191 |
self resetAspects |
|
192 |
" |
|
193 |
! |
|
194 |
||
195 |
runtimeAspects |
|
196 |
||
197 |
RuntimeAspects isNil ifTrue:[ |
|
4190 | 198 |
RuntimeAspects := Dictionary new. |
3892 | 199 |
]. |
200 |
^ RuntimeAspects |
|
201 |
! |
|
202 |
||
4201 | 203 |
userPreferencesAspectList |
204 |
||
205 |
" list of all aspects that will be saved with save settings |
|
206 |
that aspects will be image consistent if the settings are saved in Launcher |
|
207 |
dont forget to add a access methos in Userpreferences if you add a aspect here |
|
208 |
" |
|
209 |
||
210 |
^ #( |
|
211 |
#viewDirsInContentsBrowser |
|
212 |
#showDirectoryTree |
|
213 |
#showHiddenFiles |
|
214 |
#viewDescription |
|
215 |
#viewDetails |
|
216 |
#viewDirectoryDescription |
|
217 |
#viewFilesInDirectoryTree |
|
218 |
#viewGroup |
|
219 |
#viewOwner |
|
220 |
#viewPermissions |
|
221 |
#viewPreview |
|
222 |
#viewSize |
|
223 |
#viewTime |
|
224 |
#viewType |
|
225 |
#openMultipleApplicationsForType |
|
226 |
#filenameEntryFieldVisibleHolder |
|
227 |
#toolBarVisibleHolder |
|
228 |
#sortDirectoriesBeforeFiles |
|
229 |
#openAlwaysInTextEditor |
|
230 |
#sortCaseless |
|
231 |
) |
|
3892 | 232 |
! ! |
233 |
||
234 |
!AbstractFileBrowser class methodsFor:'image'! |
|
235 |
||
236 |
DisabledCursorImage |
|
237 |
||
238 |
DisabledCursorImage isNil ifTrue:[ |
|
4190 | 239 |
DisabledCursorImage := Image fromFile:'xpmBitmaps/cursors/no_entry.xpm' |
3892 | 240 |
]. |
241 |
^ DisabledCursorImage |
|
242 |
! |
|
243 |
||
244 |
EnabledCursorImage |
|
245 |
||
246 |
EnabledCursorImage isNil ifTrue:[ |
|
4190 | 247 |
EnabledCursorImage := Image fromFile:'xpmBitmaps/cursors/double_crossHair.xpm' |
3892 | 248 |
]. |
249 |
^ EnabledCursorImage |
|
250 |
! ! |
|
251 |
||
252 |
!AbstractFileBrowser class methodsFor:'image specs'! |
|
253 |
||
254 |
clearHistoryIcon |
|
255 |
^ Icon deleteIcon |
|
256 |
! |
|
257 |
||
258 |
closeIcon |
|
259 |
"This resource specification was automatically generated |
|
260 |
by the ImageEditor of ST/X." |
|
261 |
||
262 |
"Do not manually edit this!! If it is corrupted, |
|
263 |
the ImageEditor may not be able to read the specification." |
|
264 |
||
265 |
" |
|
266 |
self closeIcon inspect |
|
267 |
ImageEditor openOnClass:self andSelector:#closeIcon |
|
268 |
" |
|
269 |
||
270 |
<resource: #image> |
|
271 |
||
272 |
^Icon |
|
4190 | 273 |
constantNamed:#'AbstractFileBrowser class closeIcon' |
274 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 275 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ H@@@@@@@@@@@@B@ @@@@@@@@@@@@HB@ @@@@@@@@@B@ H@@@@@@@@@@@@@@ HB@@@@@@@B@ H@@@@@@@@@ |
276 |
@@@@@@@B@ H@@@@B@ H@@@@@@@@@@@@@@@@@@@HB@ @B@ H@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@B@ H@@@@@@@@@@@@@@@@@ |
|
277 |
@@@@@@@B@ HB@ @@@@@@@@@@@@@@@@@@@@@B@ H@@ HB@@@@@@@@@@@@@@@@@@@B@ H@@@@B@ H@@@@@@@@A@@@@@@@B@ H@@@@@@@HB@ @@@@@@@@@@@@@B |
|
278 |
@ H@@@@@@@@@@ HB@@@@@@@@@@@@@ H@@@@@@@@@@@@B@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@PD@@P@@ |
|
279 |
@@DA@@@@@PD@@@DA@@@@@P@@@@D@@@D@@@D@@P@@@@D@@@D@@@D@@@@A@@@A@@@A@@@A@@@A@PDA@@@A@@@@@P@@@P@@@P@@@@D@@P@@@@@@@@DA@@DA@@@A |
|
280 |
@P@@@PD@@@@A@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[255 255 255 0 0 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@A C@A0G@@8N@@\\@@N8@@G0@@C @@G0@@N8@@\\B@8N@A0G@A C@@@@@A@@@MFL0QIQHQII8QIE@M&X0@@@@') ; yourself); yourself] |
|
281 |
! |
|
282 |
||
283 |
copyIcon |
|
284 |
<resource: #programImage> |
|
285 |
||
286 |
^ ToolbarIconLibrary copy20x20Icon "copy28x28Icon" |
|
287 |
! |
|
288 |
||
289 |
cutIcon |
|
290 |
<resource: #programImage> |
|
291 |
||
292 |
^ ToolbarIconLibrary cut20x20Icon2 "cut28x28Icon" |
|
293 |
! |
|
294 |
||
295 |
deleteIcon |
|
296 |
<resource: #programImage> |
|
297 |
||
298 |
^ ToolbarIconLibrary erase20x20Icon "/ delete28x28Icon |
|
299 |
! |
|
300 |
||
301 |
diffIcon |
|
302 |
"This resource specification was automatically generated |
|
303 |
by the ImageEditor of ST/X." |
|
304 |
||
305 |
"Do not manually edit this!! If it is corrupted, |
|
306 |
the ImageEditor may not be able to read the specification." |
|
307 |
||
308 |
" |
|
309 |
self diffIcon inspect |
|
310 |
ImageEditor openOnClass:self andSelector:#diffIcon |
|
311 |
" |
|
312 |
||
313 |
<resource: #image> |
|
314 |
||
315 |
^Icon |
|
4190 | 316 |
constantNamed:#'AbstractFileBrowser class diffIcon' |
317 |
ifAbsentPut:[(Depth8Image new) width: 26; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 318 |
@@@@@@@@A@PDA@PDA@PD@@@@@@@@@@@@@@@@@@@@@@@DA XFA XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA XF@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@XFA @F |
319 |
A XD@@@@@@@@@@@@@@@@@@@@@@@DA X@A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA @FA XFA@@@@@@@@@@@@@@@@@@@@@@@A@XF@@XFA XD@@@@@@@@@@@@ |
|
320 |
@@@@@@@@@@@DA X@A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA X@A XFA@@@@@@@@@@@@@@@@@@@@@@@A@XFA X@@@@@@@@@@@@@@@@@@@@@@@@@@@@DA XF |
|
321 |
A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA XFA XFA@@@@@@@@@@@@@@@@@@@@@@@A@PDA@PDA@PD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
322 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
323 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
324 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 129 129 129 0 0 0 194 194 194 132 132 132 198 198 198 255 255 255]; mask:((Depth1Image new) width: 26; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@?8@@@O>@@@C? @@@?<@@@O> @@C?(@@@?:@@@O> @@C?8@@@??@@@O>8@@C?''@@@?80@@@@@@@@T[@@@DI@@@GSX@@BT$@@@%I@@@IRP@@A4$@@@@@@@@@@a') ; yourself); yourself] |
|
325 |
! |
|
326 |
||
327 |
fileInIcon |
|
328 |
<resource: #programImage> |
|
329 |
||
4094 | 330 |
^ ToolbarIconLibrary fileIn20x20Icon3 |
3892 | 331 |
! |
332 |
||
333 |
goHomeIcon |
|
334 |
"This resource specification was automatically generated |
|
335 |
by the ImageEditor of ST/X." |
|
336 |
||
337 |
"Do not manually edit this!! If it is corrupted, |
|
338 |
the ImageEditor may not be able to read the specification." |
|
339 |
||
340 |
" |
|
341 |
self goHomeIcon inspect |
|
342 |
ImageEditor openOnClass:self andSelector:#goHomeIcon |
|
4084 | 343 |
Icon flushCachedIcons |
3892 | 344 |
" |
345 |
||
346 |
<resource: #image> |
|
347 |
||
348 |
^Icon |
|
4190 | 349 |
constantNamed:#'AbstractFileBrowser class goHomeIcon' |
350 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 351 |
@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@DQ@@@@@@@@@@@@DQDP@@@@@@@@@@DQ@QD@@@@@@@@@DQH2DQ@@@@@@@@DQH4L!!DP@@@@@@DQH4QCHQD@@@@@ |
352 |
DQH4QDP2DQ@@@@DQH4QDQDL!!DP@@DQH4QDQDQCHQD@D"H4QBH"ADP0@A@RH#QBH"H QC@@D@@@MDIUUUADL@@@@@@4P%UUTDP0@@@@@CQBUUUPQC@@@@@@MD |
|
353 |
IUUUADL@@@@@@4P%UUTDP0@@@@@CQBUUUPQC@@@@@@MDIUUUADL@@@@@@4P%UUTDP0@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 192 0 0 64 0 0 128 128 128 192 192 192 100 128 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@A@@@C @A''0@A/8@A?<@A?>@A??@C?? G??0O??8_??<_??<_??<C?? C?? C?? C?? C?? C?? C?? C?? C?? ') ; yourself); yourself] |
|
3892 | 354 |
! |
355 |
||
356 |
hexToggle22x22Icon |
|
357 |
"This resource specification was automatically generated |
|
358 |
by the ImageEditor of ST/X." |
|
359 |
||
360 |
"Do not manually edit this!! If it is corrupted, |
|
361 |
the ImageEditor may not be able to read the specification." |
|
362 |
||
363 |
" |
|
364 |
self hexToggle22x22Icon inspect |
|
365 |
ImageEditor openOnClass:self andSelector:#hexToggle22x22Icon |
|
366 |
" |
|
367 |
||
368 |
<resource: #image> |
|
369 |
||
370 |
^Icon |
|
4190 | 371 |
constantNamed:#'AbstractFileBrowser class hexToggle22x22Icon' |
372 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 373 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@AP@@@@T@@@@EAP@@@@@@@@@@ |
374 |
@@@@@@TEAP@E@@TEAPT@@@@@@@@@@@@@@@@EAP@@AP@@APTE@@@@@@@@@@@@@@@@APTE@@T@APTEAP@@@@@@@@@@@@@@@@T@@@@E@@TEAPT@@@@@@@@@@@@@ |
|
375 |
@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@AP@@@@T@@@@EAP@@@@@@@@@@@@@@@@T@AP@E@@T@APT@@@@@@@@@@@@@@@@E@@@@AP@@@@TE@@@@@@@@@@@@@@@@ |
|
376 |
AP@E@@T@AP@EAP@@@@@@@@@@@@@@@@T@AP@E@@@@APT@@@@@@@@@@@@@@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
377 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
378 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 105 133 190 129 129 129 194 194 194 255 0 0 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@@@@@B''Q@B$J@C&D@B$J@B''Q@') ; yourself); yourself] |
|
379 |
! |
|
380 |
||
381 |
historyIcon |
|
382 |
<resource: #programImage> |
|
383 |
||
384 |
^ ToolbarIconLibrary history20x20Icon "/ history28x28Icon |
|
385 |
! |
|
386 |
||
387 |
homeIcon |
|
388 |
<resource: #programImage> |
|
389 |
||
390 |
^ ToolbarIconLibrary home28x28Icon |
|
391 |
! |
|
392 |
||
393 |
htmlReloadIcon |
|
394 |
"This resource specification was automatically generated |
|
395 |
by the ImageEditor of ST/X." |
|
396 |
||
397 |
"Do not manually edit this!! If it is corrupted, |
|
398 |
the ImageEditor may not be able to read the specification." |
|
399 |
||
400 |
" |
|
401 |
self htmlReloadIcon inspect |
|
402 |
ImageEditor openOnClass:self andSelector:#htmlReloadIcon |
|
403 |
" |
|
404 |
||
405 |
<resource: #image> |
|
406 |
||
407 |
^Icon |
|
4190 | 408 |
constantNamed:#'AbstractFileBrowser class htmlReloadIcon' |
409 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 410 |
@@@@@@@@@@@UT@@@@@EU@D@@@@UT@@@H@AUP@@@@@EU@@@@@@EU@@@@E@EU@@@@@@EU@@@@@AUUT@@@@@UUP@@@@@EU@@@@@@AT@@@@@@@P@@@@H@@@@@@@@ |
411 |
@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@G@@@@@@@J@@@@@@@I@@@@@@@@') ; colorMapFromArray:#[0 0 0 0 129 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@G<C@_?C@??#A?C3C>@;G<@KG<@CG<@C??$C_?NCO>_CG<?#C9?3A3?;@''??@@?#P@?C\A?COC>CG?<CC?8C@? C') ; yourself); yourself] |
|
412 |
! |
|
413 |
||
414 |
leftArrow |
|
415 |
"This resource specification was automatically generated |
|
416 |
by the ImageEditor of ST/X." |
|
417 |
||
418 |
"Do not manually edit this!! If it is corrupted, |
|
419 |
the ImageEditor may not be able to read the specification." |
|
420 |
||
421 |
" |
|
422 |
self leftArrow inspect |
|
423 |
ImageEditor openOnClass:self andSelector:#leftArrow |
|
424 |
" |
|
425 |
||
426 |
<resource: #image> |
|
427 |
||
428 |
^Icon |
|
4190 | 429 |
constantNamed:#'AbstractFileBrowser class leftArrow' |
430 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 431 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
432 |
@@@@@@@@@@@@@@@@@@@A@0D@@@@@@@@@@@@@@@@@@@@@@@@@@@DDAPH@@@@@@@@@@@@@@@@@@@@@@@@@@PX@A0D@@@@@@@@@@@@@@@@@@@@@@@@AB@@IB HK |
|
433 |
@0LA@PDK@@@@@@@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@@@@@@@PX@@ALTEP8PDQDVE0\R@@@@@@@@@@@AAADQD1PUEQTNF@$SFP(R@@@@@@@@@@@KB!!P[ |
|
434 |
GAPUEQT]GQ4]GP(R@@@@@@@@@@@@D (TG!!0TEA,_G1<[H@(R@@@@@@@@@@@@@AHJC!!< GQ4JB (JB"DK@@@@@@@@@@@@@@@RB 8^B DRD!!HRD!!HK@@@@@@@@ |
|
435 |
@@@@@@@@D (]H H@@@@@@@@@@@@@@@@@@@@@@@@@@AHJHPD@@@@@@@@@@@@@@@@@@@@@@@@@@@@K@PH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B0D@@@@@@@@@ |
|
436 |
@@@@@@@@@@@@@@@@@@@@@@,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
437 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 32 96 32 64 96 96 128 160 64 96 128 128 160 192 32 96 128 128 160 160 160 192 224 0 96 128 0 0 0 128 128 160 64 192 192 32 160 192 64 128 192 128 192 224 192 224 224 0 0 32 96 192 224 0 160 192 0 128 192 160 224 224 96 160 192 128 192 192 64 160 192 192 192 192 32 192 192 0 192 224 0 128 160 32 192 224 64 192 224 0 192 192 0 64 96 0 64 128]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@B@@@F@@@N@@@^@@@>@@A??@C??@G??@O??@O??@G??@C??@A??@@>@@@^@@@N@@@F@@@B@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
|
438 |
! |
|
439 |
||
440 |
leftArrow20x20Icon |
|
441 |
"This resource specification was automatically generated |
|
442 |
by the ImageEditor of ST/X." |
|
443 |
||
444 |
"Do not manually edit this!! If it is corrupted, |
|
445 |
the ImageEditor may not be able to read the specification." |
|
446 |
||
447 |
" |
|
448 |
self leftArrow20x20Icon inspect |
|
449 |
ImageEditor openOnClass:self andSelector:#leftArrow20x20Icon |
|
450 |
Icon flushCachedIcons |
|
451 |
" |
|
452 |
||
453 |
<resource: #image> |
|
454 |
||
455 |
^Icon |
|
4190 | 456 |
constantNamed:#'AbstractFileBrowser class leftArrow20x20Icon' |
457 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 458 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@@HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB@ HB@ HB@ H@@ @B@ HB@ HB@ HB@ HB@ HB@@HA |
459 |
@@HB@ HB@ HB@ HB@ HB@ @B@PD@@ HB@ HB@ HB@ HB@ H@@ DA@P@@@@@@@@@@@ HB@ HB@@HA@PDA@ HB@ HB@ @B@ HB@ @B@PDA@PDA@PDA@PDB@@HB |
|
460 |
@ H@@ DA@PDA@PDA@PDA@PH@@ HB@ @B@PDA@PDA@PDA@PDA@ @B@ HB@ @B@PDA@PDA@PDA@PDB@@HB@ HB@ @B@PDA@PHB@ HB@ H@@ HB@ HB@ @B@PDA |
|
461 |
@@@@@@@@@@@B@ HB@ HB@ @B@PD@@ HB@ HB@ HB@ HB@ HB@ @B@P@B@ HB@ HB@ HB@ HB@ HB@ @B@@HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB |
|
462 |
@ HB@ HB@ HB@ @B@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @a') ; colorMapFromArray:#[0 0 0 100 128 255 128 128 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@M@B@@@F@J@N@@@^@J@>@@A??@C??@G??OO??@O??@G??@C??@A??E@>@H@^@@@N@@@F@N@B@A@@@@') ; yourself); yourself] |
|
3892 | 463 |
! |
464 |
||
465 |
leftArrow20x20PlusMenuIcon |
|
466 |
"This resource specification was automatically generated |
|
467 |
by the ImageEditor of ST/X." |
|
468 |
||
469 |
"Do not manually edit this!! If it is corrupted, |
|
470 |
the ImageEditor may not be able to read the specification." |
|
471 |
||
472 |
" |
|
473 |
self leftArrow20x20PlusMenuIcon inspect |
|
474 |
ImageEditor openOnClass:self andSelector:#leftArrow20x20PlusMenuIcon |
|
475 |
Icon flushCachedIcons |
|
476 |
" |
|
477 |
||
478 |
<resource: #image> |
|
479 |
||
480 |
^Icon |
|
4190 | 481 |
constantNamed:#'AbstractFileBrowser class leftArrow20x20PlusMenuIcon' |
482 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 483 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@A@ @@@@@@@@@@@@@@@@@@@@@@@PLA@@@@@@@@@@@@@@@@@@@@@@DD |
484 |
APH@@@@@@@@@@@@@@@@@@@@AA @G@P@@@@@@@@@@@@@@@@@@@P @BP(BB0LC@PDAB0@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@AA @@D1PUC!!@QDQXWA1H@ |
|
485 |
@@@@@PPQDQLTEQTUC!! ID1$JD @@@@@KB!!P[GAPUEQT]GQ4]GP(R@@@@@@@RB!!P^GAPTF1<_G1, B!!H@@@@@@@@RB 8_HA4]B (JB (!!B0@@@@@@@@@RB 8^ |
|
486 |
B DRD!!HRD!!HK@@@@@@@@@@@RB!!4"@ @@@@@@@@@@@@@@@@@@@@@RB"DA@@@@@@@@@@@KB0,KB0,K@@@K@PH@@@@@@@@@@@@KB0,KB0@@@@@K@P@@@@@@@@@@ |
|
487 |
@@@KB0,@@@@@@@@K@@@@@@@@@@@@@@@K@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[224 224 224 0 32 64 0 32 96 32 64 96 96 128 160 64 96 128 128 160 192 32 96 128 128 160 160 160 192 224 0 96 128 0 0 0 128 128 160 64 192 192 32 160 192 64 128 192 128 192 224 192 224 224 0 0 32 96 192 224 0 160 192 0 128 192 160 224 224 96 160 192 128 192 192 64 160 192 192 192 192 32 192 192 0 192 224 0 128 160 32 192 224 64 192 224 0 192 192 0 64 96 0 64 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A@@@C@@@G@@@O@@@_@@@?? A?? C?? G?? G?? C?? A?? @?? @_@@@O@@?''@@_C@@NA@@D@@@') ; yourself); yourself] |
|
488 |
! |
|
489 |
||
4094 | 490 |
leftArrowIcon |
491 |
^ self leftArrow20x20Icon |
|
492 |
! |
|
493 |
||
3892 | 494 |
leftArrowPlusMenu |
495 |
"This resource specification was automatically generated |
|
496 |
by the ImageEditor of ST/X." |
|
497 |
||
498 |
"Do not manually edit this!! If it is corrupted, |
|
499 |
the ImageEditor may not be able to read the specification." |
|
500 |
||
501 |
" |
|
502 |
self leftArrowPlusMenu inspect |
|
503 |
ImageEditor openOnClass:self andSelector:#leftArrowPlusMenu |
|
504 |
" |
|
505 |
||
506 |
<resource: #image> |
|
507 |
||
508 |
^Icon |
|
4190 | 509 |
constantNamed:#'AbstractFileBrowser class leftArrowPlusMenu' |
510 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 511 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
512 |
@@@@@@@@@@@@@@@@@@@A@0D@@@@@@@@@@@@@@@@@@@@@@@@@@@DDAPH@@@@@@@@@@@@@@@@@@@@@@@@@@PX@A0D@@@@@@@@@@@@@@@@@@@@@@@@AB@@IB HK |
|
513 |
@0LA@PDK@@@@@@@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@@@@@@@PX@@ALTEP8PDQDVE0\R@@@@@@@@@@@AAADQD1PUEQTNF@$SFP(R@@@@@@@@@@@KB!!P[ |
|
514 |
GAPUEQT]GQ4]GP(R@@@@@@@@@@@@D (TG!!0TEA,_G1<[H@(R@@@@@@@@@@@@@AHJC!!< GQ4JB (JB"DK@@@@@@@@@@@@@@@RB 8^B DRD!!HRD!!HK@@@@@@@@ |
|
515 |
@@@@@@@@D (]H H@@@@@@@@@@@@@@@@@@@@@@@@@@AHJHPD@@@@@@@@@@@@@@@@@@@@@@@@@@@@K@PH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B0D@@@@@@@@@ |
|
516 |
@@@@@@@@@@@@@@@@@@@@@@,@@@@@@@@KB0,KB0,K@@@@@@@@@@@@@@@@@@@@@@@@B0,KB0,@@@@@@@@@@@@@@@@@@@@@@@@@@@,KB0@@@@@@@@@@@@@@@@@@ |
|
517 |
@@@@@@@@@@@K@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 32 96 32 64 96 96 128 160 64 96 128 128 160 192 32 96 128 128 160 160 160 192 224 0 96 128 0 0 0 128 128 160 64 192 192 32 160 192 64 128 192 128 192 224 192 224 224 0 0 32 96 192 224 0 160 192 0 128 192 160 224 224 96 160 192 128 192 192 64 160 192 192 192 192 32 192 192 0 192 224 0 128 160 32 192 224 64 192 224 0 192 192 0 64 96 0 64 128]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@B@@@F@@@N@@@^@@@>@@A??@C??@G??@O??@O??@G??@C??@A??@@>@@@^@@@N@@@F@@@BA?@@@>@@@\@@@H@@@@') ; yourself); yourself] |
|
518 |
! |
|
519 |
||
520 |
leftDownIcon |
|
521 |
"This resource specification was automatically generated |
|
522 |
by the ImageEditor of ST/X." |
|
523 |
||
524 |
"Do not manually edit this!! If it is corrupted, |
|
525 |
the ImageEditor may not be able to read the specification." |
|
526 |
||
527 |
" |
|
528 |
self leftDownIcon inspect |
|
529 |
ImageEditor openOnClass:self andSelector:#leftDownIcon |
|
530 |
" |
|
531 |
||
532 |
<resource: #image> |
|
533 |
||
534 |
^Icon |
|
4190 | 535 |
constantNamed:#'AbstractFileBrowser class leftDownIcon' |
536 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 537 |
UUUUUUUUUUUPAUUUUUUUP@UUUUUUUPB!!UUUUUU@B*AUUUUU@B*(UUUUUPB** UUUUPB***AUUUTB***(EUUUB****%UUUR*****UUUUU@*%UUUUUUPJ)UUUU |
538 |
UUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*$@@@@AUPJ*****)UTB******UU@******%UPJ*****)UTAUUUU |
|
539 |
UUUU@@@@@@@AUUUUUUUUUP@a') ; colorMapFromArray:#[255 255 255 0 0 0 40 40 100 255 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
540 |
@@@@@@@@@@@@ @@@@\@@@@O @@@G<@@@C? @@A?<@@@?? @@_?<@@G?? @@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C??? @???8@O? |
|
541 |
?>@C??? @???8@O??>@@@@@@@@@@@@@a') ; yourself); yourself] |
|
542 |
! |
|
543 |
||
544 |
leftIcon |
|
545 |
"This resource specification was automatically generated |
|
546 |
by the ImageEditor of ST/X." |
|
547 |
||
548 |
"Do not manually edit this!! If it is corrupted, |
|
549 |
the ImageEditor may not be able to read the specification." |
|
550 |
||
551 |
" |
|
552 |
self leftIcon inspect |
|
553 |
ImageEditor openOnClass:self andSelector:#leftIcon |
|
554 |
" |
|
555 |
||
556 |
<resource: #image> |
|
557 |
||
558 |
^Icon |
|
4190 | 559 |
constantNamed:#'AbstractFileBrowser class leftIcon' |
560 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 561 |
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUPUUUUUUUUPUUUUUUUUP%UUUUUUUP)UUUUUUUP*P@@@@@AP*$@@@@@@P******* |
562 |
*P********$********)J********U********%V*%UUUUUUUZ)UUUUUUUP*UUUUUUUUV%UUUUUUUUYUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU |
|
563 |
UUUUUUUUUUUUUUUUUUUUUP@a') ; colorMapFromArray:#[255 255 255 0 0 0 40 40 100 255 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
564 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H@@@@F@@@@C @@@A8@@@@>@@@@_???0O???<G????C????0_???<C????@_???0C8@@@@^@@@@C @@@@X@@@@@@ |
|
565 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
566 |
! |
|
567 |
||
568 |
menuHistoryList9x20Icon |
|
569 |
"This resource specification was automatically generated |
|
570 |
by the ImageEditor of ST/X." |
|
571 |
||
572 |
"Do not manually edit this!! If it is corrupted, |
|
573 |
the ImageEditor may not be able to read the specification." |
|
574 |
||
575 |
" |
|
576 |
self menuHistoryList9x20Icon inspect |
|
577 |
ImageEditor openOnClass:self andSelector:#menuHistoryList9x20Icon |
|
578 |
Icon flushCachedIcons |
|
579 |
" |
|
580 |
||
581 |
<resource: #image> |
|
582 |
||
583 |
^Icon |
|
4190 | 584 |
constantNamed:#'AbstractFileBrowser class menuHistoryList9x20Icon' |
585 |
ifAbsentPut:[(Depth1Image new) width: 9; height: 20; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a') ; colorMapFromArray:#[255 255 255 0 0 0]; mask:((Depth1Image new) width: 9; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a') ; yourself); yourself] |
|
3892 | 586 |
! |
587 |
||
588 |
menuHistoryListIcon |
|
589 |
"This resource specification was automatically generated |
|
590 |
by the ImageEditor of ST/X." |
|
591 |
||
592 |
"Do not manually edit this!! If it is corrupted, |
|
593 |
the ImageEditor may not be able to read the specification." |
|
594 |
||
595 |
" |
|
596 |
self menuHistoryListIcon inspect |
|
597 |
ImageEditor openOnClass:self andSelector:#menuHistoryListIcon |
|
598 |
" |
|
599 |
||
600 |
<resource: #image> |
|
601 |
||
602 |
^Icon |
|
4190 | 603 |
constantNamed:#'AbstractFileBrowser class menuHistoryListIcon' |
604 |
ifAbsentPut:[(Depth1Image new) width: 12; height: 12; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??S?<O?0??C?<O?0??/?=_?0??C?<O?0') ; colorMapFromArray:#[255 255 255 0 0 0]; mask:((Depth1Image new) width: 12; height: 12; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@O@@<@C0A?8C?@G8@O@@X@@@A?8@@@') ; yourself); yourself] |
|
3892 | 605 |
! |
606 |
||
3923 | 607 |
newDirectory20x20Icon |
608 |
"This resource specification was automatically generated |
|
609 |
by the ImageEditor of ST/X." |
|
610 |
||
611 |
"Do not manually edit this!! If it is corrupted, |
|
612 |
the ImageEditor may not be able to read the specification." |
|
613 |
||
614 |
" |
|
615 |
self newDirectory20x20Icon inspect |
|
616 |
ImageEditor openOnClass:self andSelector:#newDirectory20x20Icon |
|
617 |
Icon flushCachedIcons |
|
618 |
" |
|
619 |
||
620 |
<resource: #image> |
|
621 |
||
622 |
^Icon |
|
4190 | 623 |
constantNamed:#'AbstractFileBrowser class newDirectory20x20Icon' |
624 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3923 | 625 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PDA@PDA@P@@@@@@@@@@@@@@@@@A@ HB@ HA@@@@@@@@@@@@@@@@@PHB@ HB@ HA |
626 |
@@@@@@@@@@@@@@DA@PDA@PDA@P@@@@@@@@@@@@D@@PHB@ HB@ HB@ HB@@@@@ HB@P@A@ HB@ HB@ HB@ @B@@H@@ HA@@DB@ HB@ HB@ H@@ H@@ H@@ D@ |
|
627 |
@PHB@ HB@ HB@@HB@ @B@ H@@P@A@ HB@ HB@ HB@ HB@ HB@ HA@@DB@ HB@ HB@ HB@ HB@ HB@ D@@PHB@ HB@ HB@ HB@ HB@ HB@P@A@ HB@ HB@ HB |
|
628 |
@ HB@ HB@ HA@@DB@ HB@ HB@ HB@ HB@ HB@ D@@PHB@ HB@ HB@ HB@ HB@ HB@P@A@ HB@ HB@ HB@ HB@ HB@ HA@@DA@PDA@PDA@PDA@PDA@PDA@PD@ |
|
629 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[255 0 0 0 0 0 255 255 0]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@DQ@O:R@O9T@_<8@??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? @@@@@@@@') ; yourself); yourself] |
|
630 |
! |
|
631 |
||
3892 | 632 |
pasteIcon |
633 |
<resource: #programImage> |
|
634 |
||
635 |
^ ToolbarIconLibrary paste20x20Icon "/ paste28x28Icon |
|
636 |
! |
|
637 |
||
638 |
rightArrow |
|
639 |
"This resource specification was automatically generated |
|
640 |
by the ImageEditor of ST/X." |
|
641 |
||
642 |
"Do not manually edit this!! If it is corrupted, |
|
643 |
the ImageEditor may not be able to read the specification." |
|
644 |
||
645 |
" |
|
646 |
self rightArrow inspect |
|
647 |
ImageEditor openOnClass:self andSelector:#rightArrow |
|
648 |
" |
|
649 |
||
650 |
<resource: #image> |
|
651 |
||
652 |
^Icon |
|
4190 | 653 |
constantNamed:#'AbstractFileBrowser class rightArrow' |
654 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 655 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
656 |
@@@@@@@@@@@@@@@@@@@@@0PB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PTF@ @@@@@@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@@@@@@A@PDA@PDH@P\I |
|
657 |
@@XB@@@@@@@@@@@@@@@AA0(@@@@@B ,LB @D@ @@@@@@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@@@@@@@@M@@TTEQLQE!!\WD 0K@@PB@@@@@@@@@@@MB <W |
|
658 |
E1\WD!!\WD!!LYDQ(B@@@@@@@@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@@@@@@AA!!(ZF!!(ZE1H^FQDZ@ @@@@@@@@@@@@@A@ HB@ HB@1DYDQ(B@@@@@@@@@@@@ |
|
659 |
@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@@@@@@@0PZ@ @@@@@@@@@@@@@@@@@@@@@@@@@@@Q(B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0H@@@@@@@@@ |
|
660 |
@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
661 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 0 64 96 32 128 160 128 160 192 32 96 128 128 192 192 0 64 64 160 192 192 192 224 224 160 192 224 96 192 224 32 64 96 160 224 224 128 192 224 96 160 192 0 160 192 0 128 192 64 192 192 64 160 192 96 192 192 32 160 192 0 128 160 192 192 192 64 224 224 0 96 128 32 192 192 64 192 224 0 192 224 0 192 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@D@@@F@@@G@@@G @@G0@O?8@O?<@O?>@O??@O??@O?>@O?<@O?8@@G0@@G @@G@@@F@@@D@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
|
662 |
! |
|
663 |
||
664 |
rightArrow20x20Icon |
|
665 |
"This resource specification was automatically generated |
|
666 |
by the ImageEditor of ST/X." |
|
667 |
||
668 |
"Do not manually edit this!! If it is corrupted, |
|
669 |
the ImageEditor may not be able to read the specification." |
|
670 |
||
671 |
" |
|
672 |
self rightArrow20x20Icon inspect |
|
673 |
ImageEditor openOnClass:self andSelector:#rightArrow20x20Icon |
|
674 |
Icon flushCachedIcons |
|
675 |
" |
|
676 |
||
677 |
<resource: #image> |
|
678 |
||
679 |
^Icon |
|
4190 | 680 |
constantNamed:#'AbstractFileBrowser class rightArrow20x20Icon' |
681 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 682 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ H@@ HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB@ HB@ HB@ HB@@H@@ HB@ HB@ HB@ HB@ HB@ H@ |
683 |
@PH@@ HB@ HB@ HB@ HB@ HB@ @A@PH@@ HB@ HB@ H@@@@@@@@@@@DA@PH@@ HB@ HB@ @B@ HB@ HB@PDA@PH@@ HB@ HB@@HA@PDA@PDA@PDA@PH@@ HB |
|
684 |
@ H@@ DA@PDA@PDA@PDA@PH@@ HB@ @B@PDA@PDA@PDA@PDA@ @B@ HB@@HA@PDA@PDA@PDA@PH@@ HB@ H@@ HB@ HB@ DA@PDB@@HB@ HB@ @@@@@@@@@@ |
|
685 |
@PDA@ @B@ HB@ HB@ HB@ HB@ @A@PH@@ HB@ HB@ HB@ HB@ HB@@DB@@HB@ HB@ HB@ HB@ HB@ H@@ @B@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB |
|
686 |
@ HB@ HB@ HB@@HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @a') ; colorMapFromArray:#[0 0 0 100 128 255 128 128 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@D@@@F@H@G@@@G @@G0@O?8AO?<@O?>@O??@O??DO?>DO?<@O?8@@G0@@G @@G@@@F@@@D@J@@@@') ; yourself); yourself] |
|
3892 | 687 |
! |
688 |
||
4094 | 689 |
rightArrowIcon |
690 |
^ self rightArrow20x20Icon |
|
691 |
! |
|
692 |
||
3892 | 693 |
rightArrowPlusMenu |
694 |
"This resource specification was automatically generated |
|
695 |
by the ImageEditor of ST/X." |
|
696 |
||
697 |
"Do not manually edit this!! If it is corrupted, |
|
698 |
the ImageEditor may not be able to read the specification." |
|
699 |
||
700 |
" |
|
701 |
self rightArrowPlusMenu inspect |
|
702 |
ImageEditor openOnClass:self andSelector:#rightArrowPlusMenu |
|
703 |
" |
|
704 |
||
705 |
<resource: #image> |
|
706 |
||
707 |
^Icon |
|
4190 | 708 |
constantNamed:#'AbstractFileBrowser class rightArrowPlusMenu' |
709 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 710 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
711 |
@@@@@@@@@@@@@@@@@@@@@0PB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PTF@ @@@@@@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@@@@@@A@PDA@PDH@P\I |
|
712 |
@@XB@@@@@@@@@@@@@@@AA0(@@@@@B ,LB @D@ @@@@@@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@@@@@@@@M@@TTEQLQE!!\WD 0K@@PB@@@@@@@@@@@MB <W |
|
713 |
E1\WD!!\WD!!LYDQ(B@@@@@@@@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@@@@@@AA!!(ZF!!(ZE1H^FQDZ@ @@@@@@@@@@@@@A@ HB@ HB@1DYDQ(B@@@@@@@@@@@@ |
|
714 |
@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@@@@@@@0PZ@ @@@@@@@@@@@@@@@@@@@@@@@@@@@Q(B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0H@@@@@@@@@ |
|
715 |
@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@B@ HB@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@ @@@@@@@@@@@@@@@@@@ |
|
716 |
@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 0 64 96 32 128 160 128 160 192 32 96 128 128 192 192 0 64 64 160 192 192 192 224 224 160 192 224 96 192 224 32 64 96 160 224 224 128 192 224 96 160 192 0 160 192 0 128 192 64 192 192 64 160 192 96 192 192 32 160 192 0 128 160 192 192 192 64 224 224 0 96 128 32 192 192 64 192 224 0 192 224 0 192 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@D@@@F@@@G@@@G @@G0@O?8@O?<@O?>@O??@O??@O?>@O?<@O?8@@G0@@G @@G@@@F@@@DA?@@@>@@@\@@@H@@@@') ; yourself); yourself] |
|
717 |
! |
|
718 |
||
719 |
rightArrowPlusMenu20x20Icon |
|
720 |
"This resource specification was automatically generated |
|
721 |
by the ImageEditor of ST/X." |
|
722 |
||
723 |
"Do not manually edit this!! If it is corrupted, |
|
724 |
the ImageEditor may not be able to read the specification." |
|
725 |
||
726 |
" |
|
727 |
self rightArrowPlusMenu20x20Icon inspect |
|
728 |
ImageEditor openOnClass:self andSelector:#rightArrowPlusMenu20x20Icon |
|
729 |
Icon flushCachedIcons |
|
730 |
" |
|
731 |
||
732 |
<resource: #image> |
|
733 |
||
734 |
^Icon |
|
4190 | 735 |
constantNamed:#'AbstractFileBrowser class rightArrowPlusMenu20x20Icon' |
736 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 737 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@@@@@@@@@@@@@@@@CA@H@@@@@@@@@@@@@@@@@@@@@@@DE |
738 |
A H@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@DA@PDA@P AA0$@A H@@@@@@@@@@P\J@@@@@@(KC@(@A@H@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@ |
|
739 |
@@4@AQPUD1DVE1\RC@,@A@H@@@@@CP(OE1\WE1HWE1HSFQDZ@ @@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@DFF!!(ZF!!(WD!!8YDQ(B@@@@@@@@@PHB@ HB@ LQ |
|
740 |
FQDZ@ @@@@@@@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@CAA(B@@@@@@@@@@@@@@@@@@@@@@DZ@ @@@ HB@ HB@ @@@@@@@@@@@0H@@@@@@ HB@ H@ |
|
741 |
@@@@@@@@@@@A@@@@@@@@@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@a') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 0 64 96 32 128 160 128 160 192 32 96 128 128 192 192 0 64 64 160 192 192 192 224 224 160 192 224 96 192 224 32 64 96 160 224 224 128 192 224 96 160 192 0 160 192 0 128 192 64 192 192 64 160 192 96 192 192 32 160 192 0 128 160 192 192 192 64 224 224 0 96 128 32 192 192 64 192 224 0 192 224 0 192 192]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@H@@@L@@@N@@@O@@@O @_?0@_?8@_?<@_?>@_?>@_?<@_?8@_?0@@O @@O@@@N_0@LO @HG@@@B@') ; yourself); yourself] |
|
742 |
! |
|
743 |
||
744 |
rightIcon |
|
745 |
"This resource specification was automatically generated |
|
746 |
by the ImageEditor of ST/X." |
|
747 |
||
748 |
"Do not manually edit this!! If it is corrupted, |
|
749 |
the ImageEditor may not be able to read the specification." |
|
750 |
||
751 |
" |
|
752 |
self rightIcon inspect |
|
753 |
ImageEditor openOnClass:self andSelector:#rightIcon |
|
754 |
" |
|
755 |
||
756 |
<resource: #image> |
|
757 |
||
758 |
^Icon |
|
4190 | 759 |
constantNamed:#'AbstractFileBrowser class rightIcon' |
760 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 761 |
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUTIUUUUUUUUB%UEUUUUUP*EP@@@@@@J)T@@@@@@B*%B******* |
762 |
*P********(J********B********P********PEUUUUUV*QEUUUUUP*PUUUUUUTJQUUUUUUUBQUUUUUUUPQUUUUUUUPAUUUUUUUTUUUUUUUUUUUUUUUUUUU |
|
763 |
UUUUUUUUUUUUUUUUUUUUUP@a') ; colorMapFromArray:#[255 255 255 0 0 0 50 50 100 255 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
764 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@@@@@8@@@@O@@@@C8A????@_???8G????A????0_???<G???>A????@@@@O @@@C0@@@@8@@@@L@@@@ |
|
765 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
766 |
! |
|
767 |
||
768 |
searchIcon |
|
769 |
<resource: #programImage> |
|
770 |
||
4094 | 771 |
^ ToolbarIconLibrary search20x20Icon "/ search28x28Icon |
772 |
"/ ^ ToolbarIconLibrary search16x16Icon "/ search28x28Icon |
|
3892 | 773 |
! |
774 |
||
775 |
shellIcon |
|
776 |
<resource: #programImage> |
|
777 |
||
778 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
4190 | 779 |
^ ToolbarIconLibrary dos20x20Icon |
3892 | 780 |
]. |
781 |
^ ToolbarIconLibrary shell20x20Icon |
|
782 |
! |
|
783 |
||
4094 | 784 |
shellWithoutTextIcon |
785 |
<resource: #programImage> |
|
786 |
||
787 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
4190 | 788 |
^ ToolbarIconLibrary dosWithoutText20x20Icon |
4094 | 789 |
]. |
790 |
^ ToolbarIconLibrary shellWithoutText20x20Icon |
|
791 |
! |
|
792 |
||
3892 | 793 |
upArrow |
794 |
"This resource specification was automatically generated |
|
795 |
by the ImageEditor of ST/X." |
|
796 |
||
797 |
"Do not manually edit this!! If it is corrupted, |
|
798 |
the ImageEditor may not be able to read the specification." |
|
799 |
||
800 |
" |
|
801 |
self upArrow inspect |
|
802 |
ImageEditor openOnClass:self andSelector:#upArrow |
|
803 |
" |
|
804 |
||
805 |
<resource: #image> |
|
806 |
||
807 |
^Icon |
|
4190 | 808 |
constantNamed:#'AbstractFileBrowser class upArrow' |
809 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 810 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
811 |
@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@@@@@@DFA0 DAP@@@@@@@@@@@@@@@@@@@@@@@P$@A0(HA@T@@@@@@@@@@@@@@@@@@@@AB0@@C@4N |
|
812 |
C0PE@@@@@@@@@@@@@@@@@@DF@@@LB@ MD@<DAP@@@@@@@@@@@@@@@PLGDQHHD1LHE@8UA@H@@@@@@@@@@@@AE!!\XA@<SD1LHEPPYF DB@@@@@@@@@@D\@Q0A |
|
813 |
GA4OD1LJEPD\@Q0A@ @@@@@@@@@@@@@@@!!8^C1T_A@T@@@@@@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@@@@@@E @GDQT_A@T@@@@@@@@@@@@@ |
|
814 |
@@@@@@@@@P@!!H!!TJA@T@@@@@@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@@@@@@@QXXFPPDF H@@@@@@@@@@@@@@@@@@@@@@ TEAPTE@ H@@@@@ |
|
815 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
816 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 96 128 160 0 96 128 0 0 32 128 160 192 192 224 224 0 160 192 128 128 160 32 192 192 128 160 160 96 192 224 0 192 224 32 192 224 32 160 192 64 224 224 160 192 224 64 192 192 0 128 192 0 192 192 0 128 160 32 64 96 64 96 128 32 96 128 0 64 128 0 64 96 192 192 192 0 32 96 32 128 192 128 192 224 64 192 224 128 192 192 160 224 224 96 192 192 96 160 192 64 160 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@F@@@O@@@_ @@?0@A?8@C?<@G?>@O??@_?? @?0@@?0@@?0@@?0@@?0@@?0@@?0@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
|
817 |
! |
|
818 |
||
819 |
upArrow20x20Icon |
|
820 |
"This resource specification was automatically generated |
|
821 |
by the ImageEditor of ST/X." |
|
822 |
||
823 |
"Do not manually edit this!! If it is corrupted, |
|
824 |
the ImageEditor may not be able to read the specification." |
|
825 |
||
826 |
" |
|
827 |
self upArrow20x20Icon inspect |
|
828 |
ImageEditor openOnClass:self andSelector:#upArrow20x20Icon |
|
829 |
Icon flushCachedIcons |
|
830 |
" |
|
831 |
||
832 |
<resource: #image> |
|
833 |
||
834 |
^Icon |
|
4190 | 835 |
constantNamed:#'AbstractFileBrowser class upArrow20x20Icon' |
836 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 837 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB@ HB@ HB@ H@@ H@@ HB@ HB@ HB@ HB@ HB@@HA |
838 |
@PH@@ HB@ HB@ HB@ HB@ @B@PDA@PH@@ HB@ HB@ HB@ H@@ DA@PDA@PH@@ HB@ HB@ HB@@HA@PDA@PDA@PH@@ HB@ HB@ @B@PDA@PDA@PDA@PH@@ HB |
|
839 |
@ H@@ DA@PDA@PDA@PDA@PH@@ HB@@@@@@@@@ DA@PDB@@@@@@@@@ HB@ HB@ @B@PDA@PH@@ HB@ HB@ HB@ HB@@HA@PDA@ @B@ HB@ HB@ HB@ H@@ DA |
|
840 |
@PDB@@HB@ HB@ HB@ HB@ @B@PDA@PH@@ HB@ HB@ HB@ HB@@HA@PDA@ @B@ HB@ HB@ HB@ H@@ HB@ HB@@HB@ HB@ HB@ HB@ @@@@@@@@@@@ HB@ HB |
|
841 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @a') ; colorMapFromArray:#[0 0 0 100 128 255 128 128 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@J@@@@@F@@@O@@@_ O@?0@A?8@C?<@G?>@O??E_??(@?0@@?0@@?0N@?0A@?0@@?0@@?0K@@@A@@@@') ; yourself); yourself] |
|
4084 | 842 |
! |
843 |
||
844 |
upArrow20x20IconOld |
|
845 |
"This resource specification was automatically generated |
|
846 |
by the ImageEditor of ST/X." |
|
847 |
||
848 |
"Do not manually edit this!! If it is corrupted, |
|
849 |
the ImageEditor may not be able to read the specification." |
|
850 |
||
851 |
" |
|
852 |
self upArrow20x20IconOld inspect |
|
853 |
ImageEditor openOnClass:self andSelector:#upArrow20x20IconOld |
|
854 |
Icon flushCachedIcons |
|
855 |
" |
|
856 |
||
857 |
<resource: #image> |
|
858 |
||
859 |
^Icon |
|
4190 | 860 |
constantNamed:#'AbstractFileBrowser class upArrow20x20IconOld' |
861 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 862 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DB@@@@@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@PXG |
863 |
B@PE@@@@@@@@@@@@@@@@@@DI@@\JB@PE@@@@@@@@@@@@@@@AB0@@C@4NC0PE@@@@@@@@@@@@@PX@@@0HB@4PC0PE@@@@@@@@@@DCA1DRBALSBAPNEPPB@@@@ |
|
864 |
@@@AE!!\XA@<SD1LHEPPYF DB@@@@@Q0AG@D\GP<SD0(U@Q0AG@DB@@@@@@@@@@H^G <UG0PE@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@V@@\Q |
|
865 |
EQ<DAP@@@@@@@@@@@@@@@@D@HRHUB PE@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@AE!! YA@PZ@ @@@@@@@@@@@@@@@@HEAPTEAPHB@@@@@@@@ |
|
866 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 96 128 160 0 96 128 0 0 32 128 160 192 192 224 224 0 160 192 128 128 160 32 192 192 128 160 160 96 192 224 0 192 224 32 192 224 32 160 192 64 224 224 160 192 224 64 192 192 0 128 192 0 192 192 0 128 160 32 64 96 64 96 128 32 96 128 0 64 128 0 64 96 192 192 192 0 32 96 32 128 192 128 192 224 64 192 224 128 192 192 160 224 224 96 192 192 96 160 192 64 160 192]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@F@@@O@@@_ @@?0@A?8@C?<@G?>@O??@_?? @?0@@?0@@?0@@?0@@?0@@?0@@?0@@@@@@@@@') ; yourself); yourself] |
|
867 |
! |
|
868 |
||
4094 | 869 |
upArrowIcon |
870 |
^ self upArrow20x20Icon |
|
871 |
! |
|
872 |
||
3892 | 873 |
upArrowPlusMenu |
874 |
"This resource specification was automatically generated |
|
875 |
by the ImageEditor of ST/X." |
|
876 |
||
877 |
"Do not manually edit this!! If it is corrupted, |
|
878 |
the ImageEditor may not be able to read the specification." |
|
879 |
||
880 |
" |
|
881 |
self upArrowPlusMenu inspect |
|
882 |
ImageEditor openOnClass:self andSelector:#upArrowPlusMenu |
|
883 |
" |
|
884 |
||
885 |
<resource: #image> |
|
886 |
||
887 |
^Icon |
|
4190 | 888 |
constantNamed:#'AbstractFileBrowser class upArrowPlusMenu' |
889 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 890 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
891 |
@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@@@@@@DFA0 DAP@@@@@@@@@@@@@@@@@@@@@@@P$@A0(HA@T@@@@@@@@@@@@@@@@@@@@AB0@@C@4N |
|
892 |
C0PE@@@@@@@@@@@@@@@@@@DF@@@LB@ MD@<DAP@@@@@@@@@@@@@@@PLGDQHHD1LHE@8UA@H@@@@@@@@@@@@AE!!\XA@<SD1LHEPPYF DB@@@@@@@@@@D\@Q0A |
|
893 |
GA4OD1LJEPD\@Q0A@ @@@@@@@@@@@@@@@!!8^C1T_A@T@@@@@@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@@@@@@E @GDQT_A@T@@@@@@@@@@@@@ |
|
894 |
@@@@@@@@@P@!!H!!TJA@T@@@@@@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@@@@@@@QXXFPPDF H@@@@@@@@@@@@@@@@@@@@@@ TEAPTE@ H@@@@@ |
|
895 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B@ HB@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@ @@@@@@@@@@@@@@@@@@ |
|
896 |
@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 96 128 160 0 96 128 0 0 32 128 160 192 192 224 224 0 160 192 128 128 160 32 192 192 128 160 160 96 192 224 0 192 224 32 192 224 32 160 192 64 224 224 160 192 224 64 192 192 0 128 192 0 192 192 0 128 160 32 64 96 64 96 128 32 96 128 0 64 128 0 64 96 192 192 192 0 32 96 32 128 192 128 192 224 64 192 224 128 192 192 160 224 224 96 192 192 96 160 192 64 160 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@F@@@O@@@_ @@?0@A?8@C?<@G?>@O??@_?? @?0@@?0@@?0@@?0@@?0@@?0@@?0@@@A?@@@>@@@\@@@H@@@@') ; yourself); yourself] |
|
897 |
! |
|
898 |
||
899 |
vt100Terminal |
|
900 |
<resource: #programImage> |
|
901 |
||
902 |
^ ToolbarIconLibrary shell20x20Icon |
|
903 |
! ! |
|
904 |
||
905 |
!AbstractFileBrowser class methodsFor:'menu specs'! |
|
906 |
||
907 |
baseBookmarksMenuSpec |
|
908 |
"This resource specification was automatically generated |
|
909 |
by the MenuEditor of ST/X." |
|
910 |
||
911 |
"Do not manually edit this!! If it is corrupted, |
|
912 |
the MenuEditor may not be able to read the specification." |
|
913 |
||
914 |
" |
|
915 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#baseBookmarksMenuSpec |
|
916 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser baseBookmarksMenuSpec)) startUp |
|
917 |
" |
|
918 |
||
919 |
<resource: #menu> |
|
920 |
||
921 |
^ |
|
922 |
#(#Menu |
|
4190 | 923 |
#( |
924 |
#(#MenuItem |
|
925 |
#label: 'Add Bookmark' |
|
926 |
#translateLabel: true |
|
927 |
#value: #addBookmark |
|
928 |
#enabled: #currentFilesHasDirectories |
|
929 |
) |
|
930 |
#(#MenuItem |
|
931 |
#label: 'Remove Bookmark' |
|
932 |
#translateLabel: true |
|
933 |
#value: #removeBookmark |
|
934 |
#enabled: #hasBookmarksToRemove |
|
935 |
) |
|
936 |
) |
|
937 |
nil |
|
938 |
nil |
|
3892 | 939 |
) |
940 |
! |
|
941 |
||
4110 | 942 |
browserMenu |
943 |
"This resource specification was automatically generated |
|
944 |
by the MenuEditor of ST/X." |
|
945 |
||
946 |
"Do not manually edit this!! If it is corrupted, |
|
947 |
the MenuEditor may not be able to read the specification." |
|
948 |
||
949 |
" |
|
950 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#browserMenu |
|
951 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser browserMenu)) startUp |
|
952 |
" |
|
953 |
||
954 |
<resource: #menu> |
|
955 |
||
956 |
^ |
|
957 |
#(#Menu |
|
4201 | 958 |
#( |
959 |
#(#MenuItem |
|
960 |
#label: 'Spawn' |
|
961 |
#itemValue: #doSpawn |
|
962 |
#translateLabel: true |
|
963 |
) |
|
964 |
#(#MenuItem |
|
965 |
#label: 'Settings' |
|
966 |
#translateLabel: true |
|
967 |
#submenu: |
|
968 |
#(#Menu |
|
969 |
#( |
|
970 |
#(#MenuItem |
|
971 |
#label: 'Show' |
|
972 |
#translateLabel: true |
|
973 |
#submenuChannel: #showMenuSpec |
|
974 |
) |
|
975 |
#(#MenuItem |
|
976 |
#label: 'Sort' |
|
977 |
#translateLabel: true |
|
978 |
#submenuChannel: #sortMenu |
|
979 |
) |
|
980 |
#(#MenuItem |
|
981 |
#label: 'Details' |
|
982 |
#translateLabel: true |
|
983 |
#submenuChannel: #viewInContentsBrowserMenu |
|
984 |
) |
|
985 |
#(#MenuItem |
|
986 |
#label: '-' |
|
987 |
) |
|
988 |
#(#MenuItem |
|
989 |
#label: 'Toolbar' |
|
990 |
#translateLabel: true |
|
991 |
#hideMenuOnActivated: false |
|
992 |
#indication: #toolBarVisibleHolder |
|
993 |
) |
|
994 |
#(#MenuItem |
|
995 |
#label: 'Path Entry && Filter' |
|
996 |
#translateLabel: true |
|
997 |
#hideMenuOnActivated: false |
|
998 |
#indication: #filenameEntryFieldVisibleHolder |
|
999 |
) |
|
1000 |
#(#MenuItem |
|
1001 |
#label: '-' |
|
1002 |
) |
|
1003 |
#(#MenuItem |
|
1004 |
#label: 'Save Settings' |
|
1005 |
#itemValue: #saveAspectValues |
|
1006 |
#translateLabel: true |
|
1007 |
) |
|
1008 |
) |
|
1009 |
nil |
|
1010 |
nil |
|
1011 |
) |
|
1012 |
) |
|
1013 |
#(#MenuItem |
|
1014 |
#label: '-' |
|
1015 |
) |
|
1016 |
#(#MenuItem |
|
1017 |
#label: 'Search Files' |
|
1018 |
#itemValue: #doOpenSearchFile |
|
1019 |
#translateLabel: true |
|
1020 |
) |
|
1021 |
#(#MenuItem |
|
1022 |
#label: 'Shell Terminal' |
|
1023 |
#itemValue: #doAddTerminal |
|
1024 |
#translateLabel: true |
|
1025 |
) |
|
1026 |
#(#MenuItem |
|
1027 |
#label: '-' |
|
1028 |
) |
|
1029 |
#(#MenuItem |
|
1030 |
#label: 'Exit' |
|
1031 |
#itemValue: #closeRequest |
|
1032 |
#translateLabel: true |
|
1033 |
) |
|
1034 |
) |
|
1035 |
nil |
|
1036 |
nil |
|
4110 | 1037 |
) |
1038 |
! |
|
1039 |
||
4107 | 1040 |
cvsMenu |
1041 |
"This resource specification was automatically generated |
|
1042 |
by the MenuEditor of ST/X." |
|
1043 |
||
1044 |
"Do not manually edit this!! If it is corrupted, |
|
1045 |
the MenuEditor may not be able to read the specification." |
|
1046 |
||
1047 |
" |
|
1048 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#cvsMenu |
|
1049 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser cvsMenu)) startUp |
|
1050 |
" |
|
1051 |
||
1052 |
<resource: #menu> |
|
1053 |
||
1054 |
^ |
|
1055 |
#(#Menu |
|
4190 | 1056 |
#( |
1057 |
#(#MenuItem |
|
1058 |
#enabled: #hasSelection |
|
1059 |
#label: 'Update selected Files/Directories' |
|
1060 |
#itemValue: #cvsUpdateSelection |
|
1061 |
#translateLabel: true |
|
1062 |
) |
|
1063 |
#(#MenuItem |
|
1064 |
#label: 'Update Directory Local' |
|
1065 |
#itemValue: #cvsUpdateAll |
|
1066 |
#translateLabel: true |
|
1067 |
) |
|
1068 |
#(#MenuItem |
|
1069 |
#label: 'Update Directory Recursive' |
|
1070 |
#itemValue: #cvsUpdateAllRecursive |
|
1071 |
#translateLabel: true |
|
1072 |
) |
|
1073 |
#(#MenuItem |
|
1074 |
#label: '-' |
|
1075 |
) |
|
1076 |
#(#MenuItem |
|
1077 |
#label: 'Commit...' |
|
1078 |
#itemValue: #cvsCommit |
|
1079 |
#translateLabel: true |
|
1080 |
) |
|
1081 |
#(#MenuItem |
|
1082 |
#enabled: #canCvsAddAndCommit |
|
1083 |
#label: 'Add && Commit...' |
|
1084 |
#itemValue: #cvsAddAndCommit |
|
1085 |
#translateLabel: true |
|
1086 |
) |
|
1087 |
#(#MenuItem |
|
1088 |
#label: '-' |
|
1089 |
) |
|
1090 |
#(#MenuItem |
|
1091 |
#enabled: #canRemoveCVSContainer |
|
1092 |
#label: 'Remove File && CVS Container...' |
|
1093 |
#itemValue: #cvsRemoveFileAndCVSContainer |
|
1094 |
#translateLabel: true |
|
1095 |
) |
|
1096 |
) |
|
1097 |
nil |
|
1098 |
nil |
|
4107 | 1099 |
) |
1100 |
! |
|
1101 |
||
3892 | 1102 |
directoryMenu |
1103 |
"This resource specification was automatically generated |
|
1104 |
by the MenuEditor of ST/X." |
|
1105 |
||
1106 |
"Do not manually edit this!! If it is corrupted, |
|
1107 |
the MenuEditor may not be able to read the specification." |
|
1108 |
||
1109 |
" |
|
1110 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#directoryMenu |
|
1111 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser directoryMenu)) startUp |
|
1112 |
" |
|
1113 |
||
1114 |
<resource: #menu> |
|
1115 |
||
1116 |
^ |
|
1117 |
#(#Menu |
|
4190 | 1118 |
#( |
1119 |
#(#MenuItem |
|
1120 |
#label: 'Up' |
|
1121 |
#translateLabel: true |
|
1122 |
#value: #doGoDirectoryUp |
|
1123 |
) |
|
1124 |
#(#MenuItem |
|
1125 |
#label: '-' |
|
1126 |
) |
|
1127 |
#(#MenuItem |
|
1128 |
#label: 'Back' |
|
1129 |
#translateLabel: true |
|
1130 |
#value: #doBack |
|
1131 |
#activeHelpKey: #directoryBack |
|
1132 |
#enabled: #enableBack |
|
1133 |
) |
|
1134 |
#(#MenuItem |
|
1135 |
#label: 'Forward' |
|
1136 |
#translateLabel: true |
|
1137 |
#value: #doForward |
|
1138 |
#activeHelpKey: #directoryBack |
|
1139 |
#enabled: #enableForward |
|
1140 |
) |
|
1141 |
#(#MenuItem |
|
1142 |
#label: '-' |
|
1143 |
) |
|
1144 |
#(#MenuItem |
|
1145 |
#label: 'Default' |
|
1146 |
#translateLabel: true |
|
1147 |
#value: #doGotoDefaultDirectory |
|
1148 |
) |
|
1149 |
#(#MenuItem |
|
1150 |
#label: 'Home' |
|
1151 |
#translateLabel: true |
|
1152 |
#value: #doGotoHomeDirectory |
|
1153 |
) |
|
1154 |
#(#MenuItem |
|
1155 |
#label: 'Visited Directories' |
|
1156 |
#translateLabel: true |
|
1157 |
#submenuChannel: #visitedDirectoriesMenu |
|
1158 |
) |
|
1159 |
#(#MenuItem |
|
1160 |
#label: 'Bookmarks' |
|
1161 |
#translateLabel: true |
|
1162 |
#submenuChannel: #bookmarksMenuSpec |
|
1163 |
) |
|
1164 |
) |
|
1165 |
nil |
|
1166 |
nil |
|
3892 | 1167 |
) |
1168 |
! |
|
1169 |
||
1170 |
editMenu |
|
1171 |
"This resource specification was automatically generated |
|
1172 |
by the MenuEditor of ST/X." |
|
1173 |
||
1174 |
"Do not manually edit this!! If it is corrupted, |
|
1175 |
the MenuEditor may not be able to read the specification." |
|
1176 |
||
1177 |
" |
|
1178 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#editMenu |
|
1179 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser editMenu)) startUp |
|
1180 |
" |
|
1181 |
||
1182 |
<resource: #menu> |
|
1183 |
||
1184 |
^ |
|
1185 |
#(#Menu |
|
4190 | 1186 |
#( |
1187 |
#(#MenuItem |
|
1188 |
#label: 'Copy' |
|
1189 |
#translateLabel: true |
|
1190 |
#value: #copyInDirContentsBrowser |
|
1191 |
#enabled: #hasSelection |
|
1192 |
) |
|
1193 |
#(#MenuItem |
|
1194 |
#label: 'Cut' |
|
1195 |
#translateLabel: true |
|
1196 |
#value: #cutInDirContentsBrowser |
|
1197 |
#enabled: #hasSelection |
|
1198 |
) |
|
1199 |
#(#MenuItem |
|
1200 |
#label: 'Paste' |
|
1201 |
#translateLabel: true |
|
1202 |
#value: #pasteFiles |
|
1203 |
#enabled: #canPaste |
|
1204 |
) |
|
1205 |
#(#MenuItem |
|
1206 |
#label: 'Delete' |
|
1207 |
#translateLabel: true |
|
1208 |
#value: #deleteInDirContentsBrowser |
|
1209 |
#enabled: #hasSelection |
|
1210 |
) |
|
1211 |
#(#MenuItem |
|
1212 |
#label: '-' |
|
1213 |
) |
|
1214 |
#(#MenuItem |
|
1215 |
#label: 'Copy All Filenames' |
|
1216 |
#translateLabel: true |
|
1217 |
#value: #copyFileList |
|
1218 |
#enabled: #fileListIsNotEmpty |
|
1219 |
) |
|
1220 |
#(#MenuItem |
|
1221 |
#label: 'Copy Selected Filenames' |
|
1222 |
#translateLabel: true |
|
1223 |
#value: #copySelectedFilenames |
|
1224 |
#enabled: #hasSelection |
|
1225 |
) |
|
1226 |
) |
|
1227 |
nil |
|
1228 |
nil |
|
3892 | 1229 |
) |
1230 |
! |
|
1231 |
||
1232 |
fileMenu |
|
1233 |
"This resource specification was automatically generated |
|
1234 |
by the MenuEditor of ST/X." |
|
1235 |
||
1236 |
"Do not manually edit this!! If it is corrupted, |
|
1237 |
the MenuEditor may not be able to read the specification." |
|
1238 |
||
1239 |
" |
|
1240 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#fileMenu |
|
1241 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser fileMenu)) startUp |
|
1242 |
" |
|
1243 |
||
1244 |
<resource: #menu> |
|
1245 |
||
1246 |
^ |
|
1247 |
#(#Menu |
|
4190 | 1248 |
#( |
1249 |
#(#MenuItem |
|
1250 |
#label: 'New' |
|
1251 |
#translateLabel: true |
|
1252 |
#submenuChannel: #newMenu |
|
1253 |
) |
|
1254 |
#(#MenuItem |
|
1255 |
#label: 'Rename' |
|
1256 |
#translateLabel: true |
|
1257 |
#value: #renameSelection |
|
1258 |
#enabled: #hasSelection |
|
1259 |
#shortcutKeyCharacter: #Replace |
|
1260 |
) |
|
1261 |
#(#MenuItem |
|
1262 |
#label: '-' |
|
1263 |
) |
|
1264 |
#(#MenuItem |
|
1265 |
#label: 'Open in Text Editor' |
|
1266 |
#translateLabel: true |
|
1267 |
#value: #doShowFileContents |
|
1268 |
) |
|
1269 |
#(#MenuItem |
|
1270 |
#label: 'Properties...' |
|
1271 |
#translateLabel: true |
|
1272 |
#value: #doShowProperties |
|
1273 |
#enabled: #hasSelection |
|
1274 |
) |
|
1275 |
#(#MenuItem |
|
1276 |
#label: '-' |
|
1277 |
#isVisible: #javaSupportLoaded |
|
1278 |
) |
|
1279 |
#(#MenuItem |
|
1280 |
#label: 'File in' |
|
1281 |
#translateLabel: true |
|
1282 |
#value: #fileFileIn |
|
1283 |
#enabled: #hasSelection |
|
1284 |
) |
|
1285 |
#(#MenuItem |
|
1286 |
#label: 'File in to Namespace...' |
|
1287 |
#translateLabel: true |
|
1288 |
#value: #fileFileInToNameSpace |
|
1289 |
#enabled: #hasSelection |
|
1290 |
) |
|
1291 |
#(#MenuItem |
|
1292 |
#label: '-' |
|
1293 |
#isVisible: #javaSupportLoaded |
|
1294 |
) |
|
1295 |
#(#MenuItem |
|
1296 |
#label: 'Add to Java Class Path' |
|
1297 |
#translateLabel: true |
|
1298 |
#isVisible: #javaSupportLoaded |
|
1299 |
#enabled: #canAddToClassPath |
|
1300 |
) |
|
1301 |
#(#MenuItem |
|
1302 |
#label: 'Remove from Java Class Path' |
|
1303 |
#translateLabel: true |
|
1304 |
#isVisible: #javaSupportLoaded |
|
1305 |
#enabled: #canRemoveFromClassPath |
|
1306 |
) |
|
1307 |
#(#MenuItem |
|
1308 |
#label: 'Add to Java Source Path' |
|
1309 |
#translateLabel: true |
|
1310 |
#isVisible: #javaSupportLoaded |
|
1311 |
#enabled: #canAddToSourcePath |
|
1312 |
) |
|
1313 |
#(#MenuItem |
|
1314 |
#label: 'Remove from Java Source Path' |
|
1315 |
#translateLabel: true |
|
1316 |
#isVisible: #javaSupportLoaded |
|
1317 |
#enabled: #canRemoveFromSourcePath |
|
1318 |
) |
|
1319 |
) |
|
1320 |
nil |
|
1321 |
nil |
|
3892 | 1322 |
) |
1323 |
! |
|
1324 |
||
1325 |
newMenu |
|
1326 |
"This resource specification was automatically generated |
|
1327 |
by the MenuEditor of ST/X." |
|
1328 |
||
1329 |
"Do not manually edit this!! If it is corrupted, |
|
1330 |
the MenuEditor may not be able to read the specification." |
|
1331 |
||
1332 |
" |
|
1333 |
MenuEditor new openOnClass:DirectoryTreeBrowser andSelector:#newMenu |
|
1334 |
(Menu new fromLiteralArrayEncoding:(DirectoryTreeBrowser newMenu)) startUp |
|
1335 |
" |
|
1336 |
||
1337 |
<resource: #menu> |
|
1338 |
||
1339 |
^ |
|
1340 |
#(#Menu |
|
4190 | 1341 |
#( |
1342 |
#(#MenuItem |
|
1343 |
#label: 'Directory...' |
|
1344 |
#translateLabel: true |
|
1345 |
#value: #newDirectory |
|
1346 |
) |
|
1347 |
#(#MenuItem |
|
1348 |
#label: 'File...' |
|
1349 |
#translateLabel: true |
|
1350 |
#value: #newFile |
|
1351 |
) |
|
1352 |
#(#MenuItem |
|
1353 |
#label: 'Hard Link...' |
|
1354 |
#translateLabel: true |
|
1355 |
#isVisible: #systemIsUnix |
|
1356 |
#value: #newHardLink |
|
1357 |
) |
|
1358 |
#(#MenuItem |
|
1359 |
#label: 'Symbolic Link...' |
|
1360 |
#translateLabel: true |
|
1361 |
#isVisible: #systemIsUnix |
|
1362 |
#value: #newSoftLink |
|
1363 |
) |
|
1364 |
) |
|
1365 |
nil |
|
1366 |
nil |
|
3892 | 1367 |
) |
3906 | 1368 |
! |
1369 |
||
4201 | 1370 |
showMenuSpec |
1371 |
"This resource specification was automatically generated |
|
1372 |
by the MenuEditor of ST/X." |
|
1373 |
||
1374 |
"Do not manually edit this!! If it is corrupted, |
|
1375 |
the MenuEditor may not be able to read the specification." |
|
1376 |
||
1377 |
" |
|
1378 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#showMenuSpec |
|
1379 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser showMenuSpec)) startUp |
|
1380 |
" |
|
1381 |
||
1382 |
<resource: #menu> |
|
1383 |
||
1384 |
^ |
|
1385 |
#(#Menu |
|
1386 |
#( |
|
1387 |
#(#MenuItem |
|
1388 |
#label: 'Hidden Files' |
|
1389 |
#translateLabel: true |
|
1390 |
#indication: #showHiddenFiles |
|
1391 |
) |
|
1392 |
#(#MenuItem |
|
1393 |
#label: '-' |
|
1394 |
) |
|
1395 |
#(#MenuItem |
|
1396 |
#label: 'Directory Tree' |
|
1397 |
#translateLabel: true |
|
1398 |
#indication: #showDirectoryTree |
|
1399 |
) |
|
1400 |
#(#MenuItem |
|
1401 |
#label: 'Regular Files in TreeView (Left)' |
|
1402 |
#translateLabel: true |
|
1403 |
#indication: #viewFilesInDirectoryTree |
|
1404 |
) |
|
1405 |
#(#MenuItem |
|
1406 |
#label: 'Directories in ContentsView (Right)' |
|
1407 |
#translateLabel: true |
|
1408 |
#indication: #viewDirsInContentsBrowser |
|
1409 |
) |
|
1410 |
#(#MenuItem |
|
1411 |
#enabled: #enableViewNoteBookApplication |
|
1412 |
#label: 'File Applications' |
|
1413 |
#translateLabel: true |
|
1414 |
#indication: #viewNoteBookApplicationHolder |
|
1415 |
) |
|
1416 |
) |
|
1417 |
nil |
|
1418 |
nil |
|
1419 |
) |
|
1420 |
! |
|
1421 |
||
3906 | 1422 |
sortMenu |
1423 |
"This resource specification was automatically generated |
|
1424 |
by the MenuEditor of ST/X." |
|
1425 |
||
1426 |
"Do not manually edit this!! If it is corrupted, |
|
1427 |
the MenuEditor may not be able to read the specification." |
|
1428 |
||
1429 |
" |
|
3907 | 1430 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#sortMenu |
1431 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser sortMenu)) startUp |
|
3906 | 1432 |
" |
1433 |
||
1434 |
<resource: #menu> |
|
1435 |
||
1436 |
^ |
|
1437 |
#(#Menu |
|
4190 | 1438 |
#( |
1439 |
#(#MenuItem |
|
1440 |
#label: 'By Filename' |
|
1441 |
#translateLabel: true |
|
1442 |
#hideMenuOnActivated: false |
|
1443 |
#choice: #sortBlockProperty |
|
1444 |
#choiceValue: #baseName |
|
1445 |
) |
|
1446 |
#(#MenuItem |
|
1447 |
#label: 'By Type' |
|
1448 |
#translateLabel: true |
|
1449 |
#hideMenuOnActivated: false |
|
1450 |
#choice: #sortBlockProperty |
|
1451 |
#choiceValue: #suffix |
|
1452 |
) |
|
1453 |
#(#MenuItem |
|
1454 |
#label: 'By Permissions' |
|
1455 |
#translateLabel: true |
|
1456 |
#hideMenuOnActivated: false |
|
1457 |
#choice: #sortBlockProperty |
|
1458 |
#choiceValue: #permissions |
|
1459 |
) |
|
1460 |
#(#MenuItem |
|
1461 |
#label: 'By Owner' |
|
1462 |
#translateLabel: true |
|
1463 |
#isVisible: #viewOwner |
|
1464 |
#hideMenuOnActivated: false |
|
1465 |
#choice: #sortBlockProperty |
|
1466 |
#choiceValue: #owner |
|
1467 |
) |
|
1468 |
#(#MenuItem |
|
1469 |
#label: 'By Group' |
|
1470 |
#translateLabel: true |
|
1471 |
#isVisible: #viewOwner |
|
1472 |
#hideMenuOnActivated: false |
|
1473 |
#choice: #sortBlockProperty |
|
1474 |
#choiceValue: #group |
|
1475 |
) |
|
1476 |
#(#MenuItem |
|
1477 |
#label: 'By Size' |
|
1478 |
#translateLabel: true |
|
1479 |
#hideMenuOnActivated: false |
|
1480 |
#choice: #sortBlockProperty |
|
1481 |
#choiceValue: #fileSize |
|
1482 |
) |
|
1483 |
#(#MenuItem |
|
1484 |
#label: 'By Date && Time' |
|
1485 |
#translateLabel: true |
|
1486 |
#hideMenuOnActivated: false |
|
1487 |
#choice: #sortBlockProperty |
|
1488 |
#choiceValue: #modificationTime |
|
1489 |
) |
|
1490 |
#(#MenuItem |
|
1491 |
#label: '-' |
|
1492 |
) |
|
1493 |
#(#MenuItem |
|
1494 |
#label: 'Ignore Case in Sort' |
|
1495 |
#translateLabel: true |
|
1496 |
#hideMenuOnActivated: false |
|
1497 |
#indication: #sortCaseless |
|
1498 |
) |
|
1499 |
#(#MenuItem |
|
1500 |
#label: 'Directories before Files' |
|
1501 |
#translateLabel: true |
|
1502 |
#hideMenuOnActivated: false |
|
1503 |
#indication: #sortDirectoriesBeforeFiles |
|
1504 |
) |
|
1505 |
) |
|
1506 |
nil |
|
1507 |
nil |
|
3906 | 1508 |
) |
4018 | 1509 |
! |
1510 |
||
4164
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1511 |
toolsMenuSpec |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1512 |
"This resource specification was automatically generated |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1513 |
by the MenuEditor of ST/X." |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1514 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1515 |
"Do not manually edit this!! If it is corrupted, |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1516 |
the MenuEditor may not be able to read the specification." |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1517 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1518 |
" |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1519 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolsMenuSpec |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1520 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolsMenuSpec)) startUp |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1521 |
" |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1522 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1523 |
<resource: #menu> |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1524 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1525 |
^ |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1526 |
#(#Menu |
4190 | 1527 |
#( |
1528 |
#(#MenuItem |
|
1529 |
#label: 'Execute Command...' |
|
1530 |
#translateLabel: true |
|
1531 |
#value: #doExecuteCommand |
|
1532 |
) |
|
1533 |
#(#MenuItem |
|
1534 |
#label: 'Shell Terminal' |
|
1535 |
#translateLabel: true |
|
1536 |
#isVisible: #canDoTerminalAndSystemIsUnix |
|
1537 |
#value: #openTerminal |
|
1538 |
#enabled: #canDoTerminal |
|
1539 |
) |
|
1540 |
#(#MenuItem |
|
1541 |
#label: 'DOS Terminal' |
|
1542 |
#translateLabel: true |
|
1543 |
#isVisible: #canDoTerminalAndSystemIsDOS |
|
1544 |
#value: #openTerminal |
|
1545 |
#enabled: #canDoTerminal |
|
1546 |
) |
|
1547 |
#(#MenuItem |
|
1548 |
#label: '-' |
|
1549 |
) |
|
1550 |
#(#MenuItem |
|
1551 |
#label: 'Changes Browser' |
|
1552 |
#translateLabel: true |
|
1553 |
#value: #openChangesBrowser |
|
1554 |
#enabled: #hasSelection |
|
1555 |
) |
|
1556 |
#(#MenuItem |
|
1557 |
#label: 'Snapshot Image Browser' |
|
1558 |
#translateLabel: true |
|
1559 |
#value: #openSnapshotImageBrowser |
|
1560 |
#enabled: #hasSnapshotSelection |
|
1561 |
) |
|
1562 |
#(#MenuItem |
|
1563 |
#label: 'Create Smalltalk Project' |
|
1564 |
#translateLabel: true |
|
1565 |
#value: #createProjectAndOpenProjectBrowser |
|
1566 |
#enabled: #canCreateNewProject |
|
1567 |
) |
|
1568 |
#(#MenuItem |
|
1569 |
#label: 'Install Autoloaded' |
|
1570 |
#translateLabel: true |
|
1571 |
#value: #readAbbrevFile |
|
1572 |
#enabled: #canReadAbbrevFile |
|
1573 |
) |
|
1574 |
#(#MenuItem |
|
1575 |
#label: 'Install all as Autoloaded' |
|
1576 |
#translateLabel: true |
|
1577 |
#value: #installAllAsAutoloaded |
|
1578 |
#enabled: #anySTFilesPresent |
|
1579 |
) |
|
1580 |
#(#MenuItem |
|
1581 |
#label: 'Editor' |
|
1582 |
#translateLabel: true |
|
1583 |
#value: #openEditor |
|
1584 |
#enabled: #hasSelection |
|
1585 |
) |
|
1586 |
#(#MenuItem |
|
1587 |
#label: 'HTML Reader' |
|
1588 |
#translateLabel: true |
|
1589 |
#value: #openHTMLReader |
|
1590 |
#enabled: #hasSelection |
|
1591 |
) |
|
1592 |
#(#MenuItem |
|
1593 |
#label: 'ASN1 Browser' |
|
1594 |
#translateLabel: true |
|
1595 |
#isVisible: #hasASN1 |
|
1596 |
#value: #openASN1Browser |
|
1597 |
#enabled: #hasASN1AndSelection |
|
1598 |
) |
|
1599 |
#(#MenuItem |
|
1600 |
#label: 'C Browser' |
|
1601 |
#translateLabel: true |
|
1602 |
#isVisible: #hasCBrowser |
|
1603 |
#value: #openCBrowser |
|
1604 |
#enabled: #hasCBrowser |
|
1605 |
) |
|
1606 |
#(#MenuItem |
|
1607 |
#label: 'Applet Viewer' |
|
1608 |
#translateLabel: true |
|
1609 |
#isVisible: #hasJava |
|
1610 |
#value: #openAppletViewer |
|
1611 |
#enabled: #hasJavaAndSelection |
|
1612 |
) |
|
1613 |
#(#MenuItem |
|
1614 |
#label: 'Image Inspector' |
|
1615 |
#translateLabel: true |
|
1616 |
#value: #openImageInspector |
|
1617 |
#enabled: #hasSelection |
|
1618 |
) |
|
1619 |
#(#MenuItem |
|
1620 |
#label: 'Image Preview' |
|
1621 |
#translateLabel: true |
|
1622 |
#value: #openImagePreview |
|
1623 |
#enabled: #hasSelection |
|
1624 |
) |
|
1625 |
#(#MenuItem |
|
1626 |
#label: 'Image Editor' |
|
1627 |
#translateLabel: true |
|
1628 |
#value: #openImageEditor |
|
1629 |
#enabled: #hasSelection |
|
1630 |
) |
|
1631 |
#(#MenuItem |
|
1632 |
#label: 'MP3 Player' |
|
1633 |
#translateLabel: true |
|
1634 |
#isVisible: #hasMP3Player |
|
1635 |
#value: #openMP3Player |
|
1636 |
#enabled: #hasMP3PlayerAndSelection |
|
1637 |
) |
|
1638 |
#(#MenuItem |
|
1639 |
#label: 'ZipFile Tool' |
|
1640 |
#translateLabel: true |
|
1641 |
#value: #openZipTool |
|
1642 |
#enabled: #hasZipFileSelected |
|
1643 |
) |
|
1644 |
#(#MenuItem |
|
1645 |
#label: 'Slide Show' |
|
1646 |
#translateLabel: true |
|
1647 |
#isVisible: #hasSlideShow |
|
1648 |
#value: #openSlideShow |
|
1649 |
#enabled: #currentFilesAreInSameDirectory |
|
1650 |
) |
|
1651 |
#(#MenuItem |
|
1652 |
#label: 'File Differences...' |
|
1653 |
#translateLabel: true |
|
1654 |
#value: #openDiffView |
|
1655 |
#enabled: #hasSelection |
|
1656 |
) |
|
1657 |
#(#MenuItem |
|
1658 |
#label: 'Find Duplicate Files' |
|
1659 |
#translateLabel: true |
|
1660 |
#value: #fileFindDuplicates |
|
1661 |
) |
|
1662 |
#(#MenuItem |
|
1663 |
#label: 'Find All Duplicate Files (Recursive)' |
|
1664 |
#translateLabel: true |
|
1665 |
#value: #fileFindAllDuplicates |
|
1666 |
#enabled: #hasSelection |
|
1667 |
) |
|
1668 |
#(#MenuItem |
|
1669 |
#label: 'Find a File...' |
|
1670 |
#translateLabel: true |
|
1671 |
#value: #fileFindFile |
|
1672 |
) |
|
1673 |
#(#MenuItem |
|
1674 |
#label: 'Hex Dump' |
|
1675 |
#translateLabel: true |
|
1676 |
#value: #fileHexDump |
|
1677 |
#enabled: #hasSelection |
|
1678 |
) |
|
1679 |
) |
|
1680 |
nil |
|
1681 |
nil |
|
4164
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1682 |
) |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1683 |
! |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1684 |
|
4018 | 1685 |
viewDetailsMenuSpec |
1686 |
"This resource specification was automatically generated |
|
1687 |
by the MenuEditor of ST/X." |
|
1688 |
||
1689 |
"Do not manually edit this!! If it is corrupted, |
|
1690 |
the MenuEditor may not be able to read the specification." |
|
1691 |
||
1692 |
" |
|
1693 |
MenuEditor new openOnClass:DirectoryContentsBrowser andSelector:#viewBrowserMenu |
|
1694 |
(Menu new fromLiteralArrayEncoding:(DirectoryContentsBrowser viewBrowserMenu)) startUp |
|
1695 |
" |
|
1696 |
||
1697 |
<resource: #menu> |
|
1698 |
||
1699 |
^ |
|
1700 |
#(#Menu |
|
4190 | 1701 |
#( |
1702 |
#(#MenuItem |
|
1703 |
#label: 'Suffix' |
|
1704 |
#translateLabel: true |
|
1705 |
#hideMenuOnActivated: false |
|
1706 |
#enabled: #viewDetails |
|
1707 |
#indication: #viewType |
|
1708 |
) |
|
1709 |
#(#MenuItem |
|
1710 |
#label: 'Permissions' |
|
1711 |
#translateLabel: true |
|
1712 |
#hideMenuOnActivated: false |
|
1713 |
#enabled: #viewDetails |
|
1714 |
#indication: #viewPermissions |
|
1715 |
) |
|
1716 |
#(#MenuItem |
|
1717 |
#label: 'Owner' |
|
1718 |
#translateLabel: true |
|
1719 |
#hideMenuOnActivated: false |
|
1720 |
#enabled: #viewDetails |
|
1721 |
#indication: #viewOwner |
|
1722 |
) |
|
1723 |
#(#MenuItem |
|
1724 |
#label: 'Group' |
|
1725 |
#translateLabel: true |
|
1726 |
#hideMenuOnActivated: false |
|
1727 |
#enabled: #viewDetails |
|
1728 |
#indication: #viewGroup |
|
1729 |
) |
|
1730 |
#(#MenuItem |
|
1731 |
#label: 'Size' |
|
1732 |
#translateLabel: true |
|
1733 |
#hideMenuOnActivated: false |
|
1734 |
#enabled: #viewDetails |
|
1735 |
#indication: #viewSize |
|
1736 |
) |
|
1737 |
#(#MenuItem |
|
1738 |
#label: 'Date && Time' |
|
1739 |
#translateLabel: true |
|
1740 |
#hideMenuOnActivated: false |
|
1741 |
#enabled: #viewDetails |
|
1742 |
#indication: #viewTime |
|
1743 |
) |
|
1744 |
#(#MenuItem |
|
1745 |
#label: 'File Info' |
|
1746 |
#translateLabel: true |
|
1747 |
#hideMenuOnActivated: false |
|
1748 |
#enabled: #viewDetails |
|
1749 |
#indication: #viewDescription |
|
1750 |
) |
|
1751 |
#(#MenuItem |
|
1752 |
#label: 'Preview' |
|
1753 |
#translateLabel: true |
|
1754 |
#hideMenuOnActivated: false |
|
1755 |
#enabled: #viewDetails |
|
1756 |
#indication: #viewPreview |
|
1757 |
) |
|
1758 |
#(#MenuItem |
|
1759 |
#label: '-' |
|
1760 |
) |
|
1761 |
#(#MenuItem |
|
1762 |
#label: 'Hidden Files' |
|
1763 |
#translateLabel: true |
|
1764 |
#indication: #showHiddenFiles |
|
1765 |
) |
|
1766 |
) |
|
1767 |
nil |
|
1768 |
nil |
|
4018 | 1769 |
) |
3892 | 1770 |
! ! |
1771 |
||
1772 |
!AbstractFileBrowser class methodsFor:'misc'! |
|
1773 |
||
1774 |
newLock |
|
1775 |
^ CodeExecutionLock new |
|
1776 |
! ! |
|
1777 |
||
1778 |
!AbstractFileBrowser methodsFor:'actions'! |
|
1779 |
||
1780 |
askForCommandFor:fileName thenDo:aBlock |
|
1781 |
"setup and launch a querybox to ask for unix command. |
|
1782 |
Then evaluate aBlock passing the command-string as argument." |
|
1783 |
||
1784 |
|box osName| |
|
1785 |
||
1786 |
osName := OperatingSystem platformName. |
|
1787 |
||
1788 |
box := FilenameEnterBox |
|
4190 | 1789 |
title:(resources string:'Execute %1 command:' with:osName) |
1790 |
okText:(resources string:'Execute') |
|
1791 |
action:aBlock. |
|
3892 | 1792 |
|
1793 |
fileName notNil ifTrue:[ |
|
4190 | 1794 |
self initialCommandFor:fileName into:box. |
3892 | 1795 |
]. |
1796 |
box directory:(self getDirWithoutFileName:fileName). |
|
1797 |
box showAtPointer. |
|
1798 |
box destroy. |
|
1799 |
||
1800 |
"Modified: / 7.9.1995 / 10:31:54 / claus" |
|
1801 |
"Modified: / 16.9.1997 / 15:35:10 / stefan" |
|
1802 |
"Modified: / 14.8.1998 / 14:12:52 / cg" |
|
1803 |
! |
|
1804 |
||
1805 |
changeFileBrowserTitleTo:aString |
|
1806 |
||
1807 |
self application:#FileBrowserV2 |
|
4190 | 1808 |
do:#changeFileBrowserTitleTo: |
1809 |
withArg:aString |
|
3892 | 1810 |
! |
1811 |
||
1812 |
copyFileList |
|
1813 |
||
1814 |
| fileList stream| |
|
1815 |
fileList := self application:#DirectoryContentsBrowser do:#descriptions. |
|
1816 |
stream := WriteStream on:''. |
|
1817 |
fileList do:[: item | |
|
4190 | 1818 |
stream nextPutAll:(item fileName asString). |
1819 |
stream cr. |
|
3892 | 1820 |
]. |
1821 |
self window setTextSelection:stream contents. |
|
1822 |
stream close. |
|
1823 |
! |
|
1824 |
||
1825 |
copySelectedFilenames |
|
1826 |
||
1827 |
| fileList stream| |
|
3982 | 1828 |
fileList := self application:#DirectoryContentsBrowser do:#selectedFiles. |
3892 | 1829 |
fileList isEmpty ifTrue:[^ self]. |
1830 |
stream := WriteStream on:''. |
|
1831 |
fileList do:[: file | |
|
4190 | 1832 |
stream nextPutAll:(file asString). |
1833 |
stream cr. |
|
3892 | 1834 |
]. |
1835 |
self window setTextSelection:stream contents. |
|
1836 |
stream close. |
|
1837 |
! |
|
1838 |
||
1839 |
doAddTerminal |
|
1840 |
||
1841 |
| item dir directories| |
|
1842 |
||
1843 |
directories := self currentDirectories value. |
|
1844 |
||
1845 |
directories isEmpty ifTrue:[ |
|
4190 | 1846 |
dir := Filename homeDirectory |
3892 | 1847 |
] ifFalse:[ |
4190 | 1848 |
dir := directories first. |
3892 | 1849 |
]. |
1850 |
||
3982 | 1851 |
item := (DirectoryContentsBrowser itemClass fileName:dir). |
3892 | 1852 |
self fileApplicationDo:#openTerminalApplication: withArg:item. |
1853 |
! |
|
1854 |
||
1855 |
doExecuteCommand |
|
1856 |
||
1857 |
| action fileName| |
|
3982 | 1858 |
fileName := self firstSelectedFile. |
3892 | 1859 |
action := [:command | |
4190 | 1860 |
self addToCommandHistory:command for:fileName. |
1861 |
self executeCommand:command. |
|
1862 |
]. |
|
3892 | 1863 |
self askForCommandFor:fileName thenDo:action |
1864 |
! |
|
1865 |
||
1866 |
doGoDirectoryUp |
|
3906 | 1867 |
| upDir directories rootInTreeView| |
3892 | 1868 |
|
1869 |
self enableDirectoryUp value ifFalse:[ ^ self]. |
|
1870 |
self currentFilesAreInSameDirectory ifTrue:[ |
|
4190 | 1871 |
directories := self currentDirectories value. |
1872 |
upDir := directories first directory. |
|
3906 | 1873 |
] ifFalse:[ |
4190 | 1874 |
rootInTreeView := self application:#DirectoryTreeBrowser do:#rootHolder. |
1875 |
upDir := rootInTreeView value asFilename directory. |
|
3892 | 1876 |
]. |
3906 | 1877 |
self currentFileNameHolder value:(OrderedCollection with:upDir). |
3892 | 1878 |
! |
1879 |
||
1880 |
doGotoDefaultDirectory |
|
1881 |
self gotoFile:(Filename defaultDirectory). |
|
1882 |
! |
|
1883 |
||
1884 |
doGotoHomeDirectory |
|
1885 |
||
1886 |
| home | |
|
1887 |
||
1888 |
home := Filename homeDirectory. |
|
1889 |
self gotoFile:home. |
|
1890 |
! |
|
1891 |
||
1892 |
doOpenSearchFile |
|
1893 |
||
1894 |
|item files| |
|
1895 |
||
4034 | 1896 |
files := self currentFileNameHolder value. |
1897 |
files notEmpty ifTrue:[ |
|
4190 | 1898 |
item := DirectoryContentsBrowser itemClass fileName:(files first). |
4034 | 1899 |
] ifFalse:[ |
4190 | 1900 |
item := DirectoryContentsBrowser itemClass fileName:(Filename homeDirectory asAbsoluteFilename). |
3892 | 1901 |
]. |
1902 |
self openSearchFileOn:item. |
|
1903 |
! |
|
1904 |
||
1905 |
doShowFileContents |
|
1906 |
||
1907 |
^ self application:#DirectoryContentsBrowser do:#doShowFileContents. |
|
1908 |
! |
|
1909 |
||
1910 |
doShowProperties |
|
1911 |
||
1912 |
"show long stat (file)-info" |
|
1913 |
||
1914 |
self fileGetInfo:true |
|
1915 |
! |
|
1916 |
||
1917 |
fileApplicationDo:selector |
|
1918 |
||
1919 |
^ self application:#FileApplicationNoteBook do:selector |
|
1920 |
! |
|
1921 |
||
1922 |
fileApplicationDo:selector withArg:arg |
|
1923 |
^ self application:#FileApplicationNoteBook do:selector withArg:arg |
|
1924 |
! |
|
1925 |
||
1926 |
fileGetInfo:longInfo |
|
1927 |
"get info on selected file - show it in a box" |
|
1928 |
||
1929 |
|string box updater| |
|
1930 |
||
3906 | 1931 |
string := self getFileInfoStringForFirstSelectedFile:longInfo. |
3892 | 1932 |
string notNil ifTrue:[ |
4190 | 1933 |
box := InfoBox title:string. |
1934 |
updater := [ |
|
1935 |
[true] whileTrue:[ |
|
1936 |
Delay waitForSeconds:2. |
|
1937 |
string := self getFileInfoStringForFirstSelectedFile:longInfo. |
|
1938 |
string isNil ifTrue:[ ^ self]. |
|
1939 |
box title:string |
|
1940 |
] |
|
1941 |
] fork. |
|
1942 |
box showAtPointer. |
|
1943 |
updater terminate. |
|
1944 |
box destroy |
|
3892 | 1945 |
] |
1946 |
! |
|
1947 |
||
1948 |
gotoFile:aFilename |
|
1949 |
||
3964 | 1950 |
" select only if the file is not already in selection" |
1951 |
| currentSel | |
|
1952 |
||
1953 |
currentSel := self currentFileNameHolder value. |
|
1954 |
((currentSel findFirst:[:aFile| aFile = aFilename]) == 0) ifTrue:[ |
|
4190 | 1955 |
self currentFileNameHolder value:(OrderedCollection with:(aFilename asAbsoluteFilename)). |
3964 | 1956 |
]. |
3892 | 1957 |
! |
1958 |
||
1959 |
openApplByFileItem:aItem |
|
1960 |
||
4148 | 1961 |
^ self fileApplicationDo:#openApplByFileItem: withArg:aItem |
3892 | 1962 |
! |
1963 |
||
1964 |
openCommandResultApplication |
|
1965 |
||
1966 |
^ self fileApplicationDo:#openCommandResultApplication |
|
1967 |
! |
|
1968 |
||
1969 |
openSearchFileOn:aItem |
|
1970 |
||
1971 |
^ self fileApplicationDo:#openSearchFileOn: withArg:aItem |
|
1972 |
! |
|
1973 |
||
1974 |
openTextEditorOn:aItem |
|
1975 |
||
1976 |
^ self fileApplicationDo:#openTextEditorOn: withArg:aItem |
|
1977 |
! |
|
1978 |
||
1979 |
updateAndSelect:aColOfFiles |
|
1980 |
||
1981 |
self application:#DirectoryContentsBrowser do:#doUpdate. |
|
1982 |
self application:#DirectoryTreeBrowser do:#doUpdate. |
|
1983 |
||
1984 |
aColOfFiles notNil ifTrue:[ self currentFileNameHolder value:aColOfFiles ]. |
|
1985 |
! |
|
1986 |
||
1987 |
updateCurrentDirectory |
|
1988 |
||
1989 |
self updateAndSelect:nil |
|
1990 |
! ! |
|
1991 |
||
1992 |
!AbstractFileBrowser methodsFor:'actions bookmarks'! |
|
1993 |
||
1994 |
addBookmark |
|
1995 |
||
1996 |
|directories| |
|
1997 |
||
1998 |
self currentFilesAreInSameDirectory ifFalse:[^ self]. |
|
1999 |
directories := self currentDirectories value. |
|
2000 |
self addBookmark:directories. |
|
2001 |
! |
|
2002 |
||
2003 |
addBookmark:aColOfDirectories |
|
2004 |
|idx bookmarks| |
|
2005 |
||
2006 |
aColOfDirectories do:[ : path | |
|
4190 | 2007 |
bookmarks := self class directoryBookmarks. |
2008 |
idx := bookmarks indexOf:path. |
|
2009 |
idx == 0 ifTrue:[ |
|
2010 |
bookmarks addLast:path. |
|
2011 |
]. |
|
3892 | 2012 |
]. |
2013 |
! |
|
2014 |
||
2015 |
hasBookmarks |
|
2016 |
^ self class directoryBookmarks size > 0 |
|
2017 |
! |
|
2018 |
||
2019 |
hasBookmarksToRemove |
|
2020 |
||
2021 |
|bookmarks directories| |
|
2022 |
||
3982 | 2023 |
directories := self currentSelectedDirectories. |
3892 | 2024 |
bookmarks := self class directoryBookmarks. |
2025 |
^ (bookmarks size > 0 and:[directories notEmpty]) |
|
2026 |
! |
|
2027 |
||
2028 |
removeBookmark |
|
2029 |
||
2030 |
|bookmarks directories| |
|
2031 |
||
2032 |
bookmarks := self class directoryBookmarks. |
|
2033 |
bookmarks isNil ifTrue:[ ^ self]. |
|
3982 | 2034 |
directories := self currentSelectedDirectories. |
3892 | 2035 |
directories isEmpty ifTrue:[^ self]. |
2036 |
directories do:[:dir| |
|
4190 | 2037 |
bookmarks remove:dir ifAbsent:nil. |
3892 | 2038 |
]. |
2039 |
! ! |
|
2040 |
||
2041 |
!AbstractFileBrowser methodsFor:'actions history'! |
|
2042 |
||
2043 |
addToCommandHistory:aCommandString for:aFilename |
|
2044 |
|cmd suffix cmdHist| |
|
2045 |
||
2046 |
cmdHist := self class commandHistory. |
|
2047 |
(aCommandString notNil and:[aCommandString notEmpty]) ifTrue:[ |
|
4190 | 2048 |
cmdHist notNil ifTrue:[ |
2049 |
cmdHist addFirst:aCommandString. |
|
2050 |
cmdHist size > self class commandHistorySize ifTrue:[ |
|
2051 |
cmdHist removeLast |
|
2052 |
] |
|
2053 |
]. |
|
2054 |
aFilename notNil ifTrue:[ |
|
2055 |
cmd := aCommandString copyTo:(aCommandString indexOf:Character space ifAbsent:[aCommandString size + 1])-1. |
|
2056 |
DefaultCommandPerSuffix isNil ifTrue:[ |
|
2057 |
DefaultCommandPerSuffix := Dictionary new. |
|
2058 |
]. |
|
2059 |
suffix := aFilename asFilename suffix. |
|
2060 |
suffix notNil ifTrue:[ |
|
2061 |
DefaultCommandPerSuffix at:suffix put:cmd. |
|
2062 |
] |
|
2063 |
] |
|
3892 | 2064 |
] |
2065 |
! |
|
2066 |
||
2067 |
doBack |
|
2068 |
||
4022 | 2069 |
| fileName| |
2070 |
||
2071 |
fileName := self dirHistory goBack. |
|
3892 | 2072 |
fileName notNil ifTrue:[ |
4190 | 2073 |
self gotoFile:(fileName asFilename). |
3892 | 2074 |
] |
2075 |
! |
|
2076 |
||
2077 |
doForward |
|
2078 |
||
3964 | 2079 |
| fileName| |
2080 |
||
3952 | 2081 |
fileName := self dirHistory goForward. |
3892 | 2082 |
fileName notNil ifTrue:[ |
4190 | 2083 |
self gotoFile:(fileName asFilename). |
4022 | 2084 |
] ifFalse:[ |
4190 | 2085 |
self enableForward value:false. |
4022 | 2086 |
|
2087 |
]. |
|
3892 | 2088 |
! ! |
2089 |
||
4101 | 2090 |
!AbstractFileBrowser methodsFor:'actions-app-common'! |
2091 |
||
2092 |
openApplForFile:aFilename |
|
4148 | 2093 |
^ self openApplByFileItem:(DirectoryContentsBrowser itemClass fileName:aFilename). |
4101 | 2094 |
! ! |
2095 |
||
3892 | 2096 |
!AbstractFileBrowser methodsFor:'applications'! |
2097 |
||
2098 |
application:aApplication do:aMethod |
|
2099 |
||
4191 | 2100 |
" perform a Method for a application " |
3892 | 2101 |
|appl| |
2102 |
||
2103 |
appl := self applications at:aApplication ifAbsent:nil. |
|
2104 |
appl notNil ifTrue:[ |
|
4190 | 2105 |
^ appl perform:aMethod. |
3892 | 2106 |
]. |
2107 |
^ nil. |
|
2108 |
! |
|
2109 |
||
2110 |
application:aApplication do:aMethod withArg:arg |
|
2111 |
|appl| |
|
2112 |
||
2113 |
appl := self applications at:aApplication ifAbsent:nil. |
|
2114 |
appl notNil ifTrue:[ |
|
4190 | 2115 |
^ appl perform:aMethod with:arg |
3892 | 2116 |
]. |
2117 |
^ nil |
|
2118 |
! |
|
2119 |
||
2120 |
application:aApplication do:aMethod withArg:arg1 withArg:arg2 |
|
2121 |
|appl| |
|
2122 |
||
2123 |
appl := self applications at:aApplication ifAbsent:nil. |
|
2124 |
appl notNil ifTrue:[ |
|
4190 | 2125 |
(arg1 notNil and:[arg2 notNil]) ifTrue:[ |
2126 |
^ appl perform:aMethod with:arg1 with:arg2 |
|
2127 |
] |
|
3892 | 2128 |
]. |
2129 |
^ nil |
|
4004 | 2130 |
! |
2131 |
||
2132 |
directoryContentsBrowser |
|
2133 |
^ self applications at:#DirectoryContentsBrowser ifAbsent:nil. |
|
3892 | 2134 |
! ! |
2135 |
||
2136 |
!AbstractFileBrowser methodsFor:'aspects'! |
|
2137 |
||
2138 |
applications |
|
2139 |
"returns the list of registered applications |
|
2140 |
" |
|
2141 |
^ aspects at:#applications |
|
2142 |
! |
|
2143 |
||
2144 |
backgroundProcesses |
|
2145 |
||
2146 |
^ self aspectFor:#backgroundProcesses ifAbsent:[List new] |
|
2147 |
! |
|
2148 |
||
2149 |
currentDirectories |
|
2150 |
||
2151 |
" returns a Ordered Collection of all directories currently selected |
|
2152 |
if only a file is selected currentDirectories holds the directory of the file |
|
2153 |
" |
|
2154 |
||
2155 |
^ self aspectFor:#currentDirectories ifAbsent:[ (OrderedCollection new) asValue ]. |
|
2156 |
! |
|
2157 |
||
2158 |
currentFileNameHolder |
|
2159 |
||
2160 |
" returns a OrderedCollection of all files that are selected |
|
2161 |
if no file but a directory is selected it contains the directories |
|
2162 |
in contrast to currentDirectories wich have only the directories |
|
2163 |
" |
|
2164 |
||
2165 |
^ self aspectFor:#currentFileNameHolder ifAbsent:[(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) asValue] |
|
2166 |
! |
|
2167 |
||
2168 |
enableDirectoryUp |
|
2169 |
||
2170 |
^ self aspectFor:#enableDirectoryUp ifAbsent:[false asValue] |
|
2171 |
! |
|
2172 |
||
2173 |
enableHome |
|
2174 |
||
2175 |
^ self aspectFor:#enableHome ifAbsent:[ true asValue ]. |
|
2176 |
! |
|
2177 |
||
2178 |
enableViewNoteBookApplication |
|
2179 |
||
2180 |
^ self aspectFor:#enableViewNoteBookApplication ifAbsent:[false asValue] |
|
2181 |
! |
|
2182 |
||
2183 |
hasSelection |
|
2184 |
||
2185 |
^ self aspectFor:#hasSelection ifAbsent:[ false asValue ]. |
|
2186 |
! |
|
2187 |
||
2188 |
notifyChannel |
|
2189 |
||
2190 |
^ self aspectFor:#notifyChannel ifAbsent:['' asValue] |
|
4071 | 2191 |
! |
2192 |
||
2193 |
rootHolder |
|
2194 |
"holder, which keeps the rootHolder of the treeView |
|
2195 |
" |
|
2196 |
||
2197 |
^ self aspectFor:#rootHolder ifAbsent:[ValueHolder new]. |
|
3892 | 2198 |
! ! |
2199 |
||
2200 |
!AbstractFileBrowser methodsFor:'aspects handling'! |
|
2201 |
||
2202 |
aspectFor:something ifAbsent:aBlock |
|
2203 |
"returns the model for an aspect |
|
2204 |
" |
|
4201 | 2205 |
|holder saveAspectItem aspect| |
3892 | 2206 |
|
2207 |
(holder := aspects at:something ifAbsent:nil) isNil ifTrue:[ |
|
4201 | 2208 |
saveAspectItem := self runtimeAspectValueFor:something. |
2209 |
saveAspectItem notNil ifTrue:[ |
|
2210 |
saveAspectItem isHolder ifTrue:[ |
|
2211 |
holder := ValueHolder with:saveAspectItem value |
|
2212 |
] ifFalse:[ |
|
2213 |
holder := saveAspectItem value |
|
2214 |
]. |
|
2215 |
] ifFalse:[ |
|
2216 |
aspect := self userPreferencesAspectValueFor:something. |
|
2217 |
aspect notNil ifTrue:[ |
|
2218 |
holder := aspect asValue |
|
2219 |
] ifFalse:[ |
|
2220 |
holder := aBlock value. |
|
2221 |
] |
|
2222 |
]. |
|
2223 |
holder notNil ifTrue:[ |
|
2224 |
aspects at:something put:holder |
|
2225 |
] |
|
3892 | 2226 |
]. |
2227 |
^ holder |
|
2228 |
! |
|
2229 |
||
2230 |
aspects |
|
2231 |
^ aspects |
|
2232 |
! |
|
2233 |
||
2234 |
runtimeAspectValueFor:something |
|
2235 |
"returns the default aspect item from the class variable RuntimeAspects |
|
2236 |
" |
|
2237 |
^ self class runtimeAspects at:something ifAbsent:nil. |
|
2238 |
! |
|
2239 |
||
4201 | 2240 |
saveAspectValues |
2241 |
|saveAspects aspectValue| |
|
2242 |
||
2243 |
||
2244 |
saveAspects := self class userPreferencesAspectList. |
|
2245 |
saveAspects do:[ : aspectKey | |
|
2246 |
aspectValue := (self perform:aspectKey) value. |
|
2247 |
UserPreferences current perform:((aspectKey asString, ':') asSymbol) with:aspectValue. |
|
2248 |
]. |
|
2249 |
! |
|
2250 |
||
3892 | 2251 |
saveRuntimeAspectValues |
2252 |
|savedAspects dictionary value isHolder aspect| |
|
2253 |
||
2254 |
savedAspects := self class listOfRuntimeValuesToRemark. |
|
2255 |
dictionary := Dictionary new. |
|
2256 |
savedAspects do:[ : aspectKey | |
|
4190 | 2257 |
aspect := self perform:aspectKey. |
2258 |
isHolder := aspect isValueModel. |
|
2259 |
isHolder ifTrue:[value:= aspect value] ifFalse:[ value := aspect]. |
|
2260 |
dictionary at:aspectKey |
|
2261 |
put:(SaveAspectItem withValue:value isHolder:isHolder) |
|
3892 | 2262 |
]. |
2263 |
||
2264 |
RuntimeAspects := dictionary. |
|
2265 |
! |
|
2266 |
||
4201 | 2267 |
userPreferencesAspectValueFor:something |
2268 |
"returns the default aspect from the Userpreferences |
|
3892 | 2269 |
" |
4201 | 2270 |
|
2271 |
(self class userPreferencesAspectList includes:something) not ifTrue:[ ^ nil]. |
|
2272 |
^ UserPreferences current perform:something. |
|
3892 | 2273 |
! ! |
2274 |
||
4011 | 2275 |
!AbstractFileBrowser methodsFor:'aspects-filter'! |
2276 |
||
4018 | 2277 |
filterBackgroundColor |
2278 |
||
2279 |
^ self aspectFor:#filterBackgroundColor ifAbsent:[Color white asValue] |
|
2280 |
! |
|
2281 |
||
4011 | 2282 |
filterBlockHolder |
2283 |
||
2284 |
^ self aspectFor:#filterBlockHolder ifAbsent:[self getFilter asValue] |
|
2285 |
! |
|
2286 |
||
2287 |
filterListModel |
|
2288 |
||
2289 |
^ self aspectFor:#filterListModel ifAbsent:[self class defaultFilterList] |
|
2290 |
! |
|
2291 |
||
2292 |
filterModel |
|
2293 |
||
2294 |
^ self aspectFor:#filterModel ifAbsent:[(self filterListModel at:1) asValue] |
|
2295 |
! |
|
2296 |
||
4018 | 2297 |
filterValueBox |
2298 |
||
2299 |
^ self aspectFor:#filterValueBox ifAbsent:[ValueHolder new] |
|
2300 |
! |
|
2301 |
||
4011 | 2302 |
getFilter |
2303 |
| filter showHidden| |
|
2304 |
||
2305 |
filter := self filterModel value. |
|
2306 |
filter = '' ifTrue:[filter := '*']. |
|
2307 |
showHidden := self showHiddenFiles value. |
|
2308 |
showHidden ifTrue:[ |
|
4190 | 2309 |
^ [: el | filter match:el]. |
4011 | 2310 |
] ifFalse:[ |
4190 | 2311 |
^ [: el | ((el asString startsWith:'.') not) and:[filter match:el]]. |
4011 | 2312 |
] |
4018 | 2313 |
! |
2314 |
||
2315 |
shownFiles |
|
2316 |
||
2317 |
^ self aspectFor:#shownFiles ifAbsent:['-/-' asValue] |
|
4011 | 2318 |
! ! |
2319 |
||
3892 | 2320 |
!AbstractFileBrowser methodsFor:'aspects-history'! |
2321 |
||
2322 |
dirHistory |
|
2323 |
||
3952 | 2324 |
^ self class directoryHistory |
3892 | 2325 |
! |
2326 |
||
2327 |
enableBack |
|
2328 |
||
2329 |
^ self aspectFor:#enableBack ifAbsent:[false asValue] |
|
2330 |
! |
|
2331 |
||
2332 |
enableFileHistory |
|
2333 |
||
2334 |
^ self aspectFor:#enableFileHistory ifAbsent:[false asValue] |
|
2335 |
! |
|
2336 |
||
2337 |
enableForward |
|
2338 |
||
2339 |
^ self aspectFor:#enableForward ifAbsent:[false asValue] |
|
2340 |
! |
|
2341 |
||
2342 |
fileHistory |
|
2343 |
||
2344 |
^ self aspectFor:#fileHistory ifAbsent:[FilenameHistory new] |
|
2345 |
! ! |
|
2346 |
||
2347 |
!AbstractFileBrowser methodsFor:'aspects-visibility'! |
|
2348 |
||
2349 |
filenameEntryFieldVisibleHolder |
|
4201 | 2350 |
" aspect for show FileEntryField " |
3892 | 2351 |
|
2352 |
^ self aspectFor:#filenameEntryFieldVisibleHolder ifAbsent:[true asValue] |
|
2353 |
! |
|
2354 |
||
4110 | 2355 |
openAlwaysInTextEditor |
4201 | 2356 |
" aspect for open every file in TextEditor dont use e.g. HtmlEditor for *.html'" |
4110 | 2357 |
|
2358 |
^ self aspectFor:#openAlwaysInTextEditor ifAbsent:[ false asValue ]. |
|
2359 |
! |
|
2360 |
||
3892 | 2361 |
openMultipleApplicationsForType |
2362 |
||
4201 | 2363 |
" aspect for open more applications for e.g. TextEditor and not change the contents of already |
2364 |
open TextEditor " |
|
2365 |
||
3892 | 2366 |
^ self aspectFor:#openMultipleApplicationsForType ifAbsent:[ false asValue ]. |
2367 |
! |
|
2368 |
||
4201 | 2369 |
showDirectoryTree |
2370 |
||
2371 |
^ self aspectFor:#showDirectoryTree ifAbsent:[ true asValue ] |
|
3892 | 2372 |
! |
2373 |
||
2374 |
showHiddenFiles |
|
2375 |
||
2376 |
^ self aspectFor:#showHiddenFiles ifAbsent:[ true asValue ]. |
|
2377 |
! |
|
2378 |
||
2379 |
toolBarVisibleHolder |
|
4201 | 2380 |
" aspect for show toolbar in FileBrowserV2" |
3892 | 2381 |
|
2382 |
^ self aspectFor:#toolBarVisibleHolder ifAbsent:[true asValue] |
|
2383 |
! |
|
2384 |
||
2385 |
viewDescription |
|
4201 | 2386 |
"get the user preferences for show file description row in DirectoryContentsBrowser" |
3892 | 2387 |
|
2388 |
^ self aspectFor:#viewDescription ifAbsent:[ false asValue ]. |
|
2389 |
! |
|
2390 |
||
2391 |
viewDetails |
|
4201 | 2392 |
"get the user preferences for view more file properties in rows in DirectoryContentsBrowser |
2393 |
" |
|
3892 | 2394 |
|
2395 |
^ self aspectFor:#viewDetails ifAbsent:[ false asValue ]. |
|
2396 |
! |
|
2397 |
||
2398 |
viewDirectoryDescription |
|
2399 |
||
4201 | 2400 |
" aspect for auto open a TextView for Readme and other see getInfoItem Method files |
2401 |
on change directory " |
|
2402 |
||
3892 | 2403 |
^ self aspectFor:#viewDirectoryDescription ifAbsent:[ true asValue ]. |
2404 |
! |
|
2405 |
||
4201 | 2406 |
viewDirsInContentsBrowser |
2407 |
||
2408 |
^ self aspectFor:#viewDirsInContentsBrowser ifAbsent:[ false asValue ]. |
|
2409 |
! |
|
2410 |
||
3892 | 2411 |
viewFilesInDirectoryTree |
2412 |
||
4201 | 2413 |
" aspect for view files in tree view (not only directories) " |
2414 |
||
3892 | 2415 |
^ self aspectFor:#viewFilesInDirectoryTree ifAbsent:[ false asValue ]. |
2416 |
! |
|
2417 |
||
2418 |
viewGroup |
|
2419 |
||
4201 | 2420 |
" aspect for show group information row in DirectoryContentsBrowser " |
2421 |
||
3892 | 2422 |
^ self aspectFor:#viewGroup ifAbsent:[ false asValue ]. |
2423 |
! |
|
2424 |
||
2425 |
viewNoteBookApplicationHolder |
|
2426 |
||
2427 |
^ self aspectFor:#viewNoteBookApplicationHolder ifAbsent:[ false asValue]. |
|
2428 |
! |
|
2429 |
||
2430 |
viewOwner |
|
2431 |
||
4201 | 2432 |
" aspect for show owner information row in DirectoryContentsBrowser " |
2433 |
||
3892 | 2434 |
^ self aspectFor:#viewOwner ifAbsent:[ false asValue ]. |
2435 |
! |
|
2436 |
||
2437 |
viewPermissions |
|
2438 |
||
4201 | 2439 |
" aspect for show permission information row in DirectoryContentsBrowser " |
2440 |
||
3892 | 2441 |
^ self aspectFor:#viewPermissions ifAbsent:[ false asValue ]. |
2442 |
! |
|
2443 |
||
2444 |
viewPreview |
|
2445 |
||
4201 | 2446 |
" aspect for show image previev row in DirectoryContentsBrowser " |
2447 |
||
3892 | 2448 |
^ self aspectFor:#viewPreview ifAbsent:[ false asValue ]. |
2449 |
! |
|
2450 |
||
2451 |
viewSize |
|
2452 |
||
4201 | 2453 |
" aspect for show size information row in DirectoryContentsBrowser " |
2454 |
||
3892 | 2455 |
^ self aspectFor:#viewSize ifAbsent:[ false asValue ]. |
2456 |
! |
|
2457 |
||
2458 |
viewTime |
|
2459 |
||
4201 | 2460 |
" aspect for show time information row in DirectoryContentsBrowser " |
2461 |
||
3892 | 2462 |
^ self aspectFor:#viewTime ifAbsent:[ false asValue ]. |
2463 |
! |
|
2464 |
||
2465 |
viewType |
|
4201 | 2466 |
" aspect for show suffix (type) information row in DirectoryContentsBrowser " |
3892 | 2467 |
|
2468 |
^ self aspectFor:#viewType ifAbsent:[ false asValue ]. |
|
2469 |
! ! |
|
2470 |
||
2471 |
!AbstractFileBrowser methodsFor:'background processing'! |
|
2472 |
||
2473 |
executeCommand:cmd |
|
2474 |
||
2475 |
self executeCommand:cmd inDirectory:nil |
|
2476 |
! |
|
2477 |
||
2478 |
executeCommand:cmd inDirectory:aDir |
|
2479 |
||
2480 |
| nameString executionBlock| |
|
2481 |
||
2482 |
executionBlock := self getExecutionBlockForCommand:cmd inDirectory:aDir. |
|
2483 |
nameString := 'Command> ', cmd. |
|
2484 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
|
2485 |
! |
|
2486 |
||
2487 |
getExecutionBlockForCommand:cmd |
|
2488 |
||
2489 |
^ self getExecutionBlockForCommand:cmd inDirectory:nil |
|
2490 |
! |
|
2491 |
||
2492 |
getExecutionBlockForCommand:cmd inDirectory:aDir |
|
2493 |
||
2494 |
| dir dirs| |
|
2495 |
||
2496 |
dir := aDir. |
|
2497 |
aDir isNil ifTrue:[ |
|
4190 | 2498 |
dirs := self currentSelectedDirectories. |
2499 |
dirs size ~= 1 ifTrue:[ ^ self]. |
|
2500 |
dir := dirs anElement. |
|
3892 | 2501 |
]. |
2502 |
^ [:stream| stream notNil ifTrue:[ |
|
4190 | 2503 |
OperatingSystem |
2504 |
executeCommand:cmd |
|
2505 |
inputFrom:nil |
|
2506 |
outputTo:stream |
|
2507 |
errorTo:stream |
|
2508 |
inDirectory:dir |
|
2509 |
onError:[:status| false]. |
|
2510 |
] |
|
3892 | 2511 |
]. |
2512 |
! |
|
2513 |
||
2514 |
killAllRunningBackgroundProcesses |
|
2515 |
||
2516 |
self backgroundProcesses do:[ : process | |
|
4190 | 2517 |
self notifyChannel value:'kill ', process name. |
2518 |
process terminate. |
|
3892 | 2519 |
]. |
2520 |
! |
|
2521 |
||
2522 |
makeExecutionResultProcessFor:aBlock withName:aString |
|
2523 |
| stream process appl nameString| |
|
2524 |
||
2525 |
appl := self openCommandResultApplication. |
|
2526 |
stream := appl resultStream. |
|
2527 |
nameString := aString ? 'Execution Result'. |
|
2528 |
appl changeTabTo:nameString. |
|
2529 |
process := [ [aBlock value:stream] valueNowOrOnUnwindDo:[ |
|
4190 | 2530 |
self backgroundProcesses remove:process ifAbsent:[]. |
2531 |
appl process value:nil. |
|
3892 | 2532 |
]] newProcess. |
2533 |
process priority:(Processor userBackgroundPriority). |
|
2534 |
process name:nameString. |
|
2535 |
self backgroundProcesses add:process. |
|
2536 |
appl process value:process. |
|
2537 |
process resume. |
|
2538 |
! ! |
|
2539 |
||
2540 |
!AbstractFileBrowser methodsFor:'change & update'! |
|
2541 |
||
4011 | 2542 |
abstractCurrentFileNameHolderChanged |
2543 |
" do here all the things that have to be done for every part of the FileBrowserV2 |
|
2544 |
and the things that have to be done if it runs standalone " |
|
2545 |
||
2546 |
| newDirectories oldDirectories size rootInTreeView holder| |
|
2547 |
||
2548 |
holder := self currentFileNameHolder value. |
|
2549 |
self hasSelection value:(holder value notEmpty). |
|
2550 |
newDirectories := self directoriesForFiles:(holder value). |
|
2551 |
oldDirectories := self currentDirectories value. |
|
2552 |
oldDirectories ~= newDirectories ifTrue:[ |
|
4190 | 2553 |
self currentDirectories value:newDirectories. |
2554 |
size := newDirectories size. |
|
2555 |
rootInTreeView := self application:#DirectoryTreeBrowser do:#rootHolder. |
|
2556 |
rootInTreeView := rootInTreeView notNil ifTrue:[rootInTreeView value]. |
|
2557 |
self enableDirectoryUp value:(((size == 1) and:[newDirectories first isRootDirectory not]) or:[(rootInTreeView notNil and:[rootInTreeView value asFilename isRootDirectory not])]). |
|
2558 |
newDirectories notEmpty ifTrue:[ |
|
2559 |
newDirectories do:[: dir | |
|
2560 |
self dirHistory addToHistory:(dir asString). |
|
2561 |
]. |
|
2562 |
]. |
|
2563 |
self enableHome value:((newDirectories includes:(Filename homeDirectory))not). |
|
4011 | 2564 |
]. |
4022 | 2565 |
self enableForward value:self canForward. |
2566 |
self enableBack value:self canBack. |
|
4011 | 2567 |
^ self |
2568 |
! |
|
2569 |
||
2570 |
filterModelChanged |
|
2571 |
||
2572 |
self filterBlockHolder value:(self getFilter). |
|
2573 |
! |
|
2574 |
||
3892 | 2575 |
update:something with:aParameter from:changedObject |
2576 |
||
2577 |
" do here all the things that have to be done for every part of the FileBrowserV2 |
|
2578 |
and the things that have to be done if it runs standalone " |
|
2579 |
||
2580 |
changedObject == self currentFileNameHolder ifTrue:[ |
|
4190 | 2581 |
self abstractCurrentFileNameHolderChanged. |
2582 |
^ self |
|
3892 | 2583 |
]. |
3989 | 2584 |
changedObject == self sortCaseless ifTrue:[ |
4190 | 2585 |
self sortFileListsBy:#baseName withReverse:false. |
2586 |
^ self |
|
3989 | 2587 |
]. |
4011 | 2588 |
(changedObject == self filterModel or:[changedObject == self showHiddenFiles]) ifTrue:[ |
4190 | 2589 |
self filterModelChanged. |
2590 |
^ self |
|
4004 | 2591 |
]. |
3989 | 2592 |
|
3892 | 2593 |
super update:something with:aParameter from:changedObject |
2594 |
! ! |
|
2595 |
||
2596 |
!AbstractFileBrowser methodsFor:'clipboard'! |
|
2597 |
||
2598 |
canPaste |
|
2599 |
||
2600 |
^ self aspectFor:#canPaste ifAbsent:[ false asValue ]. |
|
2601 |
! |
|
2602 |
||
2603 |
clipboard |
|
2604 |
||
2605 |
^ self aspectFor:#clipboard ifAbsent:[Clipboard new] |
|
2606 |
! |
|
2607 |
||
2608 |
copyFilesToClipBoard:colOfFiles |
|
2609 |
"defete current selected files/directories |
|
2610 |
" |
|
2611 |
self putInClipBoard:colOfFiles as:#copy. |
|
2612 |
! |
|
2613 |
||
2614 |
cutFilesToClipBoard:colOfFiles |
|
2615 |
"defete current selected files/directories |
|
2616 |
" |
|
2617 |
self putInClipBoard:colOfFiles as:#cut. |
|
2618 |
! |
|
2619 |
||
2620 |
emptyClipBoard |
|
2621 |
||
2622 |
self clipboard files:nil. |
|
2623 |
self canPaste value:false. |
|
2624 |
! |
|
2625 |
||
2626 |
putInClipBoard:colOfFiles as:aSymbol |
|
2627 |
||
2628 |
| stream clp| |
|
2629 |
||
2630 |
colOfFiles isEmpty ifTrue:[ ^ self]. |
|
2631 |
clp := self clipboard. |
|
2632 |
clp files:nil. |
|
2633 |
clp method:aSymbol. |
|
2634 |
stream := WriteStream on:''. |
|
2635 |
stream nextPutAll:aSymbol asString. |
|
2636 |
stream nextPutAll:' <'. |
|
2637 |
stream nextPutAll:colOfFiles first asString. |
|
2638 |
colOfFiles size > 1 ifTrue:[ |
|
4190 | 2639 |
stream nextPutAll:' ...'. |
3892 | 2640 |
]. |
2641 |
stream nextPutAll:'> to clipboard'. |
|
2642 |
||
2643 |
self notifyChannel value:stream contents. |
|
2644 |
stream close. |
|
2645 |
clp files:colOfFiles. |
|
2646 |
self canPaste value:true. |
|
2647 |
! ! |
|
2648 |
||
2649 |
!AbstractFileBrowser methodsFor:'drag & drop'! |
|
2650 |
||
2651 |
canDropArchiv:dropedObjects for:filename |
|
2652 |
||
2653 |
(filename isDirectory |
|
2654 |
and:[filename isWritable and:[dropedObjects notEmpty]]) ifTrue:[ |
|
4190 | 2655 |
^ true |
3892 | 2656 |
]. |
2657 |
^ false |
|
2658 |
! |
|
2659 |
||
2660 |
canDropFiles:dropedObjects for:filename |
|
2661 |
| checkObject filenameDirString checkObjectString filenameDir| |
|
2662 |
||
2663 |
dropedObjects isEmpty ifTrue:[^ false]. |
|
2664 |
filenameDir := self getDirWithoutFileName:filename. |
|
2665 |
filenameDir isWritable not ifTrue:[^ false]. |
|
2666 |
filenameDirString := filenameDir asString. |
|
2667 |
dropedObjects do:[:aObject | |
|
4190 | 2668 |
checkObject := aObject theObject. |
2669 |
checkObjectString := checkObject asString. |
|
2670 |
checkObject isDirectory ifTrue:[ |
|
2671 |
(self fileName:filenameDirString startsWith:checkObjectString) ifTrue:[ |
|
2672 |
" can not drop a directory in his parents " |
|
2673 |
^ false |
|
2674 |
] |
|
2675 |
] ifFalse:[ |
|
2676 |
(filenameDirString = checkObject directory asString |
|
2677 |
or:[ filenameDirString = checkObject physicalPathName asFilename directory asString ]) ifTrue:[ |
|
2678 |
" can not drop a file in same directory " |
|
2679 |
^ false |
|
2680 |
] |
|
2681 |
] |
|
3892 | 2682 |
]. |
2683 |
^ true |
|
2684 |
! |
|
2685 |
||
2686 |
doStartDrag:aDropSource in:aView |
|
2687 |
"set the cursors before starting the drag & drop operation |
|
2688 |
" |
|
2689 |
|hdl| |
|
2690 |
||
2691 |
||
2692 |
hdl := DragAndDropManager new. |
|
2693 |
||
2694 |
hdl disabledCursor:self class DisabledCursorImage. |
|
2695 |
hdl enabledCursor:self class EnabledCursorImage. |
|
2696 |
hdl alienCursor:nil. |
|
2697 |
||
2698 |
hdl startDragFrom:aView dropSource:aDropSource offset:#topLeft |
|
2699 |
! ! |
|
2700 |
||
2701 |
!AbstractFileBrowser methodsFor:'file operations'! |
|
2702 |
||
2703 |
copyFile:aSourceFile to:aDestFile |
|
2704 |
"copy to |
|
2705 |
" |
|
2706 |
|copy| |
|
2707 |
||
2708 |
copy := FileOperation copy copyFile:aSourceFile to:aDestFile withOverWriteWarning:true copyFileIfSame:true. |
|
2709 |
copy result ifTrue:[ |
|
4190 | 2710 |
self notifyChannel value:('copy ', aSourceFile baseName, ' to:,', aDestFile baseName). |
3892 | 2711 |
] ifFalse:[ |
4190 | 2712 |
self notifyChannel value:copy errorString. |
3892 | 2713 |
]. |
2714 |
^ copy result |
|
2715 |
! |
|
2716 |
||
2717 |
copyFiles:aColOfSourceFiles to:aDirectory |
|
2718 |
"copy aColOfSourceFiles to aDirectory |
|
2719 |
" |
|
2720 |
|copy| |
|
2721 |
||
2722 |
copy := FileOperation copy copyFiles:aColOfSourceFiles to:aDirectory. |
|
2723 |
copy result ifFalse:[ |
|
4190 | 2724 |
self notifyChannel value:copy errorString. |
3892 | 2725 |
]. |
2726 |
self updateCurrentDirectory. |
|
2727 |
^ copy colOfCopiedFiles |
|
2728 |
! |
|
2729 |
||
2730 |
copyOrMoveDialog:aCol |
|
2731 |
||
2732 |
| size stream dialog| |
|
2733 |
||
2734 |
size := aCol size. |
|
2735 |
stream := WriteStream on:''. |
|
2736 |
stream nextPutAll:'copy or move file'. |
|
2737 |
size == 1 ifFalse:[ |
|
4190 | 2738 |
stream nextPutAll:'s'. |
3892 | 2739 |
]. |
2740 |
stream nextPutAll:': '. |
|
2741 |
stream nextPutAll:aCol first baseName asString. |
|
2742 |
size == 1 ifFalse:[ |
|
4190 | 2743 |
stream nextPutAll:' ... '. |
2744 |
stream nextPutAll:aCol last baseName asString. |
|
3892 | 2745 |
]. |
2746 |
||
2747 |
dialog := OptionBox |
|
4190 | 2748 |
request:stream contents |
2749 |
label:'move or copy' |
|
2750 |
form:(WarningBox iconBitmap) |
|
2751 |
buttonLabels:#('cancel' 'move' 'copy') |
|
2752 |
values:#(#cancel #move #copy) |
|
2753 |
default:#copy. |
|
3892 | 2754 |
dialog isNil ifTrue:[dialog := #cancel]. |
2755 |
^ dialog. |
|
2756 |
! |
|
2757 |
||
2758 |
copyOrMoveFiles:aColOfSourceFiles to:aDirectory |
|
2759 |
"copy aColOfSourceFiles to aDirectory |
|
2760 |
" |
|
2761 |
|dialog| |
|
2762 |
||
2763 |
dialog := self copyOrMoveDialog:aColOfSourceFiles. |
|
2764 |
dialog == #copy ifTrue:[ |
|
4190 | 2765 |
self copyFiles:aColOfSourceFiles to:aDirectory. |
2766 |
^ self. |
|
3892 | 2767 |
]. |
2768 |
dialog == #move ifTrue:[ |
|
4190 | 2769 |
self moveFiles:aColOfSourceFiles to:aDirectory. |
2770 |
^ self. |
|
3892 | 2771 |
]. |
2772 |
! |
|
2773 |
||
2774 |
deleteFile:aFile |
|
2775 |
"delete current selected files/directories |
|
2776 |
" |
|
2777 |
||
2778 |
^ self deleteFiles:(OrderedCollection with:aFile). |
|
2779 |
! |
|
2780 |
||
2781 |
deleteFiles:colOfFiles |
|
2782 |
"delete current selected files/directories |
|
2783 |
" |
|
2784 |
|delete| |
|
2785 |
||
2786 |
delete := FileOperation delete deleteFiles:colOfFiles. |
|
2787 |
delete result ifFalse:[ |
|
4190 | 2788 |
self notifyChannel value:delete errorString. |
3892 | 2789 |
]. |
2790 |
self updateCurrentDirectory. |
|
2791 |
^ delete result. |
|
2792 |
! |
|
2793 |
||
2794 |
moveFile:aSourceFile to:aDestFile |
|
2795 |
"defete current selected files/directories |
|
2796 |
" |
|
2797 |
||
2798 |
|move| |
|
2799 |
||
2800 |
move := FileOperation move moveFile:aSourceFile to:aDestFile. |
|
2801 |
move result ifTrue:[ |
|
4190 | 2802 |
self notifyChannel value:('move ', aSourceFile asString, ' to ', aDestFile asString). |
3892 | 2803 |
] ifFalse:[ |
4190 | 2804 |
self notifyChannel value:move errorString. |
3892 | 2805 |
]. |
2806 |
self updateCurrentDirectory. |
|
2807 |
^ move result |
|
2808 |
! |
|
2809 |
||
2810 |
moveFiles:aColOfSourceFiles to:aDirectory |
|
2811 |
"move aColOfSourceFiles to aDirectory |
|
2812 |
" |
|
2813 |
|move| |
|
2814 |
||
2815 |
move := FileOperation move moveFiles:aColOfSourceFiles to:aDirectory. |
|
2816 |
move result ifFalse:[ |
|
4190 | 2817 |
self notifyChannel value:move errorString. |
3892 | 2818 |
]. |
2819 |
self updateCurrentDirectory. |
|
2820 |
^ move colOfMovedFiles |
|
2821 |
! |
|
2822 |
||
2823 |
newDirectory |
|
2824 |
"ask for and create a new directory" |
|
2825 |
||
2826 |
| directories directory create newFile| |
|
2827 |
||
2828 |
directories := self currentDirectories value. |
|
2829 |
(directories size ~= 1) ifTrue:[^ self]. |
|
2830 |
directory := directories first. |
|
2831 |
create := FileOperation create createDirectoryIn:directory. |
|
2832 |
create result ifFalse:[ ^ self]. |
|
2833 |
newFile := create createdFile. |
|
2834 |
newFile notNil ifTrue:[ |
|
4190 | 2835 |
self updateCurrentDirectory. |
3892 | 2836 |
] |
2837 |
! |
|
2838 |
||
2839 |
newFile |
|
2840 |
"ask for and create a new file" |
|
2841 |
||
2842 |
| curFile directories directory create file| |
|
2843 |
||
2844 |
directories := self currentDirectories value. |
|
2845 |
(directories size ~= 1) ifTrue:[^ self]. |
|
2846 |
directory := directories first. |
|
3982 | 2847 |
curFile := self firstSelectedFile. |
3892 | 2848 |
curFile notNil ifTrue:[ |
4190 | 2849 |
file := curFile. |
3892 | 2850 |
] ifFalse:[ |
4190 | 2851 |
file := directory. |
3892 | 2852 |
]. |
2853 |
create := FileOperation create createFileIn:file. |
|
2854 |
create result ifFalse:[ ^ self]. |
|
2855 |
self updateAndSelect:(OrderedCollection with:(create createdFile)). |
|
2856 |
! |
|
2857 |
||
2858 |
newHardLink |
|
2859 |
"ask for and create a hard link (unix only)" |
|
2860 |
||
2861 |
self newLink:false. |
|
2862 |
! |
|
2863 |
||
2864 |
newLink:symbolic |
|
2865 |
||
2866 |
"ask for and create a symbolic if symbolic is true otherwise a hard link (unix only)" |
|
2867 |
||
2868 |
| sel create createdFile| |
|
2869 |
||
2870 |
sel := self currentFileNameHolder value. |
|
2871 |
(sel size ~= 1) ifTrue:[^ self]. |
|
2872 |
symbolic ifTrue:[ |
|
4190 | 2873 |
create := FileOperation create createSoftLinkIn:(sel first). |
3892 | 2874 |
] ifFalse:[ |
4190 | 2875 |
create := FileOperation create createHardLinkIn:(sel first). |
3892 | 2876 |
]. |
2877 |
create result ifFalse:[ ^ self]. |
|
2878 |
createdFile := create createdFile. |
|
2879 |
createdFile notNil ifTrue:[ |
|
4190 | 2880 |
self updateAndSelect:(OrderedCollection with:createdFile). |
3892 | 2881 |
]. |
2882 |
! |
|
2883 |
||
2884 |
newSoftLink |
|
2885 |
"ask for and create a soft link (unix only)" |
|
2886 |
||
2887 |
self newLink:true. |
|
2888 |
! |
|
2889 |
||
2890 |
pasteFiles |
|
2891 |
"defete current selected files/directories |
|
2892 |
" |
|
2893 |
| buffer destination files directories copiedFiles| |
|
2894 |
||
2895 |
files := self clipboard files. |
|
2896 |
(files isNil or:[files isEmpty]) ifTrue:[ ^ self ]. |
|
2897 |
buffer := self clipboard copy. |
|
3982 | 2898 |
directories := self currentSelectedDirectories. |
3892 | 2899 |
directories isEmpty ifTrue:[ |
4190 | 2900 |
|box dirStringCol| |
2901 |
dirStringCol := directories collect:[:aDir| aDir asString]. |
|
2902 |
box := ListSelectionBox new. |
|
2903 |
box title:'In which directory you want to paste ?'. |
|
2904 |
box list:dirStringCol. |
|
2905 |
box okAction:[:sel | destination := sel asFilename]. |
|
2906 |
box showAtPointer |
|
3892 | 2907 |
] ifFalse:[ |
4190 | 2908 |
destination := directories first. |
3892 | 2909 |
]. |
2910 |
copiedFiles := self copyFiles:(buffer files) to:destination. |
|
2911 |
||
2912 |
(self clipboard method == #cut) ifTrue:[ |
|
4190 | 2913 |
self deleteFiles:copiedFiles. |
3892 | 2914 |
] |
2915 |
! |
|
2916 |
||
2917 |
renameFile:aFile |
|
2918 |
"rename the selected file(s)" |
|
2919 |
||
2920 |
^ self renameFiles:(OrderedCollection with:aFile). |
|
2921 |
! |
|
2922 |
||
2923 |
renameFile:filename to:newFileString update:aBoolean |
|
2924 |
"rename filename to newFileString" |
|
2925 |
||
2926 |
|rename| |
|
2927 |
||
2928 |
rename := FileOperation rename renameFile:filename to:newFileString. |
|
2929 |
rename result ifTrue:[ |
|
4190 | 2930 |
aBoolean ifTrue:[ |
2931 |
self updateAndSelect:(rename renamedFiles). |
|
2932 |
]. |
|
3892 | 2933 |
] ifFalse:[ |
4190 | 2934 |
self notifyChannel value:rename errorString. |
3892 | 2935 |
]. |
2936 |
^ rename result |
|
2937 |
! |
|
2938 |
||
2939 |
renameFiles:aColOfFiles |
|
2940 |
"rename the selected file(s)" |
|
2941 |
||
2942 |
|rename| |
|
2943 |
||
2944 |
rename := FileOperation rename renameFiles:aColOfFiles. |
|
2945 |
rename result ifFalse:[ |
|
4190 | 2946 |
self notifyChannel value:rename errorString |
3892 | 2947 |
] ifTrue:[ |
4190 | 2948 |
self updateAndSelect:(rename renamedFiles) |
3892 | 2949 |
]. |
2950 |
^ rename result |
|
2951 |
! |
|
2952 |
||
2953 |
renameSelection |
|
2954 |
"rename the selected file(s)" |
|
2955 |
||
2956 |
|rename| |
|
2957 |
||
2958 |
rename := FileOperation rename renameFiles:self currentFileNameHolder value. |
|
2959 |
rename result ifFalse:[ |
|
4190 | 2960 |
self notifyChannel value:rename errorString |
3892 | 2961 |
] ifTrue:[ |
4190 | 2962 |
self updateAndSelect:(rename renamedFiles) |
3892 | 2963 |
]. |
2964 |
^ rename result |
|
2965 |
! ! |
|
2966 |
||
4080 | 2967 |
!AbstractFileBrowser methodsFor:'menu accessing'! |
3892 | 2968 |
|
3952 | 2969 |
bookmarksMenuSpec |
2970 |
"This resource specification was automatically generated |
|
2971 |
by the MenuEditor of ST/X." |
|
2972 |
||
2973 |
"Do not manually edit this!! If it is corrupted, |
|
2974 |
the MenuEditor may not be able to read the specification." |
|
2975 |
||
2976 |
" |
|
2977 |
MenuEditor new openOnClass:FileBrowser andSelector:#bookmarksMenuSpec |
|
2978 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser bookmarksMenuSpec)) startUp |
|
2979 |
" |
|
2980 |
<resource: #programMenu> |
|
2981 |
||
4080 | 2982 |
|menuSpec menu bookmarks| |
2983 |
||
2984 |
menuSpec := self class baseBookmarksMenuSpec. |
|
2985 |
menu := menuSpec decodeAsLiteralArray. |
|
2986 |
menu findGuiResourcesIn:self. |
|
3952 | 2987 |
menu receiver:self. |
2988 |
bookmarks := self class directoryBookmarks. |
|
2989 |
"/ add the history items ... |
|
2990 |
||
2991 |
bookmarks size > 0 ifTrue:[ |
|
4190 | 2992 |
menu addItem:(MenuItem labeled:'-'). |
2993 |
bookmarks do:[:dirName | |
|
2994 |
menu addItem:((MenuItem label:dirName asString value:[ |
|
2995 |
(self currentDirectories value includes:dirName) ifFalse:[ |
|
2996 |
self currentFileNameHolder value:(OrderedCollection with:dirName). |
|
2997 |
]. |
|
2998 |
])). |
|
2999 |
]. |
|
3952 | 3000 |
]. |
3001 |
^ menu |
|
3002 |
||
3003 |
"Modified: / 17.8.1998 / 10:13:05 / cg" |
|
3004 |
! |
|
3005 |
||
3906 | 3006 |
canBack |
3007 |
||
4024 | 3008 |
|
3009 |
^ self dirHistory canBack. |
|
3906 | 3010 |
! |
3011 |
||
3012 |
canForward |
|
3013 |
||
3964 | 3014 |
"/ | currentSelection | |
3015 |
"/ |
|
3016 |
"/ currentSelection := self currentDirectories value. |
|
3017 |
"/ currentSelection size ~~ 1 ifTrue:[ ^ false]. |
|
3018 |
||
3906 | 3019 |
^ self dirHistory canForward. |
3020 |
! |
|
3021 |
||
3892 | 3022 |
menuDirHistory:backOrForward |
3023 |
"initialize the directory menu |
|
3024 |
" |
|
3025 |
<resource: #programMenu > |
|
3026 |
||
3964 | 3027 |
|menu pathList currentSel currentPath| |
3892 | 3028 |
|
3029 |
menu := Menu new. |
|
3030 |
menu receiver:self. |
|
3031 |
||
3032 |
self dirHistory isEmpty ifTrue:[^ nil]. |
|
3033 |
backOrForward == #back ifTrue:[ |
|
4190 | 3034 |
currentSel := self currentDirectories value. |
3035 |
currentSel size == 1 ifTrue:[ |
|
3036 |
currentPath := currentSel first asString. |
|
3037 |
] ifFalse:[ |
|
3038 |
currentPath := nil. |
|
3039 |
]. |
|
3040 |
pathList := self dirHistory getBackCollectionFrom:currentPath. |
|
3892 | 3041 |
] ifFalse:[ |
4190 | 3042 |
pathList := self dirHistory getForwardCollection. |
3892 | 3043 |
]. |
4022 | 3044 |
pathList isEmpty ifTrue:[ ^ nil]. |
3964 | 3045 |
pathList do:[:aPath| |
4190 | 3046 |
| menuItem | |
3047 |
menuItem := MenuItem new. |
|
3048 |
menuItem label:aPath. |
|
3049 |
menuItem value:[ |
|
3050 |
self currentFileNameHolder value:(OrderedCollection with:(aPath asFilename)). |
|
3051 |
]. |
|
3052 |
menu addItem:menuItem. |
|
3952 | 3053 |
]. |
3892 | 3054 |
^ menu |
3055 |
! |
|
3056 |
||
3057 |
menuDirHistoryBack |
|
3058 |
"initialize the directory menu |
|
3059 |
" |
|
3060 |
<resource: #programMenu > |
|
3061 |
||
3062 |
^ self menuDirHistory:#back. |
|
3063 |
! |
|
3064 |
||
3065 |
menuDirHistoryForward |
|
3066 |
"initialize the directory menu |
|
3067 |
" |
|
3068 |
<resource: #programMenu > |
|
3069 |
||
3070 |
^ self menuDirHistory:#forward. |
|
3906 | 3071 |
! |
3072 |
||
3073 |
menuFileHistory |
|
3074 |
"initialize the file history menu |
|
3075 |
" |
|
3076 |
<resource: #programMenu > |
|
3077 |
||
3078 |
|menu hist text removeItem removeCol| |
|
3079 |
||
3080 |
menu := Menu new. |
|
4080 | 3081 |
menu findGuiResourcesIn:self. |
3906 | 3082 |
menu receiver:self. |
3083 |
||
3084 |
hist := self fileHistory. |
|
3085 |
hist isEmpty ifTrue:[^ nil]. |
|
4080 | 3086 |
text := LabelAndIcon icon:(self class clearHistoryIcon) string:(resources string:'Clear File History'). |
3906 | 3087 |
removeCol := OrderedCollection new. |
3088 |
hist do:[:aFileItem| |
|
4190 | 3089 |
aFileItem fileName exists ifTrue:[ |
3090 |
menu addItem:(MenuItem label: aFileItem fileName asString value:[ |
|
3091 |
self currentFileNameHolder value:(OrderedCollection with:(aFileItem fileName)). |
|
3092 |
self openApplByFileItem:aFileItem |
|
3093 |
]). |
|
3094 |
] ifFalse:[ |
|
3095 |
removeCol add:aFileItem. |
|
3096 |
] |
|
3906 | 3097 |
]. |
3098 |
"/ remove all not existing history entries |
|
3099 |
removeCol do:[ : el | |
|
4190 | 3100 |
hist remove:el. |
3906 | 3101 |
]. |
4080 | 3102 |
removeItem := MenuItem new. |
3103 |
removeItem translateLabel:true. |
|
3104 |
removeItem label:text. |
|
3105 |
removeItem value:[ |
|
4190 | 3106 |
self fileHistory removeAll. |
3107 |
self enableFileHistory value:false. |
|
3906 | 3108 |
]. |
3109 |
menu addItem:(MenuItem label:'-'). |
|
3110 |
menu addItem:removeItem. |
|
3111 |
^ menu |
|
3952 | 3112 |
! |
3113 |
||
4080 | 3114 |
sortMenu |
3115 |
||
3116 |
<resource: #programMenu > |
|
3117 |
||
3118 |
|menu| |
|
3119 |
||
3120 |
menu := Menu new fromLiteralArrayEncoding:self class sortMenu. |
|
3121 |
menu ifNil:[ ^ nil ]. |
|
3122 |
menu findGuiResourcesIn:self. |
|
3123 |
menu receiver:self. |
|
3124 |
^ menu |
|
3125 |
! |
|
3126 |
||
3127 |
viewDetailsMenuSpec |
|
3128 |
^self class viewDetailsMenuSpec |
|
3129 |
! |
|
3130 |
||
3131 |
viewInContentsBrowserMenu |
|
3132 |
||
3133 |
^ self application:#DirectoryContentsBrowser do:#viewBrowserMenu |
|
3134 |
! |
|
3135 |
||
3952 | 3136 |
visitedDirectoriesMenu |
3137 |
||
3138 |
<resource: #programMenu > |
|
3139 |
||
3140 |
|menu histCopy text removeItem| |
|
3141 |
||
3142 |
menu := Menu new. |
|
3143 |
menu receiver:self. |
|
3144 |
||
3145 |
self dirHistory isEmpty ifTrue:[^ nil]. |
|
4040 | 3146 |
text := LabelAndIcon icon:(self class clearHistoryIcon) string:(resources string:'Clear History'). |
3952 | 3147 |
removeItem := MenuItem new. |
4040 | 3148 |
removeItem translateLabel:true. |
3952 | 3149 |
removeItem label:text. |
3150 |
removeItem value:[ |
|
4190 | 3151 |
self dirHistory removeAll. |
3152 |
self enableForward value:self canForward. |
|
3153 |
self enableBack value:self canBack. |
|
3952 | 3154 |
]. |
3155 |
histCopy := self dirHistory. |
|
3156 |
histCopy do:[:aFile| |
|
4190 | 3157 |
menu addItem:(MenuItem label:aFile asString value:[ |
3158 |
self currentFileNameHolder value:(OrderedCollection with:(aFile path asFilename)). |
|
3159 |
]). |
|
3952 | 3160 |
]. |
3161 |
menu addItem:(MenuItem label:'-'). |
|
3162 |
menu addItem:removeItem. |
|
3163 |
^ menu |
|
3892 | 3164 |
! ! |
3165 |
||
3166 |
!AbstractFileBrowser methodsFor:'menu actions cvs'! |
|
3167 |
||
3168 |
cvsAddAndCommit |
|
3169 |
||
4046
2f096def132b
commit in after add checks now only the added files in not all
penk
parents:
4040
diff
changeset
|
3170 |
|sel log cmd dir executionBlock nameString block| |
3892 | 3171 |
|
3172 |
log := Dialog |
|
4190 | 3173 |
requestText:(resources string:'enter initial log message') |
3174 |
lines:10 |
|
3175 |
columns:70 |
|
3176 |
initialAnswer:nil. |
|
3892 | 3177 |
|
3982 | 3178 |
sel := self currentSelectedFiles. |
3892 | 3179 |
executionBlock := [ : stream | |
4190 | 3180 |
log notNil ifTrue:[ |
3181 |
sel size > 0 ifTrue:[ |
|
3182 |
sel do:[:fn | |
|
3183 |
dir := self getDirWithoutFileName:fn. |
|
3184 |
cmd := ('cvs add -m ''' , log , ''' ' , fn baseName). |
|
3185 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir. |
|
3186 |
block value:stream. |
|
3187 |
cmd := ('cvs commit -l -m ''' , log , ''' ' , fn baseName). |
|
3188 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir. |
|
3189 |
block value:stream. |
|
3190 |
] |
|
3191 |
] |
|
3192 |
] |
|
3892 | 3193 |
]. |
4107 | 3194 |
nameString := 'Command> cvs add and commit'. |
3892 | 3195 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
3196 |
! |
|
3197 |
||
3198 |
cvsCommit |
|
3199 |
||
4107 | 3200 |
|nSel log msg cmd selectedFiles sel executionBlock nameString| |
3892 | 3201 |
|
3982 | 3202 |
selectedFiles:= self currentSelectedFiles. |
3892 | 3203 |
nSel := selectedFiles size. |
3204 |
||
3205 |
nSel == 1 ifTrue:[ |
|
4190 | 3206 |
msg := resources string:'enter log message for checkIn of ''%1''' with:(selectedFiles first baseName) |
3892 | 3207 |
] ifFalse:[ |
4190 | 3208 |
nSel > 1 ifTrue:[ |
3209 |
msg := resources string:'enter log message for %1 files to checkIn' with:nSel printString |
|
3210 |
] ifFalse:[ |
|
3211 |
msg := resources string:'enter log message for checkIn' |
|
3212 |
] |
|
3892 | 3213 |
]. |
3214 |
||
3215 |
log := Dialog |
|
4190 | 3216 |
requestText:msg |
3217 |
lines:10 |
|
3218 |
columns:70 |
|
3219 |
initialAnswer:nil. |
|
3892 | 3220 |
|
3221 |
log notNil ifTrue:[ |
|
4190 | 3222 |
sel := self currentFileNameHolder value. |
3223 |
sel isEmpty ifTrue:[ ^ self ]. |
|
3224 |
executionBlock := [ : stream | |
|
3225 |
log notNil ifTrue:[ |
|
3226 |
sel size > 0 ifTrue:[ |
|
3227 |
sel do:[:fn | |
|
3228 |
| dir block | |
|
3229 |
dir := fn directory. |
|
3230 |
cmd := ('cvs commit -m ''' , log , ''' ' , fn baseName). |
|
3231 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir. |
|
3232 |
block value:stream. |
|
3233 |
] |
|
3234 |
] |
|
3235 |
] |
|
3236 |
]. |
|
4107 | 3237 |
]. |
3238 |
nameString := 'Command> cvs commit'. |
|
3239 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
|
3892 | 3240 |
! |
3241 |
||
3242 |
cvsRemoveAndRemoveFromCVS:filesToRemove |
|
3243 |
"remove the selected file(s) and their CVS containers - no questions asked" |
|
3244 |
||
3245 |
|msg toRemove updateRunning cmd executionBlock nameString| |
|
3246 |
||
3247 |
updateRunning := self backgroundProcesses value notEmpty. |
|
3248 |
self killAllRunningBackgroundProcesses. |
|
3249 |
toRemove := OrderedCollection new. |
|
3250 |
||
3251 |
executionBlock := [ : stream | |
|
4190 | 3252 |
| block | |
3253 |
filesToRemove do:[:fileName | |
|
3254 |
OperatingSystem accessDeniedErrorSignal handle:[:ex| |
|
3255 |
"was not able to remove it" |
|
3256 |
| lastError | |
|
3257 |
lastError := OperatingSystem lastErrorString. |
|
3258 |
msg := (resources string:'cannot remove ''%1'' !!' with:fileName). |
|
3259 |
lastError isNil ifFalse:[ |
|
3260 |
msg := msg , '\\(' , lastError , ')' |
|
3261 |
]. |
|
3262 |
Dialog warn:msg withCRs |
|
3263 |
] do:[ |
|
3264 |
|answer contents| |
|
3265 |
||
3266 |
(fileName isSymbolicLink not) ifTrue:[ |
|
3267 |
fileName remove. |
|
3268 |
cmd := ('cvs remove -f ' , fileName baseName). |
|
3269 |
block := self getExecutionBlockForCommand:cmd. |
|
3270 |
block value:stream. |
|
3271 |
] |
|
3272 |
]. |
|
3273 |
]. |
|
3274 |
||
3275 |
cmd := ('cvs commit -m ''removed via FileBrowser'''). |
|
3276 |
block := self getExecutionBlockForCommand:cmd. |
|
3277 |
block value:stream. |
|
3892 | 3278 |
]. |
4107 | 3279 |
nameString := 'Command> cvs remove and commit ', filesToRemove first baseName. |
3892 | 3280 |
filesToRemove size > 1 ifTrue:[ |
4190 | 3281 |
nameString := nameString, ' ...'. |
3892 | 3282 |
]. |
3283 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
|
3284 |
! |
|
3285 |
||
3286 |
cvsRemoveFileAndCVSContainer |
|
3287 |
||
3288 |
|sel question aswer| |
|
3289 |
||
3982 | 3290 |
sel := self currentSelectedFiles. |
3892 | 3291 |
|
3292 |
sel size > 0 ifTrue:[ |
|
4190 | 3293 |
sel size > 1 ifTrue:[ |
3294 |
question := resources string:'Remove %1 selected files and their CVS containers ?' with:(sel size) |
|
3295 |
] ifFalse:[ |
|
3296 |
question := resources string:'Remove ''%1'' and its CVS container ?' with:(sel first baseName allBold) |
|
3297 |
]. |
|
3298 |
||
3299 |
aswer := Dialog |
|
3300 |
confirm:question withCRs |
|
3301 |
yesLabel:(resources at:'Remove') |
|
3302 |
noLabel:(resources at:'Cancel'). |
|
3303 |
aswer ifTrue:[ |
|
3304 |
self withCursor:(Cursor wait) do:[ |
|
3305 |
self cvsRemoveAndRemoveFromCVS:sel |
|
3306 |
] |
|
3307 |
] |
|
3892 | 3308 |
] |
3309 |
! |
|
3310 |
||
3311 |
cvsUpdateAll |
|
3312 |
||
3313 |
| cmd | |
|
3314 |
||
3315 |
cmd := 'cvs upd -l'. |
|
3316 |
self executeCommand:cmd. |
|
3317 |
! |
|
3318 |
||
3319 |
cvsUpdateAllRecursive |
|
3320 |
||
3321 |
| cmd | |
|
3322 |
||
3323 |
cmd := 'cvs upd -d'. |
|
3324 |
self executeCommand:cmd. |
|
3325 |
! |
|
3326 |
||
3327 |
cvsUpdateSelection |
|
3328 |
||
3329 |
| selectedFiles stream| |
|
3330 |
||
3331 |
||
3982 | 3332 |
selectedFiles:= self currentSelectedFiles. |
3892 | 3333 |
stream := WriteStream on:''. |
3334 |
stream nextPutAll:'cvs upd '. |
|
3335 |
selectedFiles do:[: file | |
|
4190 | 3336 |
stream nextPutAll:file baseName. |
3337 |
stream space. |
|
3892 | 3338 |
]. |
3339 |
self executeCommand:stream contents. |
|
3340 |
stream close. |
|
3341 |
! ! |
|
3342 |
||
3343 |
!AbstractFileBrowser methodsFor:'menu actions edit'! |
|
3344 |
||
3345 |
copyInDirContentsBrowser |
|
3346 |
||
3347 |
^ self application:#DirectoryContentsBrowser do:#doCopy. |
|
3348 |
! |
|
3349 |
||
3350 |
cutInDirContentsBrowser |
|
3351 |
||
3352 |
^ self application:#DirectoryContentsBrowser do:#doCut. |
|
3353 |
! |
|
3354 |
||
3355 |
deleteInDirContentsBrowser |
|
3356 |
||
3357 |
^ self application:#DirectoryContentsBrowser do:#doDelete. |
|
3358 |
! ! |
|
3359 |
||
3360 |
!AbstractFileBrowser methodsFor:'menu actions tools'! |
|
3361 |
||
3362 |
createProjectAndOpenProjectBrowser |
|
3363 |
|nm f s directory| |
|
3364 |
||
3365 |
self currentFilesAreInSameDirectory ifFalse:[^ self]. |
|
3366 |
directory := self currentDirectories value first. |
|
3367 |
nm := directory baseName. |
|
3368 |
f := (directory construct:nm) withSuffix:'prj'. |
|
3369 |
f exists ifTrue:[ |
|
4190 | 3370 |
Dialog warn:'A file named ' , f baseName , ' already exists.'. |
3371 |
^ self. |
|
3892 | 3372 |
]. |
3373 |
s := f writeStream. |
|
3374 |
s nextPutAll:' |
|
3375 |
name ''' , nm , ''' |
|
3376 |
type #classLibrary |
|
3377 |
package #''private:' , nm , ''' |
|
3378 |
prerequisites nil |
|
3379 |
||
3380 |
classes #( ) |
|
3381 |
'. |
|
3382 |
s close. |
|
3383 |
ProjectBrowser openOnFile:f. |
|
3384 |
! |
|
3385 |
||
3386 |
fileFileIn |
|
3387 |
"fileIn the selected file(s)" |
|
3388 |
||
3389 |
self fileFileInLazy:false |
|
3390 |
! |
|
3391 |
||
3392 |
fileFileInLazy |
|
3393 |
"fileIn the selected file(s). Do a quick load (no compilation)" |
|
3394 |
||
3395 |
self fileFileInLazy:true |
|
3396 |
! |
|
3397 |
||
3398 |
fileFileInLazy:lazy |
|
3399 |
"fileIn the selected file(s)" |
|
3400 |
||
3401 |
| selectedFiles| |
|
3402 |
||
4156
28bd97c1bf64
show a busy cursor, while filing in
Claus Gittinger <cg@exept.de>
parents:
4151
diff
changeset
|
3403 |
self withWaitCursorDo:[ |
4190 | 3404 |
selectedFiles:= self currentSelectedFiles. |
3405 |
selectedFiles do:[:fileName | |
|
3406 |
self singleFileFileIn:fileName lazy:lazy |
|
3407 |
]. |
|
3892 | 3408 |
]. |
3409 |
! |
|
3410 |
||
3411 |
fileFileInToNameSpace |
|
3412 |
"fileIn the selected file(s)<into a nameSpace" |
|
3413 |
||
3414 |
|ns listOfKnownNameSpaces| |
|
3415 |
||
3416 |
listOfKnownNameSpaces := Set new. |
|
3417 |
NameSpace |
|
4190 | 3418 |
allNamespaces |
3419 |
do:[:eachNameSpace | |
|
3420 |
listOfKnownNameSpaces add:eachNameSpace name |
|
3421 |
]. |
|
3892 | 3422 |
listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort. |
3423 |
||
3424 |
ns := Dialog |
|
4190 | 3425 |
request:'During fileIn, new classes are created in nameSpace:' |
3426 |
initialAnswer:(LastEnforcedNameSpace ? Class nameSpaceQuerySignal query name) |
|
3427 |
list:listOfKnownNameSpaces. |
|
3892 | 3428 |
ns isEmptyOrNil ifTrue:[^ self]. |
3429 |
||
3430 |
LastEnforcedNameSpace := ns. |
|
3431 |
ns := NameSpace name:ns. |
|
3432 |
||
3433 |
Class nameSpaceQuerySignal |
|
4190 | 3434 |
answer:ns |
3435 |
do:[ |
|
3436 |
self fileFileInLazy:false |
|
3437 |
] |
|
3892 | 3438 |
! |
3439 |
||
3440 |
fileFindAllDuplicates |
|
3441 |
"scan directory and all subdirs for duplicate files" |
|
3442 |
||
3443 |
|fileNames dir infoDir filesBySize |
|
3444 |
result info dirPrefix myName stream textBox maxLength directories| |
|
3445 |
||
3446 |
||
3447 |
self withWaitCursorDo:[ |
|
4190 | 3448 |
result := Dictionary new. |
3449 |
myName := self class name asString. |
|
3450 |
directories := self currentSelectedDirectories. |
|
3451 |
directories isEmpty ifTrue:[^ self]. |
|
3892 | 3452 |
|
4190 | 3453 |
dir := directories first. |
3892 | 3454 |
"/ self label: myName, '- gathering file names ...'. |
4190 | 3455 |
fileNames := dir recursiveDirectoryContents. |
3456 |
fileNames := fileNames collect:[:fn | dir construct:fn]. |
|
3457 |
fileNames := fileNames select:[:fn | fn isDirectory not]. |
|
3892 | 3458 |
|
3459 |
"/ self label:myName , '- gathering sizes ...'. |
|
4190 | 3460 |
infoDir := Dictionary new. |
3461 |
fileNames do:[:fn | |
|
3462 |
infoDir at:fn put:(fn fileSize) |
|
3463 |
]. |
|
3464 |
||
3465 |
"/ for each, get the files size. |
|
3466 |
"/ in a first pass, look for files of the same size and |
|
3467 |
"/ compare them ... |
|
3892 | 3468 |
|
3469 |
"/ self label:myName , '- preselect possible duplicates ...'. |
|
4190 | 3470 |
filesBySize := Dictionary new. |
3471 |
infoDir keysAndValuesDo:[:fn :sz | |
|
3472 |
|entry| |
|
3473 |
||
3474 |
entry := filesBySize at:sz ifAbsentPut:[Set new]. |
|
3475 |
entry add:fn. |
|
3476 |
]. |
|
3477 |
||
3478 |
"/ any of same size ? |
|
3892 | 3479 |
|
3480 |
"/ self label:myName , '- checking for duplicates ...'. |
|
4190 | 3481 |
filesBySize do:[:entry | |
3482 |
|files| |
|
3483 |
||
3484 |
entry size > 1 ifTrue:[ |
|
3485 |
files := entry asArray. |
|
3486 |
1 to:files size-1 do:[:idx1 | |
|
3487 |
idx1+1 to:files size do:[:idx2 | |
|
3488 |
|fn1 fn2| |
|
3489 |
||
3490 |
fn1 := files at:idx1. |
|
3491 |
fn2 := files at:idx2. |
|
3892 | 3492 |
|
3493 |
"/ self label:myName , '- checking ' , fn1 baseName , ' vs. ' , fn2 baseName , ' ...'. |
|
4190 | 3494 |
(result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[ |
3495 |
"/ compare the files |
|
3496 |
(fn1 sameContentsAs:fn2) ifTrue:[ |
|
3892 | 3497 |
"/ Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName. |
4190 | 3498 |
result at:fn1 put:fn2. |
3499 |
] |
|
3500 |
] |
|
3501 |
] |
|
3502 |
] |
|
3503 |
] |
|
3504 |
]. |
|
3892 | 3505 |
|
3506 |
"/ self label:myName , '- sorting ...'. |
|
4190 | 3507 |
dirPrefix := dir pathName. |
3508 |
result := result associations. |
|
3509 |
result := result collect:[:assoc | |
|
3510 |
|f1 f2| |
|
3511 |
||
3512 |
f1 := assoc key name. |
|
3513 |
f2 := assoc value name. |
|
3514 |
(f1 startsWith:dirPrefix) ifTrue:[ |
|
3515 |
f1 := f1 copyFrom:dirPrefix size + 2. |
|
3516 |
]. |
|
3517 |
(f2 startsWith:dirPrefix) ifTrue:[ |
|
3518 |
f2 := f2 copyFrom:dirPrefix size + 2. |
|
3519 |
]. |
|
3520 |
f1 < f2 ifTrue:[ |
|
3521 |
f2 -> f1 |
|
3522 |
] ifFalse:[ |
|
3523 |
f1 -> f2 |
|
3524 |
] |
|
3525 |
]. |
|
3526 |
result sort:[:f1 :f2 | f2 value < f1 value]. |
|
3527 |
||
3528 |
info := OrderedCollection new. |
|
3529 |
result do:[:assoc | |
|
3530 |
info add:(assoc key , ' same as ' , assoc value) |
|
3531 |
]. |
|
3532 |
info isEmpty ifTrue:[ |
|
3533 |
info := 'No duplicate files found.' |
|
3534 |
]. |
|
3892 | 3535 |
]. |
3536 |
||
3537 |
stream := WriteStream on:''. |
|
3538 |
info do:[:el| |
|
4190 | 3539 |
stream nextPutAll:el. |
3540 |
stream cr. |
|
3892 | 3541 |
]. |
3542 |
textBox := TextBox new. |
|
3543 |
textBox initialText:(stream contents). |
|
3544 |
textBox title:'File dublicates in directory: ', dir asString. |
|
3545 |
textBox readOnly:true. |
|
3546 |
textBox noCancel. |
|
3547 |
textBox label:'Dublicates in ', dir asString. |
|
3548 |
maxLength := 10. |
|
3549 |
info do:[: el | |
|
4190 | 3550 |
maxLength := maxLength max:(el size). |
3892 | 3551 |
]. |
3552 |
textBox extent:((maxLength * 5)@(info size * 20)); sizeFixed:false. |
|
3553 |
textBox showAtPointer. |
|
3554 |
stream close. |
|
3555 |
"/ subView contents:info. |
|
3556 |
"/ self label:myName. |
|
3557 |
! |
|
3558 |
||
3559 |
fileFindDuplicates |
|
3560 |
"scan directory for duplicate files" |
|
3561 |
||
4050 | 3562 |
|fileNames infoDir filesBySize |
3892 | 3563 |
result info stream textBox maxLength directories allFiles titleStream size| |
3564 |
||
3565 |
"/ (self askIfModified:'contents has not been saved.\\Modifications will be lost when you proceed.' |
|
3566 |
"/ yesButton:'proceed') ifFalse:[^ self]. |
|
3567 |
||
3568 |
self withWaitCursorDo:[ |
|
4190 | 3569 |
result := Dictionary new. |
3570 |
||
3571 |
directories := self currentSelectedDirectories. |
|
3572 |
directories isEmpty ifTrue:[^ self]. |
|
3573 |
||
3574 |
allFiles := OrderedCollection new. |
|
3575 |
directories do:[ : dir| |
|
3576 |
fileNames := dir directoryContents. |
|
3577 |
fileNames := fileNames collect:[:fn | dir construct:fn]. |
|
3578 |
fileNames := fileNames select:[:fn | fn isDirectory not]. |
|
3579 |
allFiles addAll:fileNames. |
|
3580 |
]. |
|
3581 |
||
3582 |
infoDir := Dictionary new. |
|
3583 |
allFiles do:[:fn | |
|
3584 |
infoDir at:fn put:(fn info) |
|
3585 |
]. |
|
3586 |
||
3587 |
"/ for each, get the files size. |
|
3588 |
"/ in a first pass, look for files of the same size and |
|
3589 |
"/ compare them ... |
|
3590 |
||
3591 |
filesBySize := Dictionary new. |
|
3592 |
infoDir keysAndValuesDo:[:fn :info | |
|
3593 |
|sz entry| |
|
3594 |
||
3595 |
sz := info size. |
|
3596 |
entry := filesBySize at:sz ifAbsentPut:[Set new]. |
|
3597 |
entry add:fn. |
|
3598 |
]. |
|
3599 |
||
3600 |
"/ any of same size ? |
|
3601 |
||
3602 |
filesBySize do:[:entry | |
|
3603 |
|files| |
|
3604 |
||
3605 |
entry size > 1 ifTrue:[ |
|
3606 |
files := entry asArray. |
|
3607 |
1 to:files size-1 do:[:idx1 | |
|
3608 |
idx1+1 to:files size do:[:idx2 | |
|
3609 |
|fn1 fn2| |
|
3610 |
||
3611 |
fn1 := files at:idx1. |
|
3612 |
fn2 := files at:idx2. |
|
3613 |
||
3614 |
(result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[ |
|
3615 |
"/ compare the files |
|
3616 |
(fn1 sameContentsAs:fn2) ifTrue:[ |
|
3892 | 3617 |
"/ Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName. |
4190 | 3618 |
result at:fn1 put:fn2. |
3619 |
] |
|
3620 |
] |
|
3621 |
] |
|
3622 |
] |
|
3623 |
] |
|
3624 |
]. |
|
3625 |
||
3626 |
result := result associations. |
|
3627 |
result := result collect:[:assoc | |
|
3628 |
|f1 f2| |
|
3629 |
||
3630 |
f1 := assoc key asString. |
|
3631 |
f2 := assoc value asString. |
|
3632 |
f1 < f2 ifTrue:[ |
|
3633 |
f2 -> f1 |
|
3634 |
] ifFalse:[ |
|
3635 |
f1 -> f2 |
|
3636 |
] |
|
3637 |
]. |
|
3638 |
result sort:[:f1 :f2 | f2 value < f1 value]. |
|
3639 |
||
3640 |
info := OrderedCollection new. |
|
3641 |
size := self getBestDirectory asString size. |
|
3642 |
result do:[:assoc | |
|
3643 |
|fn1 fn2| |
|
3644 |
||
3645 |
fn1 := assoc key. |
|
3646 |
fn2 := assoc value. |
|
3647 |
size > 1 ifTrue:[ |
|
3648 |
fn1 := ('..', (fn1 copyFrom:(size + 1))). |
|
3649 |
fn2 := ('..', (fn2 copyFrom:(size + 1))). |
|
3650 |
]. |
|
3651 |
(fn1 includes:Character space) ifTrue:[ |
|
3652 |
fn1 := '"' , fn1 , '"' |
|
3653 |
]. |
|
3654 |
(fn2 includes:Character space) ifTrue:[ |
|
3655 |
fn2 := '"' , fn2 , '"' |
|
3656 |
]. |
|
3657 |
info add:(fn1 , ' same as ' , fn2) |
|
3658 |
]. |
|
3659 |
info isEmpty ifTrue:[ |
|
3660 |
info add:'No duplicate files found.' |
|
3661 |
]. |
|
3892 | 3662 |
]. |
3663 |
stream := WriteStream on:''. |
|
3664 |
info do:[:el| |
|
4190 | 3665 |
stream nextPutAll:el. |
3666 |
stream cr. |
|
3892 | 3667 |
]. |
3668 |
titleStream := WriteStream on:''. |
|
3669 |
titleStream nextPutAll:'File dublicates in director'. |
|
3670 |
directories size == 1 ifTrue:[ |
|
4190 | 3671 |
titleStream nextPutAll:'y: ', directories first asString. |
3892 | 3672 |
] ifFalse:[ |
4190 | 3673 |
titleStream nextPutAll:'ies: '. |
3674 |
titleStream cr. |
|
3675 |
directories do:[:dir| |
|
3676 |
size > 1 ifTrue:[ |
|
3677 |
titleStream nextPutAll:'..'. |
|
3678 |
titleStream nextPutAll:((dir asString) copyFrom:(size + 1)). |
|
3679 |
] ifFalse:[ |
|
3680 |
titleStream nextPutAll:(dir asString). |
|
3681 |
]. |
|
3682 |
titleStream cr. |
|
3683 |
] |
|
3892 | 3684 |
]. |
3685 |
||
3686 |
textBox := TextBox new. |
|
3687 |
textBox initialText:(stream contents). |
|
3688 |
textBox title:(titleStream contents). |
|
3689 |
textBox readOnly:true. |
|
3690 |
textBox noCancel. |
|
4170 | 3691 |
stream := WriteStream on:'Dublicates in '. |
3692 |
directories do:[ :aDirectory | |
|
4190 | 3693 |
stream nextPutAll:aDirectory baseName |
3694 |
stream space |
|
4050 | 3695 |
]. |
4170 | 3696 |
textBox label:stream contents. |
3892 | 3697 |
maxLength := 10. |
3698 |
info do:[: el | |
|
4190 | 3699 |
maxLength := maxLength max:(el size). |
3892 | 3700 |
]. |
3701 |
textBox extent:((maxLength * 5)@(info size * 10)); sizeFixed:false. |
|
3702 |
textBox showAtPointer. |
|
3703 |
titleStream close. |
|
3704 |
stream close. |
|
3705 |
! |
|
3706 |
||
3707 |
fileFindFile |
|
3708 |
|filename files| |
|
3709 |
||
3710 |
files := self currentFileNameHolder value. |
|
3711 |
files notEmpty ifTrue:[ |
|
4190 | 3712 |
filename := files first. |
3892 | 3713 |
] ifFalse:[ |
4190 | 3714 |
filename := (Filename homeDirectory). |
3892 | 3715 |
]. |
4101 | 3716 |
FindFileApplication openOnFileName:filename for:self. |
3892 | 3717 |
! |
3718 |
||
3719 |
installAllAsAutoloaded |
|
3720 |
"install all classes found here as autoloaded classes" |
|
3721 |
||
3722 |
self allItemsOfCurrentDirectory do:[:fileItem | |
|
4190 | 3723 |
(fileItem hasMimeType and:[fileItem mimeType isSmalltalkSource]) ifTrue:[ |
3724 |
self installAsAutoloaded:(fileItem fileName). |
|
3725 |
] |
|
3892 | 3726 |
]. |
3727 |
! |
|
3728 |
||
3729 |
installAsAutoloaded:aFilename |
|
3730 |
"install aFilename as autoloaded class" |
|
3731 |
||
3732 |
|chunks s| |
|
3733 |
||
3734 |
chunks := ChangeSet fromStream:(s := aFilename asFilename readStream). s close. |
|
3735 |
chunks |
|
4190 | 3736 |
select:[:eachChunk | eachChunk isClassDefinitionChange] |
3737 |
thenDo:[:eachClassChunk | eachClassChunk installAsAutoloadedClassIfNotPrivate]. |
|
3892 | 3738 |
! |
3739 |
||
3740 |
loadImageAndPerform:aSelectorOrBlock |
|
3741 |
||
3742 |
|img path files| |
|
3743 |
||
3982 | 3744 |
files := self currentSelectedFiles. |
3892 | 3745 |
files isEmpty ifTrue:[ ^ self]. |
3746 |
files do:[:fileName | |
|
4190 | 3747 |
path := fileName. |
3748 |
path isDirectory ifFalse:[ |
|
3749 |
img := Image fromFile:(path pathName). |
|
3750 |
img notNil ifTrue:[ |
|
3751 |
aSelectorOrBlock isSymbol ifTrue:[ |
|
3752 |
img perform:aSelectorOrBlock |
|
3753 |
] ifFalse:[ |
|
3754 |
aSelectorOrBlock value:img |
|
3755 |
] |
|
3756 |
] ifFalse:[ |
|
3757 |
Dialog warn:'unknown format: ' , fileName asString |
|
3758 |
] |
|
3759 |
] |
|
3892 | 3760 |
]. |
3761 |
! |
|
3762 |
||
3763 |
openASN1Browser |
|
3764 |
||
3765 |
self openTool:OSI::ASN1Browser |
|
3766 |
! |
|
3767 |
||
3768 |
openAppletViewer |
|
3769 |
|numItems files| |
|
3770 |
||
3982 | 3771 |
files := self currentSelectedFiles. |
3892 | 3772 |
(numItems := files size) > 2 ifTrue:[ |
4190 | 3773 |
(self |
3774 |
confirm:(resources string:'open for each of the %1 items ?' |
|
3775 |
with:numItems)) ifFalse:[^ self]. |
|
3892 | 3776 |
]. |
3777 |
||
3778 |
Java startupJavaSystem. |
|
3779 |
"/ Java markAllClassesUninitialized. |
|
3780 |
"/ Java initAllStaticFields. |
|
3781 |
"/ Java initAllClasses. |
|
3782 |
||
3783 |
files do:[:fileName | |
|
4190 | 3784 |
|p path| |
3785 |
||
3786 |
path := fileName. |
|
3787 |
path isDirectory ifFalse:[ |
|
3788 |
p := Java |
|
3789 |
javaProcessForMainOf:(Java classForName:'sun.applet.AppletViewer') |
|
3790 |
argumentString:path pathName. |
|
3791 |
p resume. |
|
3792 |
] |
|
3892 | 3793 |
]. |
3794 |
! |
|
3795 |
||
3796 |
openCBrowser |
|
3797 |
||
3798 |
|directories| |
|
3799 |
||
3982 | 3800 |
directories := self currentSelectedDirectories. |
3892 | 3801 |
directories isEmpty ifTrue:[ ^ self]. |
3802 |
self withWaitCursorDo:[ |
|
4190 | 3803 |
CBrowser::Browser openIn:directories first. |
3892 | 3804 |
] |
3805 |
! |
|
3806 |
||
3807 |
openChangesBrowser |
|
3808 |
"open a change browser on the selected file(s)" |
|
3809 |
||
3810 |
self openTool:(UserPreferences current changesBrowserClass) |
|
3811 |
! |
|
3812 |
||
3813 |
openDiffView |
|
3814 |
"open a diff-view" |
|
3815 |
||
4170 | 3816 |
| name1 name2 text1 text2 d err nm l1 files title defaultName lastFile| |
3892 | 3817 |
|
3982 | 3818 |
files := self currentSelectedFiles. |
3892 | 3819 |
files isEmpty ifTrue:[ |
4190 | 3820 |
Dialog warn:'you have to select a file first'. |
3821 |
^ self. |
|
3892 | 3822 |
]. |
3823 |
(files size == 2) ifTrue:[ |
|
4190 | 3824 |
name1 := files last. |
3825 |
name2 := files first. |
|
3892 | 3826 |
] ifFalse:[ |
4190 | 3827 |
LastFileDiffFile notNil ifTrue:[ |
3828 |
| directories | |
|
3829 |
directories := self currentDirectories value. |
|
3830 |
directories notEmpty ifTrue:[ |
|
3831 |
lastFile := directories first asFilename construct:(LastFileDiffFile baseName). |
|
3832 |
(lastFile exists and:[lastFile isReadable]) ifTrue:[ |
|
3833 |
name1 := lastFile. |
|
3834 |
] |
|
3835 |
] |
|
3836 |
]. |
|
3837 |
name2 := files first. |
|
3838 |
title := 'show difference between ', name2 baseName, ' and:'. |
|
3839 |
defaultName := name1 notNil ifTrue:[name1 baseName] ifFalse:[nil]. |
|
3840 |
name1 := DialogBox |
|
3841 |
requestFileName:title |
|
3842 |
default:defaultName |
|
3843 |
ok:'OK' |
|
3844 |
abort:'Use File List' |
|
3845 |
pattern:'*' |
|
3846 |
fromDirectory:(name2 asFilename directory). |
|
4060 | 3847 |
|
3848 |
||
3849 |
||
3892 | 3850 |
]. |
3851 |
||
3852 |
(name1 isNil or:[name1 asString isEmpty]) ifTrue:[ |
|
4190 | 3853 |
text1 := self getAllFilesAsStringCollection asStringCollection withTabs. |
3854 |
text1 := text1 collect:[:l | l isNil ifTrue:[' '] ifFalse:[l]]. |
|
3855 |
name1 := nil. |
|
3856 |
l1 := 'browser contents' |
|
3892 | 3857 |
] ifFalse:[ |
4190 | 3858 |
name1 := name1 asFilename. |
3859 |
LastFileDiffFile := name1. |
|
3860 |
name1 asFilename isReadable ifFalse:[ |
|
3861 |
nm := name1. |
|
3862 |
name1 asFilename exists ifFalse:[ |
|
3863 |
err := '%1 does not exist'. |
|
3864 |
] ifTrue:[ |
|
3865 |
err := '%1 is not readable' |
|
3866 |
]. |
|
3867 |
]. |
|
3868 |
l1 := name1 |
|
3892 | 3869 |
]. |
3870 |
||
3871 |
err isNil ifTrue:[ |
|
4190 | 3872 |
name2 isReadable ifFalse:[ |
3873 |
nm := name2. |
|
3874 |
name2 exists ifFalse:[ |
|
3875 |
err := '%1 does not exist'. |
|
3876 |
] ifTrue:[ |
|
3877 |
err := '%1 is not readable' |
|
3878 |
]. |
|
3879 |
]. |
|
3892 | 3880 |
]. |
3881 |
err notNil ifTrue:[ |
|
4190 | 3882 |
Dialog warn:(resources string:err with:nm pathName). |
3883 |
^ self |
|
3892 | 3884 |
]. |
3885 |
||
3886 |
self withWaitCursorDo:[ |
|
4190 | 3887 |
name1 notNil ifTrue:[ |
3888 |
text1 := name1 contents. |
|
3889 |
]. |
|
3890 |
text2 := name2 contents. |
|
3891 |
text1 = text2 ifTrue:[ |
|
3892 |
self information:'same contents' |
|
3893 |
] ifFalse:[ |
|
3894 |
d := DiffTextView |
|
3895 |
openOn:text1 label:l1 |
|
3896 |
and:text2 label:name2 pathName. |
|
3897 |
d topView label:'file differences'. |
|
3898 |
] |
|
3892 | 3899 |
] |
3900 |
! |
|
3901 |
||
3902 |
openEditor |
|
3903 |
self openTool:EditTextView |
|
3904 |
! |
|
3905 |
||
3906 |
openHTMLReader |
|
3907 |
||
3908 |
self openTool:HTMLDocumentView ignoreDirectories:false |
|
3909 |
! |
|
3910 |
||
3911 |
openImageEditor |
|
3912 |
||
3913 |
[self loadImageAndPerform:#edit] fork |
|
3914 |
! |
|
3915 |
||
3916 |
openImageInspector |
|
3917 |
[self loadImageAndPerform:#inspect] fork |
|
3918 |
! |
|
3919 |
||
3920 |
openImagePreview |
|
3921 |
||
3922 |
[self loadImageAndPerform:[:img | |
|
4190 | 3923 |
|i top viewer| |
3924 |
||
3925 |
top := StandardSystemView new. |
|
3926 |
||
3927 |
viewer := ImageView origin:0.0@0.0 corner:1.0@1.0 in:top. |
|
3928 |
i := img. |
|
3929 |
top extent:200@200. |
|
3930 |
top label:(img fileName asFilename directoryName asFilename baseName , '/' , img fileName asFilename baseName). |
|
3931 |
top openAndWait. |
|
3932 |
||
3933 |
(i width > 200 or:[i height > 200]) ifTrue:[ |
|
3934 |
i := i magnifiedPreservingRatioTo:200@200. |
|
3935 |
]. |
|
3936 |
viewer image:i. |
|
3937 |
]. |
|
3892 | 3938 |
] fork |
3939 |
! |
|
3940 |
||
3941 |
openMP3Player |
|
3942 |
|file| |
|
3943 |
||
3982 | 3944 |
file := self currentSelectedFiles. |
3892 | 3945 |
(file isEmpty) ifTrue:[ |
4190 | 3946 |
^ self. |
3892 | 3947 |
]. |
3948 |
file := file first. |
|
3949 |
(MP3PlayerApplication ? SaugFix::MP3PlayerApplication) playSong:file. |
|
3950 |
! |
|
3951 |
||
3952 |
openSlideShow |
|
3953 |
||
3954 |
|directories dir| |
|
3955 |
||
3982 | 3956 |
directories := self currentSelectedDirectories. |
3892 | 3957 |
directories isEmpty ifTrue:[^ self]. |
3958 |
||
3959 |
dir := directories first. |
|
3960 |
CodingExamples_GUI::SlideShow openIn:dir. |
|
3961 |
! |
|
3962 |
||
3963 |
openSnapshotImageBrowser |
|
3964 |
^ self openTool:SystemBrowser with:#openOnSnapShotImage: ignoreDirectories:true |
|
3965 |
! |
|
3966 |
||
3967 |
openTerminal |
|
3968 |
||
3969 |
|directories dir| |
|
3970 |
||
3982 | 3971 |
directories := self currentSelectedDirectories. |
3892 | 3972 |
directories isEmpty ifTrue:[ |
4190 | 3973 |
dir := Filename homeDirectory. |
3892 | 3974 |
] ifFalse:[ |
4190 | 3975 |
dir := directories first. |
3892 | 3976 |
]. |
3977 |
||
3978 |
VT100TerminalView openShellIn:dir. |
|
3979 |
! |
|
3980 |
||
3981 |
openTool:aToolClass |
|
3982 |
"open a tool on the selected file(s)" |
|
3983 |
||
3984 |
^ self openTool:aToolClass ignoreDirectories:true |
|
3985 |
! |
|
3986 |
||
3987 |
openTool:aToolClass ignoreDirectories:ignoreDirs |
|
3988 |
"open a tool on the selected file(s)" |
|
3989 |
||
3990 |
^ self |
|
4190 | 3991 |
openTool:aToolClass |
3992 |
with:#openOn: |
|
3993 |
ignoreDirectories:ignoreDirs |
|
3892 | 3994 |
! |
3995 |
||
3996 |
openTool:aToolClass with:aSelector ignoreDirectories:ignoreDirs |
|
3997 |
"open a tool on the selected file(s)" |
|
3998 |
||
3999 |
|numItems path tool files| |
|
4000 |
||
4001 |
aToolClass isNil ifTrue:[ |
|
4190 | 4002 |
Dialog warn:'Sorry, that tool seems to be not available'. |
4003 |
^ nil. |
|
3892 | 4004 |
]. |
3982 | 4005 |
files := self currentSelectedFiles. |
3892 | 4006 |
|
4007 |
(numItems := files size) > 2 ifTrue:[ |
|
4190 | 4008 |
(self |
4009 |
confirm:(resources string:'open for each of the %1 items ?' |
|
4010 |
with:numItems)) ifFalse:[^ self]. |
|
3892 | 4011 |
]. |
4012 |
||
4013 |
self withWaitCursorDo:[ |
|
4190 | 4014 |
files do:[:fileName | |
4015 |
(ignoreDirs not or:[fileName isDirectory not]) ifTrue:[ |
|
4016 |
fileName isAbsolute ifTrue:[ |
|
4017 |
path := fileName getName. |
|
4018 |
] ifFalse:[ |
|
4019 |
path := fileName pathName. |
|
4020 |
]. |
|
4021 |
tool := aToolClass perform:aSelector with:path. |
|
4022 |
] |
|
4023 |
]. |
|
3892 | 4024 |
]. |
4025 |
^ tool |
|
4026 |
! |
|
4027 |
||
4028 |
openZipTool |
|
4029 |
|zipTool directories dir| |
|
4030 |
||
4031 |
(zipTool := self openTool:ZipTool) notNil ifTrue:[ |
|
4190 | 4032 |
directories := self currentSelectedDirectories. |
4033 |
directories isEmpty ifTrue:[ |
|
4034 |
dir := directories first. |
|
4035 |
] ifFalse:[ |
|
4036 |
dir := Filename homeDirectory. |
|
4037 |
]. |
|
4038 |
||
4039 |
zipTool initialExtractDirectory:dir. |
|
3892 | 4040 |
]. |
4041 |
! |
|
4042 |
||
4043 |
readAbbrevFile |
|
4044 |
"read the abbrev file and install classes found there as autoloaded classes" |
|
4045 |
||
4046 |
| directories dir| |
|
4047 |
||
3982 | 4048 |
directories := self currentSelectedDirectories. |
3892 | 4049 |
directories isEmpty ifTrue:[^ self]. |
4050 |
||
4051 |
dir := directories first. |
|
4052 |
Smalltalk installAutoloadedClassesFrom:(dir construct:'abbrev.stc'). |
|
4053 |
! |
|
4054 |
||
4055 |
singleFileFileIn:fileName lazy:lazy |
|
4056 |
"fileIn the selected file(s)" |
|
4057 |
||
4058 |
|aStream wasLazy| |
|
4059 |
||
4060 |
fileName type == #regular ifTrue:[ |
|
4061 |
||
4190 | 4062 |
(ObjectFileLoader notNil |
4063 |
and:[ObjectFileLoader hasValidBinaryExtension:fileName]) ifTrue:[ |
|
4064 |
AbortOperationRequest catch:[ |
|
4065 |
|p| |
|
4066 |
||
4067 |
"/ |
|
4068 |
"/ look if already loaded ... then unload first |
|
4069 |
"/ |
|
4070 |
p := fileName pathName. |
|
4071 |
(ObjectFileLoader loadedObjectFiles includes:p) ifTrue:[ |
|
4072 |
(Dialog confirm:(resources |
|
4073 |
string:'%1 is already loaded; load anyway ?' |
|
4074 |
with:p)) ifFalse:[ |
|
4075 |
^ self |
|
4076 |
]. |
|
4077 |
Transcript showCR:'unloading old ' , p , ' ...'. |
|
4078 |
ObjectFileLoader unloadObjectFile:p. |
|
4079 |
]. |
|
4080 |
||
4081 |
Transcript showCR:'loading ' , p , ' ...'. |
|
4082 |
ObjectFileLoader loadObjectFile:p. |
|
4083 |
Class addInfoRecord:('fileIn ' , fileName asFilename pathName) |
|
4084 |
] |
|
4085 |
] ifFalse:[ ((fileName hasSuffix:'cls') |
|
4086 |
and:[((fileName mimeTypeOfContents ? '') startsWith:'application/x-smalltalk-source') not ]) ifTrue:[ |
|
4087 |
"/ loading a binary class file |
|
4088 |
aStream := fileName readStream. |
|
4089 |
aStream notNil ifTrue:[ |
|
4090 |
aStream fileInBinary. |
|
4091 |
] |
|
4092 |
] ifFalse:[ |
|
4093 |
((fileName hasSuffix:'class') |
|
4094 |
or:[(fileName hasSuffix:'cla')]) ifTrue:[ |
|
4095 |
"/ loading a java class file |
|
4096 |
JavaClassReader notNil ifTrue:[ |
|
4097 |
JavaClassReader loadFile:(fileName pathName) |
|
4098 |
] |
|
4099 |
] ifFalse:[ (fileName hasSuffix:'sif') ifTrue:[ |
|
4100 |
"/ loading a sif (smalltalk interchange format) file |
|
4101 |
SmalltalkInterchangeSTXFileInManager autoload. |
|
4102 |
SmalltalkInterchangeFileManager newForFileIn |
|
4103 |
fileName: fileName pathName; |
|
4104 |
fileIn. |
|
4105 |
] ifFalse:[ (fileName hasSuffix:'pcl') ifTrue:[ |
|
4106 |
Parcel isNil ifTrue:[ |
|
4107 |
Dialog warn:'Parcel support not loaded.' |
|
4108 |
] ifFalse:[ |
|
4109 |
Parcel loadParcelFrom: fileName pathName |
|
4110 |
] |
|
4111 |
] ifFalse:[ |
|
4112 |
"/ loading a regular (chunk) or xml source file |
|
4113 |
aStream := fileName readStream. |
|
4114 |
aStream notNil ifTrue:[ |
|
4115 |
Error handle:[ : ex | |
|
4116 |
Dialog warn:'Error on file in: ', ex errorString. |
|
4117 |
] do:[ |
|
4118 |
[ |
|
4119 |
Class withoutUpdatingChangesDo:[ |
|
4120 |
wasLazy := Compiler compileLazy:lazy. |
|
4121 |
aStream fileIn. |
|
4122 |
]. |
|
4123 |
Class addInfoRecord:('fileIn ' , fileName asString) |
|
4124 |
] ensure:[ |
|
4125 |
Compiler compileLazy:wasLazy. |
|
4126 |
aStream close |
|
4127 |
] |
|
4128 |
] |
|
4129 |
] |
|
4130 |
]]] |
|
4131 |
]] |
|
3892 | 4132 |
]. |
4133 |
! ! |
|
4134 |
||
4135 |
!AbstractFileBrowser methodsFor:'menu queries cvs'! |
|
4136 |
||
4137 |
canCvsAddAndCommit |
|
4138 |
||
3982 | 4139 |
|selectedFiles| |
4140 |
||
4141 |
selectedFiles := self currentSelectedFiles. |
|
4142 |
^ (selectedFiles notEmpty and:[self currentFilesAreInSameDirectory]). |
|
3892 | 4143 |
! |
4144 |
||
4145 |
canRemoveCVSContainer |
|
4146 |
||
3982 | 4147 |
|selectedFiles dirOfFile cvsDir| |
4148 |
||
4149 |
selectedFiles := self currentSelectedFiles. |
|
4150 |
selectedFiles isEmpty ifTrue:[^ false]. |
|
4151 |
^ ((selectedFiles detect:[:fileName| |
|
4190 | 4152 |
dirOfFile := self getDirWithoutFileName:fileName. |
4153 |
cvsDir := dirOfFile construct:'CVS'. |
|
4154 |
(cvsDir isDirectory and:[cvsDir exists]) |
|
3892 | 4155 |
] ifNone:[nil]) notNil). |
4156 |
! ! |
|
4157 |
||
4158 |
!AbstractFileBrowser methodsFor:'menu queries tools'! |
|
4159 |
||
4160 |
anySTFilesPresent |
|
4161 |
||
4162 |
^ self anyFilesPresentWithSuffix:'st' |
|
4163 |
! |
|
4164 |
||
4165 |
canCreateNewProject |
|
4166 |
||
3982 | 4167 |
| selectedFiles | |
3892 | 4168 |
|
4169 |
self currentFilesAreInSameDirectory ifFalse:[^ false]. |
|
3982 | 4170 |
selectedFiles := self currentSelectedFiles. |
3892 | 4171 |
^ [ |
4190 | 4172 |
((selectedFiles detect:[:fileName| | suffix| |
4173 |
suffix := fileName suffix asLowercase. |
|
4174 |
(suffix = 'prj' or:[suffix = 'st']) |
|
4175 |
] ifNone:[nil]) notNil) |
|
3982 | 4176 |
] |
3892 | 4177 |
! |
4178 |
||
4179 |
canDoTerminal |
|
4180 |
||
4181 |
^ OperatingSystem isUNIXlike |
|
4182 |
or:[OperatingSystem isMSWINDOWSlike] |
|
4183 |
! |
|
4184 |
||
4185 |
canDoTerminalAndSystemIsDOS |
|
4186 |
||
4187 |
^ self canDoTerminal and:[OperatingSystem isMSWINDOWSlike] |
|
4188 |
! |
|
4189 |
||
4190 |
canDoTerminalAndSystemIsUnix |
|
4191 |
||
4192 |
^ self canDoTerminal and:[OperatingSystem isUNIXlike] |
|
4193 |
! |
|
4194 |
||
4195 |
canReadAbbrevFile |
|
4196 |
||
4197 |
||
4198 |
self currentFilesAreInSameDirectory ifFalse:[^ false]. |
|
4199 |
^ (self currentDirectories value first construct:'abbrev.stc') exists |
|
4200 |
! |
|
4201 |
||
4202 |
canRemoveFromSourcePath |
|
4203 |
||
4204 |
^ false |
|
4205 |
! |
|
4206 |
||
4207 |
hasASN1 |
|
4208 |
^ [ OSI::ASN1Parser notNil |
|
4190 | 4209 |
and:[OSI::ASN1Parser isLoaded]] |
3892 | 4210 |
|
4211 |
! |
|
4212 |
||
4213 |
hasASN1AndSelection |
|
4214 |
^ [ self hasSelection value |
|
4190 | 4215 |
and:[self currentSelectedFiles size > 0 |
4216 |
and:[OSI::ASN1Parser notNil |
|
4217 |
and:[OSI::ASN1Parser isLoaded]]]] |
|
3892 | 4218 |
! |
4219 |
||
4220 |
hasCBrowser |
|
4221 |
^ [ CBrowser::Browser notNil ] |
|
4222 |
! |
|
4223 |
||
4224 |
hasJava |
|
4225 |
||
4226 |
^ [ JavaClassReader notNil |
|
4190 | 4227 |
and:[JavaClassReader isLoaded]] |
3892 | 4228 |
! |
4229 |
||
4230 |
hasJavaAndSelection |
|
4231 |
||
3982 | 4232 |
^ [ self currentSelectedFiles size > 0 |
4190 | 4233 |
and:[JavaClassReader notNil |
4234 |
and:[JavaClassReader isLoaded]]] |
|
3892 | 4235 |
! |
4236 |
||
4237 |
hasMP3Player |
|
4238 |
||
4239 |
^ [ MP3PlayerApplication notNil |
|
4190 | 4240 |
or:[SaugFix::MP3PlayerApplication notNil ]] |
3892 | 4241 |
! |
4242 |
||
4243 |
hasMP3PlayerAndSelection |
|
4244 |
||
3982 | 4245 |
^ [ self currentSelectedFiles size > 0 |
4190 | 4246 |
and:[ self hasMP3Player value]] |
3892 | 4247 |
! |
4248 |
||
4249 |
hasSlideShow |
|
4250 |
||
4251 |
^ [CodingExamples_GUI::SlideShow notNil] |
|
4252 |
! |
|
4253 |
||
4254 |
hasSnapshotSelection |
|
4255 |
||
4256 |
^ [ |
|
4190 | 4257 |
| files | |
4258 |
files := self currentSelectedFiles. |
|
4259 |
((files size == 1) |
|
4260 |
and:[ files first hasSuffix:'img' ]) |
|
3892 | 4261 |
] |
4262 |
! |
|
4263 |
||
4264 |
hasZipFileSelected |
|
4265 |
||
3982 | 4266 |
^ [|sel fileName fn suff| |
4267 |
||
4190 | 4268 |
sel := self currentSelectedFiles. |
4269 |
sel size == 1 ifTrue:[ |
|
4270 |
fileName := sel first. |
|
4271 |
fileName notNil ifTrue:[ |
|
4272 |
suff := fileName suffix asLowercase. |
|
4273 |
suff = 'zip' or:[suff = 'jar'] |
|
4274 |
] ifFalse:[ |
|
4275 |
false |
|
4276 |
] |
|
4277 |
] ifFalse:[ |
|
4278 |
false |
|
4279 |
] |
|
3892 | 4280 |
] |
4281 |
! |
|
4282 |
||
4283 |
javaSupportLoaded |
|
4284 |
||
4285 |
^ false |
|
4286 |
! ! |
|
4287 |
||
3906 | 4288 |
!AbstractFileBrowser methodsFor:'presentation'! |
4289 |
||
4290 |
getModeString:modeBits |
|
4291 |
"convert file-mode bits into a more user-friendly string. |
|
4292 |
This is wrong here - should be moved into OperatingSystem." |
|
4293 |
||
4294 |
^ self getModeString:modeBits |
|
4190 | 4295 |
with:#( 'owner:' $r $w $x |
4296 |
' group:' $r $w $x |
|
4297 |
' others:' $r $w $x ) |
|
3906 | 4298 |
! |
4299 |
||
4300 |
getModeString:modeBits with:texts |
|
4301 |
"convert file-mode bits into a more user-friendly string. |
|
4302 |
This is wrong here - should be moved into OperatingSystem." |
|
4303 |
||
4304 |
|bits modeString| |
|
4305 |
||
4306 |
bits := modeBits bitAnd:8r777. |
|
4307 |
modeString := ''. |
|
4308 |
||
4309 |
#( nil 8r400 8r200 8r100 nil 8r040 8r020 8r010 nil 8r004 8r002 8r001 ) |
|
4310 |
with: texts do:[:bitMask :access | |
|
4190 | 4311 |
|ch| |
4312 |
||
4313 |
bitMask isNil ifTrue:[ |
|
4314 |
modeString := modeString , access |
|
4315 |
] ifFalse:[ |
|
4316 |
(bits bitAnd:bitMask) == 0 ifTrue:[ |
|
4317 |
ch := $- |
|
4318 |
] ifFalse:[ |
|
4319 |
ch := access |
|
4320 |
]. |
|
4321 |
modeString := modeString copyWith:ch |
|
4322 |
] |
|
3906 | 4323 |
]. |
4324 |
^ modeString |
|
4325 |
! ! |
|
4326 |
||
3892 | 4327 |
!AbstractFileBrowser methodsFor:'queries'! |
4328 |
||
3906 | 4329 |
getFileInfoStringForFirstSelectedFile:longInfo |
4330 |
"get stat info on selected file - return a string which can be |
|
4331 |
shown in a box" |
|
4332 |
||
4333 |
| selFiles filename text fileOutput type modeBits modeString s ts isLink info| |
|
4334 |
||
4335 |
selFiles := self currentFileNameHolder value. |
|
4336 |
((selFiles size == 1) not) ifTrue:[ ^ nil]. |
|
4337 |
filename := selFiles first. |
|
4338 |
||
4339 |
text := StringCollection new. |
|
4340 |
||
4341 |
text add:('filename: ', filename asString). |
|
4342 |
isLink := filename isSymbolicLink. |
|
4343 |
isLink ifTrue:[ |
|
4190 | 4344 |
text add:('symbolic link to: ', (filename linkInfo path)) |
3906 | 4345 |
]. |
4346 |
||
4347 |
info := filename info. |
|
4348 |
type := info type. |
|
4349 |
(longInfo and:[type == #regular]) ifTrue:[ |
|
4190 | 4350 |
fileOutput := filename fileType. |
3906 | 4351 |
]. |
4352 |
||
4353 |
s := ('type: '). |
|
4354 |
fileOutput isNil ifTrue:[ |
|
4190 | 4355 |
s := s , type asString |
3906 | 4356 |
] ifFalse:[ |
4190 | 4357 |
s := s , 'regular (' , fileOutput , ')' |
3906 | 4358 |
]. |
4359 |
text add:s. |
|
4360 |
isLink = true ifTrue:[ |
|
4190 | 4361 |
info := filename linkInfo |
3906 | 4362 |
] ifFalse:[ |
4190 | 4363 |
info := filename info |
3906 | 4364 |
]. |
4365 |
||
4000 | 4366 |
text add:('size: ', (info fileSize) printString). |
3906 | 4367 |
|
4368 |
modeBits := info mode. |
|
4369 |
modeString := self getModeString:modeBits. |
|
4370 |
longInfo ifTrue:[ |
|
4190 | 4371 |
text add:('access: ', modeString,' ', (modeBits printStringRadix:8)). |
3906 | 4372 |
] ifFalse:[ |
4190 | 4373 |
text add:('access: ', modeString) |
3906 | 4374 |
]. |
4375 |
text add:('owner: ', |
|
4190 | 4376 |
(OperatingSystem getUserNameFromID:(info uid))). |
3906 | 4377 |
longInfo ifTrue:[ |
4190 | 4378 |
text add:('group: ', |
4379 |
(OperatingSystem getGroupNameFromID:(info gid))). |
|
4380 |
||
4381 |
ts := info accessTime. |
|
4382 |
text add:('last access: ',ts asTime printString ,' ', ts asDate printString). |
|
4383 |
||
4384 |
ts := info modificationTime. |
|
4385 |
text add:('last modification: ', ts asTime printString, ' ', ts asDate printString). |
|
3906 | 4386 |
]. |
4387 |
^ text asString |
|
4388 |
! |
|
4389 |
||
3892 | 4390 |
initialCommandFor:fileName into:aBox |
4391 |
"set a useful initial command for execute box." |
|
4392 |
||
4393 |
|mime cmd select path suffix| |
|
4394 |
||
4395 |
path := self getDirWithoutFileName:fileName. |
|
4396 |
suffix := fileName asFilename suffix. |
|
4397 |
DefaultCommandPerSuffix notNil ifTrue:[ |
|
4190 | 4398 |
cmd := DefaultCommandPerSuffix at:suffix ifAbsent:nil. |
4399 |
cmd notNil ifTrue:[ |
|
4400 |
aBox initialText:(cmd , ' ' , fileName baseName) selectFrom:1 to:cmd size. |
|
4401 |
^ self |
|
4402 |
]. |
|
3892 | 4403 |
]. |
4404 |
mime := MIMETypes mimeTypeForSuffix:suffix. |
|
4405 |
"/ mime notNil ifTrue:[ |
|
4406 |
"/ cmd := self initialCommandForMIME:mime file:path |
|
4407 |
"/ ]. |
|
4408 |
||
4409 |
"/ XXX should be changed to take stuff from a config file |
|
4410 |
"/ XXX or from resources. |
|
4411 |
||
4412 |
(path type == #regular) ifTrue:[ |
|
4190 | 4413 |
path isExecutableProgram ifTrue:[ |
4414 |
aBox initialText:(fileName , ' <arguments>'). |
|
4415 |
^ self |
|
4416 |
]. |
|
4417 |
||
4418 |
select := true. |
|
4419 |
||
4420 |
"some heuristics - my personal preferences ... |
|
4421 |
(actually this should come from a configfile)" |
|
4422 |
||
4423 |
(fileName endsWith:'akefile') ifTrue:[ |
|
4424 |
aBox initialText:'make target' selectFrom:6 to:11. |
|
4425 |
^ self |
|
4426 |
]. |
|
4427 |
||
4428 |
cmd := self class defaultCommandPerMIME at:mime ifAbsent:nil. |
|
4429 |
cmd notNil ifTrue:[ |
|
4430 |
select := false |
|
4431 |
]. |
|
4432 |
||
4433 |
cmd isNil ifTrue:[ |
|
4434 |
||
4435 |
suffix := path suffix. |
|
4436 |
(suffix = 'C') ifTrue:[ |
|
4437 |
cmd := 'g++ -c %1'. |
|
4438 |
select := 6. |
|
4439 |
] ifFalse:[ |
|
4440 |
suffix := suffix asLowercase. |
|
4441 |
||
4442 |
(suffix = 'taz') ifTrue:[ |
|
4443 |
aBox initialText:'zcat %1 | tar tvf -'. |
|
4444 |
select := false. |
|
4445 |
]. |
|
4446 |
(suffix = 'tar') ifTrue:[ |
|
4447 |
cmd := 'tar tvf %1'. |
|
4448 |
select := 7. |
|
4449 |
]. |
|
4450 |
(suffix = 'zoo') ifTrue:[ |
|
4451 |
cmd := 'zoo -list %1'. |
|
4452 |
select := 9. |
|
4453 |
]. |
|
4454 |
(suffix = 'zip') ifTrue:[ |
|
4455 |
cmd := 'unzip -l %1'. |
|
4456 |
select := 8. |
|
4457 |
]. |
|
4458 |
(suffix = 'jar') ifTrue:[ |
|
4459 |
cmd := 'unzip -l %1'. |
|
4460 |
select := 8. |
|
4461 |
]. |
|
4462 |
(suffix = 'z') ifTrue:[ |
|
4463 |
(fileName asLowercase endsWith:'tar.z') ifTrue:[ |
|
4464 |
cmd := 'zcat %1 | tar tvf -'. |
|
4465 |
select := false. |
|
4466 |
] ifFalse:[ |
|
4467 |
cmd := 'uncompress %1' |
|
4468 |
]. |
|
4469 |
]. |
|
4470 |
(suffix = 'gz') ifTrue:[ |
|
4471 |
(fileName asLowercase endsWith:'tar.gz') ifTrue:[ |
|
4472 |
cmd := ('gunzip < %1 | tar tvf -' ). |
|
4473 |
select := false. |
|
4474 |
] ifFalse:[ |
|
4475 |
cmd := 'gunzip %1'. |
|
4476 |
]. |
|
4477 |
]. |
|
4478 |
(suffix = 'html') ifTrue:[ |
|
4479 |
cmd := 'netscape %1' |
|
4480 |
]. |
|
4481 |
(suffix = 'htm') ifTrue:[ |
|
4482 |
cmd := 'netscape %1' |
|
4483 |
]. |
|
4484 |
(suffix = 'uue') ifTrue:[ |
|
4485 |
cmd := 'uudecode %1' |
|
4486 |
]. |
|
4487 |
(suffix = 'c') ifTrue:[ |
|
4488 |
cmd := 'cc -c %1'. |
|
4489 |
select := 5. |
|
4490 |
]. |
|
4491 |
(suffix = 'cc') ifTrue:[ |
|
4492 |
cmd := 'g++ -c %1'. |
|
4493 |
select := 6. |
|
4494 |
]. |
|
4495 |
(suffix = 'xbm') ifTrue:[ |
|
4496 |
cmd := 'bitmap %1' |
|
4497 |
]. |
|
4498 |
(suffix = 'ps') ifTrue:[ |
|
4499 |
cmd := 'ghostview %1' |
|
4500 |
]. |
|
4501 |
((suffix = '1') or:[suffix = 'man']) ifTrue:[ |
|
4502 |
cmd := 'nroff -man %1'. |
|
4503 |
select := 10. |
|
4504 |
]. |
|
4505 |
]. |
|
4506 |
]. |
|
4507 |
||
4508 |
cmd isNil ifTrue:[ |
|
4509 |
DefaultCommandPerSuffix isNil ifTrue:[ |
|
4510 |
cmd := '<cmd>' |
|
4511 |
] ifFalse:[ |
|
4512 |
cmd := DefaultCommandPerSuffix |
|
4513 |
at:suffix |
|
4514 |
ifAbsent:'<cmd>'. |
|
4515 |
]. |
|
4516 |
cmd := cmd , ' %1'. |
|
4517 |
]. |
|
4518 |
||
4519 |
cmd := cmd bindWith:fileName. |
|
4520 |
select == false ifTrue:[ |
|
4521 |
aBox initialText:cmd |
|
4522 |
] ifFalse:[ |
|
4523 |
select class == Interval ifTrue:[ |
|
4524 |
aBox initialText:cmd selectFrom:select start to:select stop |
|
4525 |
] ifFalse:[ |
|
4526 |
select isInteger ifFalse:[ |
|
4527 |
select := (cmd indexOf:Character space ifAbsent:[cmd size + 1]) - 1. |
|
4528 |
]. |
|
4529 |
aBox initialText:cmd selectFrom:1 to:select |
|
4530 |
]. |
|
4531 |
] |
|
3892 | 4532 |
] |
4533 |
! |
|
4534 |
||
4535 |
isAbstractFileBrowser |
|
4536 |
||
4537 |
^ true |
|
4538 |
! |
|
4539 |
||
4540 |
systemIsDOS |
|
4541 |
||
4542 |
^ OperatingSystem isMSDOSlike |
|
4543 |
! |
|
4544 |
||
4545 |
systemIsUnix |
|
4546 |
^ OperatingSystem isUNIXlike |
|
4547 |
! ! |
|
4548 |
||
4549 |
!AbstractFileBrowser methodsFor:'queries-file'! |
|
4550 |
||
4551 |
allItemsOfCurrentDirectory |
|
4552 |
||
4553 |
^ self application:#DirectoryContentsBrowser do:#allItemsOfCurrentDirectory. |
|
4554 |
! |
|
4555 |
||
4556 |
anyFilesPresentWithSuffix:suffix |
|
4557 |
||
4558 |
| directories | |
|
4559 |
||
4560 |
directories := self currentDirectories value. |
|
4561 |
directories do:[ : dir| |
|
4190 | 4562 |
(dir directoryContents do:[:f| (f asFilename suffix = suffix) ifTrue:[ ^ true]]) |
3892 | 4563 |
]. |
4564 |
^ false. |
|
4565 |
! |
|
4566 |
||
4567 |
currentFilesAreInSameDirectory |
|
4568 |
||
4569 |
^ (self currentDirectories value size == 1). |
|
4570 |
! |
|
4571 |
||
4572 |
currentFilesHasDirectories |
|
4573 |
||
4574 |
^ self currentDirectories value notEmpty. |
|
4575 |
! |
|
4576 |
||
3982 | 4577 |
directoriesForFiles:aFileCol |
4578 |
||
4579 |
^ ((aFileCol collect:[:file| self getDirWithoutFileName:file]) asSet). |
|
4580 |
! |
|
4581 |
||
3892 | 4582 |
fileListIsEmpty |
4583 |
||
4584 |
^ self application:#DirectoryContentsBrowser do:#fileListIsEmpty. |
|
4585 |
! |
|
4586 |
||
4587 |
fileListIsNotEmpty |
|
4588 |
||
4589 |
^ self fileListIsEmpty not. |
|
4590 |
! |
|
4591 |
||
4592 |
fileName:aFilename1 startsWith:aFilename2 |
|
4593 |
||
4594 |
" check if aFilename2 starts with the same directories like aFilename1 " |
|
4595 |
||
4596 |
| file1 file2 | |
|
4597 |
||
4598 |
aFilename2 isNil ifTrue:[ ^ false]. |
|
3982 | 4599 |
aFilename1 isNil ifTrue:[ ^ false]. |
3892 | 4600 |
file1 := aFilename1 asFilename. |
4601 |
file2 := aFilename2 asFilename. |
|
4602 |
file2 isRootDirectory ifTrue:[ ^ true]. |
|
4603 |
((file1 isDirectory) |
|
4604 |
and:[(file2 isDirectory) |
|
4605 |
and:[file1 directory = file2 directory]]) ifTrue:[ |
|
4190 | 4606 |
^ file1 baseName = file2 baseName |
3892 | 4607 |
]. |
3982 | 4608 |
^ (file1 pathName) startsWith:(file2 pathName) |
3892 | 4609 |
! |
4610 |
||
4611 |
getAllFilesAsStringCollection |
|
4612 |
||
4613 |
^ self application:#DirectoryContentsBrowser do:#getAllFilesAsStringCollection. |
|
4614 |
! |
|
4615 |
||
4616 |
getBestDirectory |
|
4617 |
||
4618 |
|selFiles stringCol firstPre| |
|
4619 |
||
4620 |
selFiles := self currentDirectories value. |
|
4621 |
selFiles isEmpty ifTrue:[^ nil]. |
|
4622 |
selFiles size == 1 ifTrue:[^ selFiles first]. |
|
4623 |
stringCol := (selFiles collect:[: file| file asString]) asOrderedCollection. |
|
4624 |
firstPre := stringCol at:1. |
|
4625 |
stringCol from:2 do:[:el| |
|
4190 | 4626 |
firstPre := firstPre commonPrefixWith:el. |
3892 | 4627 |
]. |
4628 |
(firstPre endsWith:(OperatingSystem fileSeparator)) ifTrue:[ |
|
4190 | 4629 |
firstPre removeLast. |
3892 | 4630 |
]. |
4631 |
^ firstPre asFilename |
|
4632 |
! |
|
4633 |
||
3982 | 4634 |
getCommonForCurrentFiles |
3892 | 4635 |
|
4636 |
|selFiles stringCol firtsPre| |
|
4637 |
||
4638 |
selFiles := self currentFileNameHolder value. |
|
4639 |
selFiles isEmpty ifTrue:[^ nil]. |
|
4640 |
stringCol := selFiles collect:[: file| file asString]. |
|
4641 |
firtsPre := stringCol at:1. |
|
4642 |
stringCol from:2 do:[:el| |
|
4190 | 4643 |
firtsPre := firtsPre commonPrefixWith:el. |
3892 | 4644 |
]. |
4645 |
^ firtsPre asFilename |
|
4646 |
! |
|
4647 |
||
4648 |
getDirWithoutFileName:aFileName |
|
4649 |
||
4650 |
| dir | |
|
4651 |
aFileName isNil ifTrue:[ |
|
4190 | 4652 |
^ aFileName. |
3892 | 4653 |
]. |
4654 |
dir := aFileName asFilename. |
|
4655 |
dir isDirectory ifFalse:[ |
|
4190 | 4656 |
dir := dir directory. |
3892 | 4657 |
]. |
4658 |
^ dir. |
|
4659 |
! |
|
4660 |
||
4661 |
getInfoItem |
|
4662 |
"get filename of a description-file (.dir.info, README etc.); |
|
4663 |
This file is automatically shown when a directory is enterred. |
|
4664 |
You can add more names below if you like." |
|
4665 |
||
4666 |
|directories| |
|
4667 |
||
3982 | 4668 |
directories := self currentSelectedDirectories. |
3892 | 4669 |
(directories size ~= 1) ifTrue:[ ^ nil]. |
4670 |
||
4671 |
#( |
|
4672 |
'.dir.info' |
|
4673 |
'README' |
|
4674 |
'ReadMe' |
|
4675 |
'Readme' |
|
4676 |
'readme' |
|
4677 |
'read.me' |
|
4678 |
'Read.me' |
|
4679 |
'READ.ME' |
|
4680 |
'README.TXT' |
|
4681 |
'readme.txt' |
|
4682 |
'Readme.txt' |
|
4683 |
'Info.txt' |
|
4684 |
'info.txt' |
|
4685 |
'INFO.TXT' |
|
4686 |
) do:[:f | |
|
4190 | 4687 |
|n dir| |
4688 |
||
4689 |
n := (directories first) construct:f. |
|
4690 |
(n isReadable and:[n isDirectory not]) ifTrue:[ |
|
4691 |
^ DirectoryContentsBrowser itemClass fileName:n |
|
4692 |
] |
|
3892 | 4693 |
]. |
4694 |
^ nil |
|
3982 | 4695 |
! ! |
4696 |
||
4697 |
!AbstractFileBrowser methodsFor:'selection'! |
|
4698 |
||
4699 |
currentSelectedDirectories |
|
4700 |
||
4701 |
^ self currentDirectories value. |
|
4702 |
! |
|
4703 |
||
4704 |
currentSelectedFiles |
|
4705 |
||
4706 |
| files | |
|
4707 |
files := self currentFileNameHolder value. |
|
4708 |
^ (files select:[: file | file isDirectory not]). |
|
4709 |
! |
|
4710 |
||
4711 |
firstSelectedFile |
|
4712 |
||
4713 |
| files | |
|
4714 |
files := self currentFileNameHolder value. |
|
4715 |
^ (files detect:[: file | file isDirectory not] ifNone:[nil]). |
|
3892 | 4716 |
! ! |
4717 |
||
3964 | 4718 |
!AbstractFileBrowser methodsFor:'sorting'! |
4719 |
||
3989 | 4720 |
currentSortOrder |
4721 |
||
4722 |
" returns a Ordered Collection of all directories currently selected |
|
4723 |
if only a file is selected currentDirectories holds the directory of the file |
|
4724 |
" |
|
4725 |
||
4027 | 4726 |
^ self aspectFor:#currentSortOrder ifAbsent:[ Dictionary new asValue ]. |
3989 | 4727 |
! |
4728 |
||
4729 |
makeDirectorySortBlockFor:aSortBlock |
|
4730 |
||
4074 | 4731 |
self sortDirectoriesBeforeFiles value ifTrue:[ |
4190 | 4732 |
^ [:a :b| |
4733 |
|aIsDir bIsDir res| |
|
4734 |
||
4735 |
aIsDir := a isDirectory. |
|
4736 |
bIsDir := b isDirectory. |
|
4737 |
(aIsDir ~~ bIsDir) ifTrue:[ |
|
4738 |
res := aIsDir |
|
4739 |
] ifFalse:[ |
|
4740 |
res := aSortBlock value:a value:b. |
|
4741 |
]. |
|
4742 |
res |
|
4743 |
]. |
|
4074 | 4744 |
] ifFalse:[ |
4190 | 4745 |
^ aSortBlock |
4074 | 4746 |
]. |
3989 | 4747 |
! |
4748 |
||
4749 |
sortBlockHolder |
|
4750 |
|nameSortBlock| |
|
4751 |
||
4752 |
^ self aspectFor:#sortBlockHolder ifAbsent:[ |
|
4190 | 4753 |
self sortCaseless value ifTrue:[ |
4754 |
nameSortBlock := [ :a :b | a asString asLowercase < b asString asLowercase.]. |
|
4755 |
] ifFalse:[ |
|
4756 |
nameSortBlock := [ :a :b | a asString < b asString.]. |
|
4757 |
]. |
|
4758 |
(self makeDirectorySortBlockFor:nameSortBlock) asValue. |
|
3989 | 4759 |
]. |
4760 |
! |
|
4761 |
||
4762 |
sortBlockProperty |
|
4763 |
||
4027 | 4764 |
|
3989 | 4765 |
^ self aspectFor:#sortBlockProperty ifAbsent:[ #baseName asValue ]. |
4766 |
! |
|
4767 |
||
4768 |
sortCaseless |
|
4201 | 4769 |
" aspect for sort caseless " |
3989 | 4770 |
|
4771 |
^ self aspectFor:#sortCaseless ifAbsent:[ |
|
4201 | 4772 |
| holder | |
4773 |
holder := (Filename isCaseSensitive not) asValue. |
|
4774 |
holder |
|
3989 | 4775 |
] |
4776 |
! |
|
4777 |
||
4074 | 4778 |
sortDirectoriesBeforeFiles |
4779 |
||
4201 | 4780 |
" aspect for sort directories always before files" |
4074 | 4781 |
^ self aspectFor:#sortDirectoriesBeforeFiles ifAbsent:[ true asValue ]. |
4782 |
! |
|
4783 |
||
3989 | 4784 |
sortFileListsBy:instanceName |
4785 |
||
4786 |
self sortFileListsBy:instanceName withReverse:true |
|
4787 |
! |
|
4788 |
||
4789 |
sortFileListsBy:instanceName withReverse:aBoolean |
|
4790 |
||
4011 | 4791 |
| aSymbol sortCaselessLocal currentSortOrder cmpOp instanceSortBlock sortReverse| |
3964 | 4792 |
|
4793 |
aSymbol := instanceName asSymbol. |
|
4027 | 4794 |
self sortBlockProperty setValue:instanceName asSymbol. |
4151 | 4795 |
sortCaselessLocal := self sortCaseless value. |
4027 | 4796 |
currentSortOrder := self currentSortOrder value. |
3989 | 4797 |
currentSortOrder isEmpty ifTrue:[ |
4190 | 4798 |
currentSortOrder at:#column put:aSymbol. |
4799 |
currentSortOrder at:#reverse put:false. |
|
4800 |
currentSortOrder at:#sortCaseless put:sortCaselessLocal. |
|
3964 | 4801 |
] ifFalse:[ |
4190 | 4802 |
(currentSortOrder at:#sortCaseless) ~= sortCaselessLocal ifTrue:[ |
4803 |
"/ sort caseless changed |
|
4804 |
currentSortOrder at:#sortCaseless put:sortCaselessLocal. |
|
4805 |
] ifFalse:[ |
|
4806 |
(currentSortOrder at:#column) = aSymbol ifTrue:[ |
|
4807 |
"/ same column like before - change sort order ifReverse is true |
|
4808 |
aBoolean ifTrue:[ |
|
4809 |
| isReverse | |
|
4810 |
isReverse := currentSortOrder at:#reverse. |
|
4811 |
currentSortOrder at:#reverse put:(isReverse not). |
|
4812 |
]. |
|
4813 |
] ifFalse:[ |
|
4814 |
"/ another column - remark column |
|
4815 |
currentSortOrder at:#column put:aSymbol. |
|
4816 |
] |
|
4817 |
] |
|
3964 | 4818 |
]. |
4027 | 4819 |
self currentSortOrder changed. |
3989 | 4820 |
(currentSortOrder at:#reverse) ifTrue:[ |
4190 | 4821 |
cmpOp := #'>' |
3989 | 4822 |
] ifFalse:[ |
4190 | 4823 |
cmpOp := #'<' |
3989 | 4824 |
]. |
4011 | 4825 |
sortReverse := currentSortOrder at:#reverse. |
3989 | 4826 |
instanceSortBlock := [:a :b | |
4190 | 4827 |
|entry1 entry2| |
4828 |
||
4829 |
((a respondsTo:aSymbol) not) ifTrue:[ |
|
4830 |
true |
|
4831 |
] ifFalse:[ |
|
4832 |
entry1 := (a perform:aSymbol). |
|
4833 |
entry2 := (b perform:aSymbol). |
|
4834 |
((entry1 isNil) or:[entry2 isNil]) ifTrue:[ |
|
4835 |
((entry1 isNil) and:[entry2 isNil]) ifTrue:[true] ifFalse:[ |
|
4836 |
((entry1 notNil) and:[entry2 isNil]) ifTrue:[ |
|
4837 |
sortReverse |
|
4838 |
] ifFalse:[ |
|
4839 |
sortReverse not |
|
4840 |
] |
|
4841 |
] |
|
4842 |
] ifFalse:[ |
|
4843 |
(aSymbol = #baseName) ifTrue:[ |
|
4844 |
sortCaselessLocal ifTrue:[ |
|
4845 |
entry1 := entry1 asString asLowercase. |
|
4846 |
entry2 := entry2 asString asLowercase. |
|
4847 |
] ifFalse:[ |
|
4848 |
entry1 := entry1 asString. |
|
4849 |
entry2 := entry2 asString. |
|
4850 |
]. |
|
4851 |
]. |
|
4852 |
entry1 perform:cmpOp with:entry2 |
|
4853 |
] |
|
4854 |
] |
|
3989 | 4855 |
]. |
4856 |
self sortBlockHolder value:(self makeDirectorySortBlockFor:instanceSortBlock). |
|
3964 | 4857 |
! ! |
4858 |
||
3892 | 4859 |
!AbstractFileBrowser methodsFor:'startup & release'! |
4860 |
||
4861 |
makeDependent |
|
4074 | 4862 |
self filterModel addDependent:self. |
4004 | 4863 |
self currentFileNameHolder addDependent:self. |
4074 | 4864 |
self sortDirectoriesBeforeFiles addDependent:self. |
4004 | 4865 |
self sortCaseless addDependent:self. |
4011 | 4866 |
self showHiddenFiles addDependent:self. |
3892 | 4867 |
! |
4868 |
||
4869 |
masterApplication:anApplication |
|
4870 |
||
4871 |
masterApplication isNil ifTrue:[ |
|
4190 | 4872 |
(anApplication notNil and:[anApplication askFor:#isAbstractFileBrowser]) ifTrue:[ |
4873 |
aspects := anApplication aspects |
|
4874 |
] ifFalse:[ |
|
4875 |
aspects isNil ifTrue:[ |
|
4876 |
aspects := IdentityDictionary new. |
|
4877 |
aspects at:#applications put:(IdentityDictionary new). |
|
4878 |
] |
|
4879 |
]. |
|
4880 |
self applications at:(self className) put:self. |
|
4881 |
self makeDependent. |
|
3892 | 4882 |
]. |
3952 | 4883 |
^ super masterApplication:anApplication. |
3892 | 4884 |
! |
4885 |
||
4886 |
postOpenWith:aBuilder |
|
4887 |
||
4888 |
super postOpenWith:aBuilder. |
|
4889 |
! ! |
|
4890 |
||
4891 |
!AbstractFileBrowser::Clipboard methodsFor:'accessing'! |
|
4892 |
||
4893 |
files |
|
4894 |
"return the value of the instance variable 'files' (automatically generated)" |
|
4895 |
||
4896 |
^ files |
|
4897 |
! |
|
4898 |
||
4899 |
files:something |
|
4900 |
"set the value of the instance variable 'files' (automatically generated)" |
|
4901 |
||
4902 |
files := something. |
|
4903 |
! |
|
4904 |
||
4905 |
method |
|
4906 |
"return the value of the instance variable 'method' (automatically generated)" |
|
4907 |
||
4908 |
^ method |
|
4909 |
! |
|
4910 |
||
4911 |
method:something |
|
4912 |
"set the value of the instance variable 'method' (automatically generated)" |
|
4913 |
||
4914 |
method := something. |
|
4915 |
! ! |
|
4916 |
||
4917 |
!AbstractFileBrowser::CodeExecutionLock methodsFor:'accessing'! |
|
4918 |
||
4919 |
locked |
|
4920 |
"return the value of the instance variable 'locked' (automatically generated)" |
|
4921 |
||
4922 |
locked isNil ifTrue:[ |
|
4190 | 4923 |
locked := false. |
3892 | 4924 |
]. |
4925 |
^ locked |
|
4926 |
! ! |
|
4927 |
||
4928 |
!AbstractFileBrowser::CodeExecutionLock methodsFor:'actions'! |
|
4929 |
||
4930 |
doIfUnLocked:aBlock |
|
4931 |
||
4932 |
self locked ifFalse:[ |
|
4190 | 4933 |
aBlock value. |
3892 | 4934 |
]. |
4935 |
! |
|
4936 |
||
4937 |
doLocked:aBlock |
|
4938 |
||
4939 |
locked := true. |
|
4004 | 4940 |
aBlock ensure:[ |
4190 | 4941 |
locked := false. |
4004 | 4942 |
] |
3892 | 4943 |
! ! |
4944 |
||
3952 | 4945 |
!AbstractFileBrowser::DirectoryHistory class methodsFor:'defaults'! |
4946 |
||
4947 |
historySize |
|
3892 | 4948 |
|
4949 |
^ 20 |
|
4950 |
! ! |
|
4951 |
||
4032 | 4952 |
!AbstractFileBrowser::DirectoryHistory class methodsFor:'new'! |
4953 |
||
4954 |
new |
|
4955 |
||
4956 |
^ super new initialize. |
|
4957 |
! ! |
|
4958 |
||
3952 | 4959 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'accessing'! |
4960 |
||
3964 | 4961 |
forwardList |
4962 |
"return the value of the instance variable 'forwardList' (automatically generated)" |
|
4963 |
||
4964 |
forwardList isNil ifTrue:[ |
|
4190 | 4965 |
forwardList := OrderedCollection new. |
3964 | 4966 |
]. |
4967 |
^ forwardList |
|
3952 | 4968 |
! ! |
4969 |
||
3892 | 4970 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'actions'! |
4971 |
||
3952 | 4972 |
addToHistory:aPath |
4973 |
| item| |
|
4974 |
||
4975 |
item := self getItemFor:aPath. |
|
4022 | 4976 |
(lastBackPath notNil and:[lastAddPath notNil and:[lastBackPath = aPath]]) ifTrue:[ |
4190 | 4977 |
lastAddPath := nil. |
4022 | 4978 |
]. |
4979 |
lastAddPath notNil ifTrue:[ |
|
4190 | 4980 |
self backListAdd:lastAddPath. |
4022 | 4981 |
]. |
4982 |
lastAddPath := aPath. |
|
3952 | 4983 |
item isNil ifTrue:[ |
4190 | 4984 |
" not already in history" |
4985 |
self size >= self class historySize ifTrue:[ |
|
4986 |
self removeLast. |
|
4987 |
]. |
|
4988 |
item := DirectoryHistoryItem path:aPath. |
|
4989 |
self addFirst:item |
|
3952 | 4990 |
] ifFalse:[ |
4190 | 4991 |
"already been there before; move the entry to |
4992 |
the beginning, so it will fall out later." |
|
4993 |
self remove:item. |
|
4994 |
self addFirst:item |
|
3892 | 4995 |
]. |
3952 | 4996 |
! |
4997 |
||
4022 | 4998 |
backListAdd:aPath |
4999 |
||
5000 |
backList size >= self class historySize ifTrue:[ |
|
4190 | 5001 |
backList removeLast. |
4022 | 5002 |
]. |
5003 |
backList addFirst:aPath. |
|
5004 |
! |
|
5005 |
||
3964 | 5006 |
forwardListAdd:aPath |
5007 |
||
4022 | 5008 |
forwardList size >= self class historySize ifTrue:[ |
4190 | 5009 |
forwardList removeLast. |
3892 | 5010 |
]. |
4022 | 5011 |
forwardList addFirst:aPath. |
5012 |
! |
|
5013 |
||
5014 |
goBack |
|
5015 |
||
5016 |
" search the item in the list and give back the next in the list" |
|
5017 |
||
5018 |
| retPath| |
|
5019 |
||
5020 |
backList isEmpty ifTrue:[ ^ nil]. |
|
5021 |
retPath := backList first. |
|
5022 |
self forwardListAdd:(self first path). |
|
5023 |
lastBackPath := retPath. |
|
5024 |
backList removeFirst. |
|
5025 |
^ retPath. |
|
5026 |
! |
|
5027 |
||
5028 |
goForward |
|
5029 |
||
5030 |
" return first path of forward list" |
|
5031 |
||
5032 |
| retPath| |
|
5033 |
self forwardList isEmpty ifTrue:[ ^ nil]. |
|
5034 |
retPath := self forwardList first. |
|
5035 |
self forwardList removeFirst. |
|
5036 |
^ retPath. |
|
5037 |
! |
|
5038 |
||
5039 |
resetForwardBackward |
|
5040 |
||
5041 |
backList := self collect:[:item| item path]. |
|
5042 |
forwardList := OrderedCollection new. |
|
5043 |
! |
|
5044 |
||
5045 |
setPosition:aPosition for:aPath |
|
5046 |
||
5047 |
self do:[:item| |
|
4190 | 5048 |
item path = aPath ifTrue:[ |
5049 |
item position:aPosition. |
|
5050 |
] |
|
4022 | 5051 |
]. |
5052 |
! |
|
5053 |
||
5054 |
xxgoBackFrom:aPath |
|
3964 | 5055 |
|
5056 |
" search the item in the list and give back the next in the list" |
|
5057 |
||
5058 |
| index retVal| |
|
5059 |
||
5060 |
self isEmpty ifTrue:[ ^ nil]. |
|
4022 | 5061 |
|
3964 | 5062 |
aPath isNil ifTrue:[ |
4190 | 5063 |
retVal := self first path |
3964 | 5064 |
] ifFalse:[ |
4190 | 5065 |
index := self findFirst:[:item| item path = aPath]. |
5066 |
index == 0 ifTrue:[ |
|
5067 |
retVal := self first path |
|
5068 |
] ifFalse:[ |
|
5069 |
index < self size ifTrue:[ |
|
5070 |
retVal := ((self at:index + 1) path). |
|
5071 |
] |
|
5072 |
]. |
|
3964 | 5073 |
]. |
5074 |
retVal := retVal ? self first path. |
|
5075 |
self forwardListAdd:aPath. |
|
5076 |
^ retVal. |
|
3892 | 5077 |
! ! |
5078 |
||
4032 | 5079 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'initialize'! |
5080 |
||
5081 |
initialize |
|
5082 |
||
5083 |
backList := OrderedCollection new. |
|
5084 |
forwardList := OrderedCollection new. |
|
5085 |
! ! |
|
5086 |
||
3892 | 5087 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'queries'! |
5088 |
||
4024 | 5089 |
canBack |
3964 | 5090 |
|
4022 | 5091 |
^ backList notEmpty |
3892 | 5092 |
! |
5093 |
||
5094 |
canForward |
|
5095 |
||
3964 | 5096 |
^ self forwardList notEmpty. |
5097 |
! |
|
5098 |
||
5099 |
getBackCollectionFrom:aPath |
|
3952 | 5100 |
|
4022 | 5101 |
"/ | backCol index | |
5102 |
"/ |
|
5103 |
"/ backCol := OrderedCollection new. |
|
5104 |
"/ aPath isNil ifTrue:[ |
|
5105 |
"/ index := 0. |
|
5106 |
"/ ] ifFalse:[ |
|
5107 |
"/ index := self findFirst:[:item| item path = aPath]. |
|
5108 |
"/ ]. |
|
5109 |
"/ "/ if aPath is not in collection starts from 1 with collect af path |
|
5110 |
"/ index < self size ifTrue:[ |
|
5111 |
"/ self from:(index + 1) to:(self size) do:[:item | |
|
5112 |
"/ backCol add:(item path). |
|
5113 |
"/ ]. |
|
5114 |
"/ ]. |
|
5115 |
^ backList. |
|
3952 | 5116 |
! |
5117 |
||
5118 |
getForwardCollection |
|
5119 |
||
3964 | 5120 |
^ self forwardList. |
3952 | 5121 |
! |
5122 |
||
5123 |
getItemFor:aPath |
|
5124 |
||
5125 |
self do:[:item| item path = aPath ifTrue:[^ item]]. |
|
5126 |
^ nil. |
|
5127 |
! |
|
5128 |
||
5129 |
getPositionFor:aPath |
|
5130 |
||
5131 |
|item| |
|
5132 |
||
5133 |
item := self getItemFor:aPath. |
|
5134 |
||
5135 |
item notNil ifTrue:[ |
|
4190 | 5136 |
^ item position. |
3952 | 5137 |
]. |
5138 |
^ nil |
|
5139 |
! |
|
5140 |
||
5141 |
includesPath:aPath |
|
5142 |
||
5143 |
self do:[:item| item path = aPath ifTrue:[^ true]]. |
|
5144 |
^ false. |
|
5145 |
! ! |
|
5146 |
||
5147 |
!AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem class methodsFor:'instance creation'! |
|
5148 |
||
5149 |
path:aPath |
|
5150 |
||
5151 |
^ self new path:aPath |
|
5152 |
! ! |
|
5153 |
||
5154 |
!AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem methodsFor:'accessing'! |
|
5155 |
||
5156 |
path |
|
5157 |
"return the value of the instance variable 'path' (automatically generated)" |
|
5158 |
||
5159 |
^ path |
|
5160 |
! |
|
5161 |
||
5162 |
path:something |
|
5163 |
"set the value of the instance variable 'path' (automatically generated)" |
|
5164 |
||
5165 |
path := something. |
|
5166 |
! |
|
5167 |
||
5168 |
position |
|
5169 |
"return the value of the instance variable 'position' (automatically generated)" |
|
5170 |
||
5171 |
^ position |
|
5172 |
! |
|
5173 |
||
5174 |
position:something |
|
5175 |
"set the value of the instance variable 'position' (automatically generated)" |
|
5176 |
||
5177 |
position := something. |
|
5178 |
! |
|
5179 |
||
5180 |
printString |
|
5181 |
||
5182 |
^ self path asString |
|
3892 | 5183 |
! ! |
5184 |
||
5185 |
!AbstractFileBrowser::FilenameHistory class methodsFor:'attributes access'! |
|
5186 |
||
5187 |
FilenameHistorySize |
|
5188 |
||
5189 |
^ 20 |
|
5190 |
! |
|
5191 |
||
5192 |
HistorySize |
|
5193 |
||
5194 |
^ 20 |
|
5195 |
! ! |
|
5196 |
||
5197 |
!AbstractFileBrowser::FilenameHistory methodsFor:'adding & removing'! |
|
5198 |
||
5199 |
add:aApplItem |
|
5200 |
||
5201 |
super add:aApplItem. |
|
5202 |
(self size > self class FilenameHistorySize) ifTrue:[ |
|
4190 | 5203 |
self removeLast. |
3892 | 5204 |
] |
5205 |
! ! |
|
5206 |
||
5207 |
!AbstractFileBrowser::SaveAspectItem class methodsFor:'instance creation'! |
|
5208 |
||
5209 |
withValue:aValue isHolder:aBoolean |
|
5210 |
||
5211 |
| instance | |
|
5212 |
||
5213 |
instance := self basicNew. |
|
5214 |
instance value:aValue. |
|
5215 |
instance isHolder:aBoolean. |
|
5216 |
^ instance |
|
5217 |
! ! |
|
5218 |
||
5219 |
!AbstractFileBrowser::SaveAspectItem methodsFor:'accessing'! |
|
5220 |
||
5221 |
isHolder |
|
5222 |
"return the value of the instance variable 'isHolder' (automatically generated)" |
|
5223 |
||
5224 |
^ isHolder |
|
5225 |
! |
|
5226 |
||
5227 |
isHolder:something |
|
5228 |
"set the value of the instance variable 'isHolder' (automatically generated)" |
|
5229 |
||
5230 |
isHolder := something. |
|
5231 |
! |
|
5232 |
||
5233 |
value |
|
5234 |
"return the value of the instance variable 'value' (automatically generated)" |
|
5235 |
||
5236 |
^ value |
|
5237 |
! |
|
5238 |
||
5239 |
value:something |
|
5240 |
"set the value of the instance variable 'value' (automatically generated)" |
|
5241 |
||
5242 |
value := something. |
|
5243 |
! ! |
|
5244 |
||
5245 |
!AbstractFileBrowser class methodsFor:'documentation'! |
|
5246 |
||
5247 |
version |
|
4201 | 5248 |
^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.55 2002-11-06 10:14:05 penk Exp $' |
3892 | 5249 |
! ! |