3892
|
1 |
"{ Package: 'stx:libtool' }"
|
|
2 |
|
|
3 |
ApplicationModel subclass:#AbstractFileBrowser
|
|
4 |
instanceVariableNames:'aspects'
|
|
5 |
classVariableNames:'DefaultCommandPerMIME SettingsAspects RuntimeAspects
|
|
6 |
DirectoryBookmarks LastEnforcedNameSpace CommandHistory
|
|
7 |
DefaultCommandPerSuffix CommandHistorySize LastFileDiffFile'
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'Interface-Tools-File'
|
|
10 |
!
|
|
11 |
|
|
12 |
AbstractFileBrowser class instanceVariableNames:'DisabledCursorImage EnabledCursorImage'
|
|
13 |
|
|
14 |
"
|
|
15 |
The following class instance variables are inherited by this class:
|
|
16 |
|
|
17 |
ApplicationModel - ClassResources
|
|
18 |
Model -
|
|
19 |
Object -
|
|
20 |
"
|
|
21 |
!
|
|
22 |
|
|
23 |
Object subclass:#Clipboard
|
|
24 |
instanceVariableNames:'method files'
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
privateIn:AbstractFileBrowser
|
|
28 |
!
|
|
29 |
|
|
30 |
Object subclass:#CodeExecutionLock
|
|
31 |
instanceVariableNames:'locked'
|
|
32 |
classVariableNames:''
|
|
33 |
poolDictionaries:''
|
|
34 |
privateIn:AbstractFileBrowser
|
|
35 |
!
|
|
36 |
|
|
37 |
OrderedCollection subclass:#DirectoryHistory
|
|
38 |
instanceVariableNames:'index'
|
|
39 |
classVariableNames:''
|
|
40 |
poolDictionaries:''
|
|
41 |
privateIn:AbstractFileBrowser
|
|
42 |
!
|
|
43 |
|
|
44 |
OrderedSet subclass:#FilenameHistory
|
|
45 |
instanceVariableNames:''
|
|
46 |
classVariableNames:''
|
|
47 |
poolDictionaries:''
|
|
48 |
privateIn:AbstractFileBrowser
|
|
49 |
!
|
|
50 |
|
|
51 |
Object subclass:#SaveAspectItem
|
|
52 |
instanceVariableNames:'value isHolder'
|
|
53 |
classVariableNames:''
|
|
54 |
poolDictionaries:''
|
|
55 |
privateIn:AbstractFileBrowser
|
|
56 |
!
|
|
57 |
|
|
58 |
|
|
59 |
!AbstractFileBrowser class methodsFor:'classAccess'!
|
|
60 |
|
|
61 |
filenameHistoryClass
|
|
62 |
|
|
63 |
^ FilenameHistory
|
|
64 |
! !
|
|
65 |
|
|
66 |
!AbstractFileBrowser class methodsFor:'defaults'!
|
|
67 |
|
|
68 |
UnixVNCCommand
|
|
69 |
|
|
70 |
^ 'Xvnc'
|
|
71 |
!
|
|
72 |
|
|
73 |
commandHistory
|
|
74 |
|
|
75 |
CommandHistory isNil ifTrue:[
|
|
76 |
CommandHistory := OrderedCollection new.
|
|
77 |
].
|
|
78 |
^ CommandHistory
|
|
79 |
!
|
|
80 |
|
|
81 |
commandHistorySize
|
|
82 |
|
|
83 |
CommandHistorySize isNil ifTrue:[
|
|
84 |
CommandHistorySize := 50
|
|
85 |
].
|
|
86 |
^ CommandHistorySize
|
|
87 |
!
|
|
88 |
|
|
89 |
defaultCommandPerMIME
|
|
90 |
|
|
91 |
DefaultCommandPerMIME isNil ifTrue:[
|
|
92 |
self initializeDefaultCommands
|
|
93 |
].
|
|
94 |
^ DefaultCommandPerMIME
|
|
95 |
!
|
|
96 |
|
|
97 |
defaultFilterList
|
|
98 |
|
|
99 |
DefaultFilters isNil ifTrue:[
|
|
100 |
DefaultFilters := #( '*'
|
|
101 |
'*.st'
|
|
102 |
'*.htm*'
|
|
103 |
'*.txt'
|
|
104 |
'*.gif'
|
|
105 |
'*.xpm'
|
|
106 |
'*.jpg'
|
|
107 |
'*.[h,c]*'
|
|
108 |
)
|
|
109 |
].
|
|
110 |
^ DefaultFilters.
|
|
111 |
!
|
|
112 |
|
|
113 |
directoryBookmarks
|
|
114 |
|
|
115 |
DirectoryBookmarks isNil ifTrue:[
|
|
116 |
DirectoryBookmarks := OrderedCollection new.
|
|
117 |
DirectoryBookmarks add:Filename homeDirectory asAbsoluteFilename.
|
|
118 |
DirectoryBookmarks add:Filename tempDirectory.
|
|
119 |
DirectoryBookmarks add:Filename currentDirectory asAbsoluteFilename.
|
|
120 |
Smalltalk systemPath do:[:path |
|
|
121 |
((path ~= '.') and:[path asFilename exists]) ifTrue:[
|
|
122 |
DirectoryBookmarks add:path asFilename.
|
|
123 |
]
|
|
124 |
]
|
|
125 |
].
|
|
126 |
^ DirectoryBookmarks
|
|
127 |
|
|
128 |
"/ DirectoryBookmarks := nil
|
|
129 |
!
|
|
130 |
|
|
131 |
initializeDefaultCommands
|
|
132 |
DefaultCommandPerMIME := Dictionary new.
|
|
133 |
|
|
134 |
DefaultCommandPerMIME at:'application/x-tar-compressed' put:'gunzip < %1 | tar tvf -'.
|
|
135 |
DefaultCommandPerMIME at:'application/pdf' put:'acroread -display %2 %1'.
|
|
136 |
|
|
137 |
"
|
|
138 |
self initializeDefaultCommands
|
|
139 |
"
|
|
140 |
!
|
|
141 |
|
|
142 |
listOfRuntimeValuesToRemark
|
|
143 |
|
|
144 |
" list of all aspects that will be saved with save settings"
|
|
145 |
|
|
146 |
^ #(
|
|
147 |
#filterModel
|
|
148 |
#enableFileHistory
|
|
149 |
#enableBack
|
|
150 |
#enableForward
|
|
151 |
#dirHistory
|
|
152 |
#fileHistory
|
|
153 |
#currentFileNameHolder
|
|
154 |
)
|
|
155 |
!
|
|
156 |
|
|
157 |
listOfSavedSettingsAspects
|
|
158 |
|
|
159 |
" list of all aspects that will be saved with save settings"
|
|
160 |
|
|
161 |
^ #(
|
|
162 |
#viewDirectoriesInDirectoryContentsBrowser
|
|
163 |
#sortCaseless
|
|
164 |
#fileHistory
|
|
165 |
#showDirectoryTreeHolder
|
|
166 |
#showHiddenFiles
|
|
167 |
#viewDescription
|
|
168 |
#viewDetails
|
|
169 |
#viewDirectoryDescription
|
|
170 |
#viewFilesInDirectoryTree
|
|
171 |
#viewGroup
|
|
172 |
#viewOwner
|
|
173 |
#viewPermissions
|
|
174 |
#viewPreview
|
|
175 |
#viewSize
|
|
176 |
#viewTime
|
|
177 |
#viewType
|
|
178 |
#enableFileHistory
|
|
179 |
#openMultipleApplicationsForType
|
|
180 |
#sortBlockHolder
|
|
181 |
#filenameEntryFieldVisibleHolder
|
|
182 |
#toolBarVisibleHolder
|
|
183 |
)
|
|
184 |
!
|
|
185 |
|
|
186 |
resetAspects
|
|
187 |
|
|
188 |
RuntimeAspects := nil.
|
|
189 |
SettingsAspects := nil.
|
|
190 |
|
|
191 |
"
|
|
192 |
self resetAspects
|
|
193 |
"
|
|
194 |
!
|
|
195 |
|
|
196 |
runtimeAspects
|
|
197 |
|
|
198 |
RuntimeAspects isNil ifTrue:[
|
|
199 |
RuntimeAspects := Dictionary new.
|
|
200 |
].
|
|
201 |
^ RuntimeAspects
|
|
202 |
!
|
|
203 |
|
|
204 |
settingsAspects
|
|
205 |
|
|
206 |
SettingsAspects isNil ifTrue:[
|
|
207 |
SettingsAspects := Dictionary new.
|
|
208 |
].
|
|
209 |
^ SettingsAspects
|
|
210 |
! !
|
|
211 |
|
|
212 |
!AbstractFileBrowser class methodsFor:'image'!
|
|
213 |
|
|
214 |
DisabledCursorImage
|
|
215 |
|
|
216 |
DisabledCursorImage isNil ifTrue:[
|
|
217 |
DisabledCursorImage := Image fromFile:'xpmBitmaps/cursors/no_entry.xpm'
|
|
218 |
].
|
|
219 |
^ DisabledCursorImage
|
|
220 |
!
|
|
221 |
|
|
222 |
EnabledCursorImage
|
|
223 |
|
|
224 |
EnabledCursorImage isNil ifTrue:[
|
|
225 |
EnabledCursorImage := Image fromFile:'xpmBitmaps/cursors/double_crossHair.xpm'
|
|
226 |
].
|
|
227 |
^ EnabledCursorImage
|
|
228 |
! !
|
|
229 |
|
|
230 |
!AbstractFileBrowser class methodsFor:'image specs'!
|
|
231 |
|
|
232 |
clearHistoryIcon
|
|
233 |
^ Icon deleteIcon
|
|
234 |
!
|
|
235 |
|
|
236 |
closeIcon
|
|
237 |
"This resource specification was automatically generated
|
|
238 |
by the ImageEditor of ST/X."
|
|
239 |
|
|
240 |
"Do not manually edit this!! If it is corrupted,
|
|
241 |
the ImageEditor may not be able to read the specification."
|
|
242 |
|
|
243 |
"
|
|
244 |
self closeIcon inspect
|
|
245 |
ImageEditor openOnClass:self andSelector:#closeIcon
|
|
246 |
"
|
|
247 |
|
|
248 |
<resource: #image>
|
|
249 |
|
|
250 |
^Icon
|
|
251 |
constantNamed:#'AbstractFileBrowser class closeIcon'
|
|
252 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
253 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ H@@@@@@@@@@@@B@ @@@@@@@@@@@@HB@ @@@@@@@@@B@ H@@@@@@@@@@@@@@ HB@@@@@@@B@ H@@@@@@@@@
|
|
254 |
@@@@@@@B@ H@@@@B@ H@@@@@@@@@@@@@@@@@@@HB@ @B@ H@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@B@ H@@@@@@@@@@@@@@@@@
|
|
255 |
@@@@@@@B@ HB@ @@@@@@@@@@@@@@@@@@@@@B@ H@@ HB@@@@@@@@@@@@@@@@@@@B@ H@@@@B@ H@@@@@@@@A@@@@@@@B@ H@@@@@@@HB@ @@@@@@@@@@@@@B
|
|
256 |
@ H@@@@@@@@@@ HB@@@@@@@@@@@@@ H@@@@@@@@@@@@B@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@PD@@P@@
|
|
257 |
@@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
|
|
258 |
@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]
|
|
259 |
!
|
|
260 |
|
|
261 |
copyIcon
|
|
262 |
<resource: #programImage>
|
|
263 |
|
|
264 |
^ ToolbarIconLibrary copy20x20Icon "copy28x28Icon"
|
|
265 |
!
|
|
266 |
|
|
267 |
cutIcon
|
|
268 |
<resource: #programImage>
|
|
269 |
|
|
270 |
^ ToolbarIconLibrary cut20x20Icon2 "cut28x28Icon"
|
|
271 |
!
|
|
272 |
|
|
273 |
deleteIcon
|
|
274 |
<resource: #programImage>
|
|
275 |
|
|
276 |
^ ToolbarIconLibrary erase20x20Icon "/ delete28x28Icon
|
|
277 |
!
|
|
278 |
|
|
279 |
diffIcon
|
|
280 |
"This resource specification was automatically generated
|
|
281 |
by the ImageEditor of ST/X."
|
|
282 |
|
|
283 |
"Do not manually edit this!! If it is corrupted,
|
|
284 |
the ImageEditor may not be able to read the specification."
|
|
285 |
|
|
286 |
"
|
|
287 |
self diffIcon inspect
|
|
288 |
ImageEditor openOnClass:self andSelector:#diffIcon
|
|
289 |
"
|
|
290 |
|
|
291 |
<resource: #image>
|
|
292 |
|
|
293 |
^Icon
|
|
294 |
constantNamed:#'AbstractFileBrowser class diffIcon'
|
|
295 |
ifAbsentPut:[(Depth8Image new) width: 26; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
296 |
@@@@@@@@A@PDA@PDA@PD@@@@@@@@@@@@@@@@@@@@@@@DA XFA XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA XF@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@XFA @F
|
|
297 |
A XD@@@@@@@@@@@@@@@@@@@@@@@DA X@A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA @FA XFA@@@@@@@@@@@@@@@@@@@@@@@A@XF@@XFA XD@@@@@@@@@@@@
|
|
298 |
@@@@@@@@@@@DA X@A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA X@A XFA@@@@@@@@@@@@@@@@@@@@@@@A@XFA X@@@@@@@@@@@@@@@@@@@@@@@@@@@@DA XF
|
|
299 |
A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA XFA XFA@@@@@@@@@@@@@@@@@@@@@@@A@PDA@PDA@PD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
300 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
301 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
302 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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]
|
|
303 |
!
|
|
304 |
|
|
305 |
fileInIcon
|
|
306 |
<resource: #programImage>
|
|
307 |
|
|
308 |
^ ToolbarIconLibrary fileIn20x20Icon
|
|
309 |
!
|
|
310 |
|
|
311 |
goHomeIcon
|
|
312 |
"This resource specification was automatically generated
|
|
313 |
by the ImageEditor of ST/X."
|
|
314 |
|
|
315 |
"Do not manually edit this!! If it is corrupted,
|
|
316 |
the ImageEditor may not be able to read the specification."
|
|
317 |
|
|
318 |
"
|
|
319 |
self goHomeIcon inspect
|
|
320 |
ImageEditor openOnClass:self andSelector:#goHomeIcon
|
|
321 |
"
|
|
322 |
|
|
323 |
<resource: #image>
|
|
324 |
|
|
325 |
^Icon
|
|
326 |
constantNamed:#'AbstractFileBrowser class goHomeIcon'
|
|
327 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
328 |
@@@@@@@@@@@@@@@@@@@@@@H@@@@@@@@@@@@@I4@@@@@@@@@@@@H"]@@@@@@@@@@@H''A7P@@@@@@@@@H''FA]D@@@@@@@@I7FC W]@@@@@@@I7FCL8DWP@@@@@
|
|
329 |
@''FCL3NA]D@@@@H''FCL3L3 WQ@@@I7FCL3L3L8E7PDPQFCL1DQL3"@@DQADXL1DQDSNH@@P@@@ 1EUUQL8 @@@@@BCDUY&D3"@@@@@@HLQU&XSNH@@@@@@ 1
|
|
330 |
EVY!!L8 @@@@@BCDUY&D3"@@@@@@HLQU&XSNH@@@@@@ 1EVY!!L8 @@@@@BCDUY&D3"@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 64 0 0 255 0 0 255 255 255 129 0 0 80 194 89 60 120 60 194 0 0 161 161 161]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@A@@@C @FG0@FO8@F_<@F?>@G??@G?? G??0O??8_??<???<???<G??0G??0G??0G??0G??0G??0G??0G??0G??0') ; yourself); yourself]
|
|
331 |
!
|
|
332 |
|
|
333 |
hexToggle22x22Icon
|
|
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 hexToggle22x22Icon inspect
|
|
342 |
ImageEditor openOnClass:self andSelector:#hexToggle22x22Icon
|
|
343 |
"
|
|
344 |
|
|
345 |
<resource: #image>
|
|
346 |
|
|
347 |
^Icon
|
|
348 |
constantNamed:#'AbstractFileBrowser class hexToggle22x22Icon'
|
|
349 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
350 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@AP@@@@T@@@@EAP@@@@@@@@@@
|
|
351 |
@@@@@@TEAP@E@@TEAPT@@@@@@@@@@@@@@@@EAP@@AP@@APTE@@@@@@@@@@@@@@@@APTE@@T@APTEAP@@@@@@@@@@@@@@@@T@@@@E@@TEAPT@@@@@@@@@@@@@
|
|
352 |
@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@AP@@@@T@@@@EAP@@@@@@@@@@@@@@@@T@AP@E@@T@APT@@@@@@@@@@@@@@@@E@@@@AP@@@@TE@@@@@@@@@@@@@@@@
|
|
353 |
AP@E@@T@AP@EAP@@@@@@@@@@@@@@@@T@AP@E@@@@APT@@@@@@@@@@@@@@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
354 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
355 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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]
|
|
356 |
!
|
|
357 |
|
|
358 |
historyIcon
|
|
359 |
<resource: #programImage>
|
|
360 |
|
|
361 |
^ ToolbarIconLibrary history20x20Icon "/ history28x28Icon
|
|
362 |
!
|
|
363 |
|
|
364 |
homeIcon
|
|
365 |
<resource: #programImage>
|
|
366 |
|
|
367 |
^ ToolbarIconLibrary home28x28Icon
|
|
368 |
!
|
|
369 |
|
|
370 |
htmlReloadIcon
|
|
371 |
"This resource specification was automatically generated
|
|
372 |
by the ImageEditor of ST/X."
|
|
373 |
|
|
374 |
"Do not manually edit this!! If it is corrupted,
|
|
375 |
the ImageEditor may not be able to read the specification."
|
|
376 |
|
|
377 |
"
|
|
378 |
self htmlReloadIcon inspect
|
|
379 |
ImageEditor openOnClass:self andSelector:#htmlReloadIcon
|
|
380 |
"
|
|
381 |
|
|
382 |
<resource: #image>
|
|
383 |
|
|
384 |
^Icon
|
|
385 |
constantNamed:#'AbstractFileBrowser class htmlReloadIcon'
|
|
386 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
387 |
@@@@@@@@@@@UT@@@@@EU@D@@@@UT@@@H@AUP@@@@@EU@@@@@@EU@@@@E@EU@@@@@@EU@@@@@AUUT@@@@@UUP@@@@@EU@@@@@@AT@@@@@@@P@@@@H@@@@@@@@
|
|
388 |
@@@@@@@@@@@@@@@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]
|
|
389 |
!
|
|
390 |
|
|
391 |
leftArrow
|
|
392 |
"This resource specification was automatically generated
|
|
393 |
by the ImageEditor of ST/X."
|
|
394 |
|
|
395 |
"Do not manually edit this!! If it is corrupted,
|
|
396 |
the ImageEditor may not be able to read the specification."
|
|
397 |
|
|
398 |
"
|
|
399 |
self leftArrow inspect
|
|
400 |
ImageEditor openOnClass:self andSelector:#leftArrow
|
|
401 |
"
|
|
402 |
|
|
403 |
<resource: #image>
|
|
404 |
|
|
405 |
^Icon
|
|
406 |
constantNamed:#'AbstractFileBrowser class leftArrow'
|
|
407 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
408 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@
|
|
409 |
@@@@@@@@@@@@@@@@@@@A@0D@@@@@@@@@@@@@@@@@@@@@@@@@@@DDAPH@@@@@@@@@@@@@@@@@@@@@@@@@@PX@A0D@@@@@@@@@@@@@@@@@@@@@@@@AB@@IB HK
|
|
410 |
@0LA@PDK@@@@@@@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@@@@@@@PX@@ALTEP8PDQDVE0\R@@@@@@@@@@@AAADQD1PUEQTNF@$SFP(R@@@@@@@@@@@KB!!P[
|
|
411 |
GAPUEQT]GQ4]GP(R@@@@@@@@@@@@D (TG!!0TEA,_G1<[H@(R@@@@@@@@@@@@@AHJC!!< GQ4JB (JB"DK@@@@@@@@@@@@@@@RB 8^B DRD!!HRD!!HK@@@@@@@@
|
|
412 |
@@@@@@@@D (]H H@@@@@@@@@@@@@@@@@@@@@@@@@@AHJHPD@@@@@@@@@@@@@@@@@@@@@@@@@@@@K@PH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B0D@@@@@@@@@
|
|
413 |
@@@@@@@@@@@@@@@@@@@@@@,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
414 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; 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]
|
|
415 |
!
|
|
416 |
|
|
417 |
leftArrow20x20Icon
|
|
418 |
"This resource specification was automatically generated
|
|
419 |
by the ImageEditor of ST/X."
|
|
420 |
|
|
421 |
"Do not manually edit this!! If it is corrupted,
|
|
422 |
the ImageEditor may not be able to read the specification."
|
|
423 |
|
|
424 |
"
|
|
425 |
self leftArrow20x20Icon inspect
|
|
426 |
ImageEditor openOnClass:self andSelector:#leftArrow20x20Icon
|
|
427 |
Icon flushCachedIcons
|
|
428 |
"
|
|
429 |
|
|
430 |
<resource: #image>
|
|
431 |
|
|
432 |
^Icon
|
|
433 |
constantNamed:#'AbstractFileBrowser class leftArrow20x20Icon'
|
|
434 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
435 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@DB@@@@@@@@@@@@@@@@@@@@@@@A@0D@@@@@@@@@@@@@@@@@@@@@@PPE
|
|
436 |
@ @@@@@@@@@@@@@@@@@@@@DF@@\A@@@@@@@@@@@@@@@@@@@AB@@IB HK@0LA@PDK@@@@@@@@@P0@@@4NC1@@@@@Q@1H@@@@@@@DF@@@SEATNDADQE!!\GD @@
|
|
437 |
@@@AAADQD1PUEQTNF@$SFP(R@@@@@@,JEA,\EATUEQ4]GQ4]B!!H@@@@@@AHJEA8\EAP[G1<_F2@JD @@@@@@@AHJC!!< GQ4JB (JB"DK@@@@@@@@@AHJC!!8J
|
|
438 |
@QHRD!!HRD ,@@@@@@@@@@AHJGRHB@@@@@@@@@@@@@@@@@@@@@AHJHPD@@@@@@@@@@@@@@@@@@@@@@@,A@ @@@@@@@@@@@@@@@@@@@@@@@@,A@@@@@@@@@@@@
|
|
439 |
@@@@@@@@@@@@@@,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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:'@@@@@B@@@F@@@N@@@^@@@>@@A??@C??@G??@O??@O??@G??@C??@A??@@>@@@^@@@N@@@F@@@B@@@@@@') ; yourself); yourself]
|
|
440 |
!
|
|
441 |
|
|
442 |
leftArrow20x20PlusMenuIcon
|
|
443 |
"This resource specification was automatically generated
|
|
444 |
by the ImageEditor of ST/X."
|
|
445 |
|
|
446 |
"Do not manually edit this!! If it is corrupted,
|
|
447 |
the ImageEditor may not be able to read the specification."
|
|
448 |
|
|
449 |
"
|
|
450 |
self leftArrow20x20PlusMenuIcon inspect
|
|
451 |
ImageEditor openOnClass:self andSelector:#leftArrow20x20PlusMenuIcon
|
|
452 |
Icon flushCachedIcons
|
|
453 |
"
|
|
454 |
|
|
455 |
<resource: #image>
|
|
456 |
|
|
457 |
^Icon
|
|
458 |
constantNamed:#'AbstractFileBrowser class leftArrow20x20PlusMenuIcon'
|
|
459 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
460 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@A@ @@@@@@@@@@@@@@@@@@@@@@@PLA@@@@@@@@@@@@@@@@@@@@@@DD
|
|
461 |
APH@@@@@@@@@@@@@@@@@@@@AA @G@P@@@@@@@@@@@@@@@@@@@P @BP(BB0LC@PDAB0@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@AA @@D1PUC!!@QDQXWA1H@
|
|
462 |
@@@@@PPQDQLTEQTUC!! ID1$JD @@@@@KB!!P[GAPUEQT]GQ4]GP(R@@@@@@@RB!!P^GAPTF1<_G1, B!!H@@@@@@@@RB 8_HA4]B (JB (!!B0@@@@@@@@@RB 8^
|
|
463 |
B DRD!!HRD!!HK@@@@@@@@@@@RB!!4"@ @@@@@@@@@@@@@@@@@@@@@RB"DA@@@@@@@@@@@KB0,KB0,K@@@K@PH@@@@@@@@@@@@KB0,KB0@@@@@K@P@@@@@@@@@@
|
|
464 |
@@@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]
|
|
465 |
!
|
|
466 |
|
|
467 |
leftArrowPlusMenu
|
|
468 |
"This resource specification was automatically generated
|
|
469 |
by the ImageEditor of ST/X."
|
|
470 |
|
|
471 |
"Do not manually edit this!! If it is corrupted,
|
|
472 |
the ImageEditor may not be able to read the specification."
|
|
473 |
|
|
474 |
"
|
|
475 |
self leftArrowPlusMenu inspect
|
|
476 |
ImageEditor openOnClass:self andSelector:#leftArrowPlusMenu
|
|
477 |
"
|
|
478 |
|
|
479 |
<resource: #image>
|
|
480 |
|
|
481 |
^Icon
|
|
482 |
constantNamed:#'AbstractFileBrowser class leftArrowPlusMenu'
|
|
483 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
484 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@
|
|
485 |
@@@@@@@@@@@@@@@@@@@A@0D@@@@@@@@@@@@@@@@@@@@@@@@@@@DDAPH@@@@@@@@@@@@@@@@@@@@@@@@@@PX@A0D@@@@@@@@@@@@@@@@@@@@@@@@AB@@IB HK
|
|
486 |
@0LA@PDK@@@@@@@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@@@@@@@PX@@ALTEP8PDQDVE0\R@@@@@@@@@@@AAADQD1PUEQTNF@$SFP(R@@@@@@@@@@@KB!!P[
|
|
487 |
GAPUEQT]GQ4]GP(R@@@@@@@@@@@@D (TG!!0TEA,_G1<[H@(R@@@@@@@@@@@@@AHJC!!< GQ4JB (JB"DK@@@@@@@@@@@@@@@RB 8^B DRD!!HRD!!HK@@@@@@@@
|
|
488 |
@@@@@@@@D (]H H@@@@@@@@@@@@@@@@@@@@@@@@@@AHJHPD@@@@@@@@@@@@@@@@@@@@@@@@@@@@K@PH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B0D@@@@@@@@@
|
|
489 |
@@@@@@@@@@@@@@@@@@@@@@,@@@@@@@@KB0,KB0,K@@@@@@@@@@@@@@@@@@@@@@@@B0,KB0,@@@@@@@@@@@@@@@@@@@@@@@@@@@,KB0@@@@@@@@@@@@@@@@@@
|
|
490 |
@@@@@@@@@@@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]
|
|
491 |
!
|
|
492 |
|
|
493 |
leftDownIcon
|
|
494 |
"This resource specification was automatically generated
|
|
495 |
by the ImageEditor of ST/X."
|
|
496 |
|
|
497 |
"Do not manually edit this!! If it is corrupted,
|
|
498 |
the ImageEditor may not be able to read the specification."
|
|
499 |
|
|
500 |
"
|
|
501 |
self leftDownIcon inspect
|
|
502 |
ImageEditor openOnClass:self andSelector:#leftDownIcon
|
|
503 |
"
|
|
504 |
|
|
505 |
<resource: #image>
|
|
506 |
|
|
507 |
^Icon
|
|
508 |
constantNamed:#'AbstractFileBrowser class leftDownIcon'
|
|
509 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
510 |
UUUUUUUUUUUPAUUUUUUUP@UUUUUUUPB!!UUUUUU@B*AUUUUU@B*(UUUUUPB** UUUUPB***AUUUTB***(EUUUB****%UUUR*****UUUUU@*%UUUUUUPJ)UUUU
|
|
511 |
UUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*$@@@@AUPJ*****)UTB******UU@******%UPJ*****)UTAUUUU
|
|
512 |
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:'
|
|
513 |
@@@@@@@@@@@@ @@@@\@@@@O @@@G<@@@C? @@A?<@@@?? @@_?<@@G?? @@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C??? @???8@O?
|
|
514 |
?>@C??? @???8@O??>@@@@@@@@@@@@@a') ; yourself); yourself]
|
|
515 |
!
|
|
516 |
|
|
517 |
leftIcon
|
|
518 |
"This resource specification was automatically generated
|
|
519 |
by the ImageEditor of ST/X."
|
|
520 |
|
|
521 |
"Do not manually edit this!! If it is corrupted,
|
|
522 |
the ImageEditor may not be able to read the specification."
|
|
523 |
|
|
524 |
"
|
|
525 |
self leftIcon inspect
|
|
526 |
ImageEditor openOnClass:self andSelector:#leftIcon
|
|
527 |
"
|
|
528 |
|
|
529 |
<resource: #image>
|
|
530 |
|
|
531 |
^Icon
|
|
532 |
constantNamed:#'AbstractFileBrowser class leftIcon'
|
|
533 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
534 |
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUPUUUUUUUUPUUUUUUUUP%UUUUUUUP)UUUUUUUP*P@@@@@AP*$@@@@@@P*******
|
|
535 |
*P********$********)J********U********%V*%UUUUUUUZ)UUUUUUUP*UUUUUUUUV%UUUUUUUUYUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
|
|
536 |
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:'
|
|
537 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H@@@@F@@@@C @@@A8@@@@>@@@@_???0O???<G????C????0_???<C????@_???0C8@@@@^@@@@C @@@@X@@@@@@
|
|
538 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
|
|
539 |
!
|
|
540 |
|
|
541 |
menuHistoryList9x20Icon
|
|
542 |
"This resource specification was automatically generated
|
|
543 |
by the ImageEditor of ST/X."
|
|
544 |
|
|
545 |
"Do not manually edit this!! If it is corrupted,
|
|
546 |
the ImageEditor may not be able to read the specification."
|
|
547 |
|
|
548 |
"
|
|
549 |
self menuHistoryList9x20Icon inspect
|
|
550 |
ImageEditor openOnClass:self andSelector:#menuHistoryList9x20Icon
|
|
551 |
Icon flushCachedIcons
|
|
552 |
"
|
|
553 |
|
|
554 |
<resource: #image>
|
|
555 |
|
|
556 |
^Icon
|
|
557 |
constantNamed:#'AbstractFileBrowser class menuHistoryList9x20Icon'
|
|
558 |
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]
|
|
559 |
!
|
|
560 |
|
|
561 |
menuHistoryListIcon
|
|
562 |
"This resource specification was automatically generated
|
|
563 |
by the ImageEditor of ST/X."
|
|
564 |
|
|
565 |
"Do not manually edit this!! If it is corrupted,
|
|
566 |
the ImageEditor may not be able to read the specification."
|
|
567 |
|
|
568 |
"
|
|
569 |
self menuHistoryListIcon inspect
|
|
570 |
ImageEditor openOnClass:self andSelector:#menuHistoryListIcon
|
|
571 |
"
|
|
572 |
|
|
573 |
<resource: #image>
|
|
574 |
|
|
575 |
^Icon
|
|
576 |
constantNamed:#'AbstractFileBrowser class menuHistoryListIcon'
|
|
577 |
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]
|
|
578 |
!
|
|
579 |
|
|
580 |
pasteIcon
|
|
581 |
<resource: #programImage>
|
|
582 |
|
|
583 |
^ ToolbarIconLibrary paste20x20Icon "/ paste28x28Icon
|
|
584 |
!
|
|
585 |
|
|
586 |
rightArrow
|
|
587 |
"This resource specification was automatically generated
|
|
588 |
by the ImageEditor of ST/X."
|
|
589 |
|
|
590 |
"Do not manually edit this!! If it is corrupted,
|
|
591 |
the ImageEditor may not be able to read the specification."
|
|
592 |
|
|
593 |
"
|
|
594 |
self rightArrow inspect
|
|
595 |
ImageEditor openOnClass:self andSelector:#rightArrow
|
|
596 |
"
|
|
597 |
|
|
598 |
<resource: #image>
|
|
599 |
|
|
600 |
^Icon
|
|
601 |
constantNamed:#'AbstractFileBrowser class rightArrow'
|
|
602 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
603 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@
|
|
604 |
@@@@@@@@@@@@@@@@@@@@@0PB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PTF@ @@@@@@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@@@@@@A@PDA@PDH@P\I
|
|
605 |
@@XB@@@@@@@@@@@@@@@AA0(@@@@@B ,LB @D@ @@@@@@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@@@@@@@@M@@TTEQLQE!!\WD 0K@@PB@@@@@@@@@@@MB <W
|
|
606 |
E1\WD!!\WD!!LYDQ(B@@@@@@@@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@@@@@@AA!!(ZF!!(ZE1H^FQDZ@ @@@@@@@@@@@@@A@ HB@ HB@1DYDQ(B@@@@@@@@@@@@
|
|
607 |
@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@@@@@@@0PZ@ @@@@@@@@@@@@@@@@@@@@@@@@@@@Q(B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0H@@@@@@@@@
|
|
608 |
@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
609 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; 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]
|
|
610 |
!
|
|
611 |
|
|
612 |
rightArrow20x20Icon
|
|
613 |
"This resource specification was automatically generated
|
|
614 |
by the ImageEditor of ST/X."
|
|
615 |
|
|
616 |
"Do not manually edit this!! If it is corrupted,
|
|
617 |
the ImageEditor may not be able to read the specification."
|
|
618 |
|
|
619 |
"
|
|
620 |
self rightArrow20x20Icon inspect
|
|
621 |
ImageEditor openOnClass:self andSelector:#rightArrow20x20Icon
|
|
622 |
Icon flushCachedIcons
|
|
623 |
"
|
|
624 |
|
|
625 |
<resource: #image>
|
|
626 |
|
|
627 |
^Icon
|
|
628 |
constantNamed:#'AbstractFileBrowser class rightArrow20x20Icon'
|
|
629 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
630 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@DB@@@@@@@@@@@@@@@@@@@@@@@@@0PB@@@@@@@@@@@@@@@@@@@@@@@A
|
|
631 |
APXB@@@@@@@@@@@@@@@@@@@@@@LG@@PB@@@@@@@@@@@A@PDA@PDH@P\I@@XB@@@@@@@@@@DGB @@@@@JB00J@@PB@@@@@@@@CP(GC (KC1@QD!!LJ@@XB@@@@
|
|
632 |
@@@M@@TTEQLQE!!\WD 0K@@PB@@@@@@4JC1\WE1\RE1\RD1$QF H@@@@@@P(OF1L\F14^DQ8YDQ(B@@@@@@@AA!!(ZF!!(ZE1H^FQDZ@ @@@@@@@@DB@ HB@ HC
|
|
633 |
DQ$QF H@@@@@@@@@@@@@@@@@@@DVDQ(B@@@@@@@@@@@@@@@@@@@@@0PZ@ @@@@@@@@@@@@@@@@@@@@@AF H@@@@@@@@@@@@@@@@@@@@@@@LB@@@@@@@@@@@@
|
|
634 |
@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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:'@@@@@D@@@F@@@G@@@G @@G0@O?8@O?<@O?>@O??@O??@O?>@O?<@O?8@@G0@@G @@G@@@F@@@D@@@@@@') ; yourself); yourself]
|
|
635 |
!
|
|
636 |
|
|
637 |
rightArrowPlusMenu
|
|
638 |
"This resource specification was automatically generated
|
|
639 |
by the ImageEditor of ST/X."
|
|
640 |
|
|
641 |
"Do not manually edit this!! If it is corrupted,
|
|
642 |
the ImageEditor may not be able to read the specification."
|
|
643 |
|
|
644 |
"
|
|
645 |
self rightArrowPlusMenu inspect
|
|
646 |
ImageEditor openOnClass:self andSelector:#rightArrowPlusMenu
|
|
647 |
"
|
|
648 |
|
|
649 |
<resource: #image>
|
|
650 |
|
|
651 |
^Icon
|
|
652 |
constantNamed:#'AbstractFileBrowser class rightArrowPlusMenu'
|
|
653 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
654 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@
|
|
655 |
@@@@@@@@@@@@@@@@@@@@@0PB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PTF@ @@@@@@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@@@@@@A@PDA@PDH@P\I
|
|
656 |
@@XB@@@@@@@@@@@@@@@AA0(@@@@@B ,LB @D@ @@@@@@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@@@@@@@@M@@TTEQLQE!!\WD 0K@@PB@@@@@@@@@@@MB <W
|
|
657 |
E1\WD!!\WD!!LYDQ(B@@@@@@@@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@@@@@@AA!!(ZF!!(ZE1H^FQDZ@ @@@@@@@@@@@@@A@ HB@ HB@1DYDQ(B@@@@@@@@@@@@
|
|
658 |
@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@@@@@@@0PZ@ @@@@@@@@@@@@@@@@@@@@@@@@@@@Q(B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0H@@@@@@@@@
|
|
659 |
@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@B@ HB@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@ @@@@@@@@@@@@@@@@@@
|
|
660 |
@@@@@@@@@@@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]
|
|
661 |
!
|
|
662 |
|
|
663 |
rightArrowPlusMenu20x20Icon
|
|
664 |
"This resource specification was automatically generated
|
|
665 |
by the ImageEditor of ST/X."
|
|
666 |
|
|
667 |
"Do not manually edit this!! If it is corrupted,
|
|
668 |
the ImageEditor may not be able to read the specification."
|
|
669 |
|
|
670 |
"
|
|
671 |
self rightArrowPlusMenu20x20Icon inspect
|
|
672 |
ImageEditor openOnClass:self andSelector:#rightArrowPlusMenu20x20Icon
|
|
673 |
Icon flushCachedIcons
|
|
674 |
"
|
|
675 |
|
|
676 |
<resource: #image>
|
|
677 |
|
|
678 |
^Icon
|
|
679 |
constantNamed:#'AbstractFileBrowser class rightArrowPlusMenu20x20Icon'
|
|
680 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
681 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@@@@@@@@@@@@@@@@CA@H@@@@@@@@@@@@@@@@@@@@@@@DE
|
|
682 |
A H@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@DA@PDA@P AA0$@A H@@@@@@@@@@P\J@@@@@@(KC@(@A@H@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@
|
|
683 |
@@4@AQPUD1DVE1\RC@,@A@H@@@@@CP(OE1\WE1HWE1HSFQDZ@ @@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@DFF!!(ZF!!(WD!!8YDQ(B@@@@@@@@@PHB@ HB@ LQ
|
|
684 |
FQDZ@ @@@@@@@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@CAA(B@@@@@@@@@@@@@@@@@@@@@@DZ@ @@@ HB@ HB@ @@@@@@@@@@@0H@@@@@@ HB@ H@
|
|
685 |
@@@@@@@@@@@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]
|
|
686 |
!
|
|
687 |
|
|
688 |
rightIcon
|
|
689 |
"This resource specification was automatically generated
|
|
690 |
by the ImageEditor of ST/X."
|
|
691 |
|
|
692 |
"Do not manually edit this!! If it is corrupted,
|
|
693 |
the ImageEditor may not be able to read the specification."
|
|
694 |
|
|
695 |
"
|
|
696 |
self rightIcon inspect
|
|
697 |
ImageEditor openOnClass:self andSelector:#rightIcon
|
|
698 |
"
|
|
699 |
|
|
700 |
<resource: #image>
|
|
701 |
|
|
702 |
^Icon
|
|
703 |
constantNamed:#'AbstractFileBrowser class rightIcon'
|
|
704 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
705 |
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUTIUUUUUUUUB%UEUUUUUP*EP@@@@@@J)T@@@@@@B*%B*******
|
|
706 |
*P********(J********B********P********PEUUUUUV*QEUUUUUP*PUUUUUUTJQUUUUUUUBQUUUUUUUPQUUUUUUUPAUUUUUUUTUUUUUUUUUUUUUUUUUUU
|
|
707 |
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:'
|
|
708 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@@@@@8@@@@O@@@@C8A????@_???8G????A????0_???<G???>A????@@@@O @@@C0@@@@8@@@@L@@@@
|
|
709 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself]
|
|
710 |
!
|
|
711 |
|
|
712 |
searchIcon
|
|
713 |
<resource: #programImage>
|
|
714 |
|
|
715 |
^ ToolbarIconLibrary search16x16Icon "/ search28x28Icon
|
|
716 |
!
|
|
717 |
|
|
718 |
shellIcon
|
|
719 |
<resource: #programImage>
|
|
720 |
|
|
721 |
OperatingSystem isMSDOSlike ifTrue:[
|
|
722 |
^ ToolbarIconLibrary dos20x20Icon
|
|
723 |
].
|
|
724 |
^ ToolbarIconLibrary shell20x20Icon
|
|
725 |
!
|
|
726 |
|
|
727 |
upArrow
|
|
728 |
"This resource specification was automatically generated
|
|
729 |
by the ImageEditor of ST/X."
|
|
730 |
|
|
731 |
"Do not manually edit this!! If it is corrupted,
|
|
732 |
the ImageEditor may not be able to read the specification."
|
|
733 |
|
|
734 |
"
|
|
735 |
self upArrow inspect
|
|
736 |
ImageEditor openOnClass:self andSelector:#upArrow
|
|
737 |
"
|
|
738 |
|
|
739 |
<resource: #image>
|
|
740 |
|
|
741 |
^Icon
|
|
742 |
constantNamed:#'AbstractFileBrowser class upArrow'
|
|
743 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
744 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@
|
|
745 |
@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@@@@@@DFA0 DAP@@@@@@@@@@@@@@@@@@@@@@@P$@A0(HA@T@@@@@@@@@@@@@@@@@@@@AB0@@C@4N
|
|
746 |
C0PE@@@@@@@@@@@@@@@@@@DF@@@LB@ MD@<DAP@@@@@@@@@@@@@@@PLGDQHHD1LHE@8UA@H@@@@@@@@@@@@AE!!\XA@<SD1LHEPPYF DB@@@@@@@@@@D\@Q0A
|
|
747 |
GA4OD1LJEPD\@Q0A@ @@@@@@@@@@@@@@@!!8^C1T_A@T@@@@@@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@@@@@@E @GDQT_A@T@@@@@@@@@@@@@
|
|
748 |
@@@@@@@@@P@!!H!!TJA@T@@@@@@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@@@@@@@QXXFPPDF H@@@@@@@@@@@@@@@@@@@@@@ TEAPTE@ H@@@@@
|
|
749 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
750 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; 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]
|
|
751 |
!
|
|
752 |
|
|
753 |
upArrow20x20Icon
|
|
754 |
"This resource specification was automatically generated
|
|
755 |
by the ImageEditor of ST/X."
|
|
756 |
|
|
757 |
"Do not manually edit this!! If it is corrupted,
|
|
758 |
the ImageEditor may not be able to read the specification."
|
|
759 |
|
|
760 |
"
|
|
761 |
self upArrow20x20Icon inspect
|
|
762 |
ImageEditor openOnClass:self andSelector:#upArrow20x20Icon
|
|
763 |
Icon flushCachedIcons
|
|
764 |
"
|
|
765 |
|
|
766 |
<resource: #image>
|
|
767 |
|
|
768 |
^Icon
|
|
769 |
constantNamed:#'AbstractFileBrowser class upArrow20x20Icon'
|
|
770 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
771 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DB@@@@@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@PXG
|
|
772 |
B@PE@@@@@@@@@@@@@@@@@@DI@@\JB@PE@@@@@@@@@@@@@@@AB0@@C@4NC0PE@@@@@@@@@@@@@PX@@@0HB@4PC0PE@@@@@@@@@@DCA1DRBALSBAPNEPPB@@@@
|
|
773 |
@@@AE!!\XA@<SD1LHEPPYF DB@@@@@Q0AG@D\GP<SD0(U@Q0AG@DB@@@@@@@@@@H^G <UG0PE@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@V@@\Q
|
|
774 |
EQ<DAP@@@@@@@@@@@@@@@@D@HRHUB PE@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@AE!! YA@PZ@ @@@@@@@@@@@@@@@@HEAPTEAPHB@@@@@@@@
|
|
775 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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]
|
|
776 |
!
|
|
777 |
|
|
778 |
upArrowPlusMenu
|
|
779 |
"This resource specification was automatically generated
|
|
780 |
by the ImageEditor of ST/X."
|
|
781 |
|
|
782 |
"Do not manually edit this!! If it is corrupted,
|
|
783 |
the ImageEditor may not be able to read the specification."
|
|
784 |
|
|
785 |
"
|
|
786 |
self upArrowPlusMenu inspect
|
|
787 |
ImageEditor openOnClass:self andSelector:#upArrowPlusMenu
|
|
788 |
"
|
|
789 |
|
|
790 |
<resource: #image>
|
|
791 |
|
|
792 |
^Icon
|
|
793 |
constantNamed:#'AbstractFileBrowser class upArrowPlusMenu'
|
|
794 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
795 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@
|
|
796 |
@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@@@@@@DFA0 DAP@@@@@@@@@@@@@@@@@@@@@@@P$@A0(HA@T@@@@@@@@@@@@@@@@@@@@AB0@@C@4N
|
|
797 |
C0PE@@@@@@@@@@@@@@@@@@DF@@@LB@ MD@<DAP@@@@@@@@@@@@@@@PLGDQHHD1LHE@8UA@H@@@@@@@@@@@@AE!!\XA@<SD1LHEPPYF DB@@@@@@@@@@D\@Q0A
|
|
798 |
GA4OD1LJEPD\@Q0A@ @@@@@@@@@@@@@@@!!8^C1T_A@T@@@@@@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@@@@@@E @GDQT_A@T@@@@@@@@@@@@@
|
|
799 |
@@@@@@@@@P@!!H!!TJA@T@@@@@@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@@@@@@@QXXFPPDF H@@@@@@@@@@@@@@@@@@@@@@ TEAPTE@ H@@@@@
|
|
800 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B@ HB@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@ @@@@@@@@@@@@@@@@@@
|
|
801 |
@@@@@@@@@@@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]
|
|
802 |
!
|
|
803 |
|
|
804 |
vt100Terminal
|
|
805 |
<resource: #programImage>
|
|
806 |
|
|
807 |
^ ToolbarIconLibrary shell20x20Icon
|
|
808 |
! !
|
|
809 |
|
|
810 |
!AbstractFileBrowser class methodsFor:'menu specs'!
|
|
811 |
|
|
812 |
baseBookmarksMenuSpec
|
|
813 |
"This resource specification was automatically generated
|
|
814 |
by the MenuEditor of ST/X."
|
|
815 |
|
|
816 |
"Do not manually edit this!! If it is corrupted,
|
|
817 |
the MenuEditor may not be able to read the specification."
|
|
818 |
|
|
819 |
"
|
|
820 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#baseBookmarksMenuSpec
|
|
821 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser baseBookmarksMenuSpec)) startUp
|
|
822 |
"
|
|
823 |
|
|
824 |
<resource: #menu>
|
|
825 |
|
|
826 |
^
|
|
827 |
#(#Menu
|
|
828 |
#(
|
|
829 |
#(#MenuItem
|
|
830 |
#label: 'Add Bookmark'
|
|
831 |
#translateLabel: true
|
|
832 |
#value: #addBookmark
|
|
833 |
#enabled: #currentFilesHasDirectories
|
|
834 |
)
|
|
835 |
#(#MenuItem
|
|
836 |
#label: 'Remove Bookmark'
|
|
837 |
#translateLabel: true
|
|
838 |
#value: #removeBookmark
|
|
839 |
#enabled: #hasBookmarksToRemove
|
|
840 |
)
|
|
841 |
)
|
|
842 |
nil
|
|
843 |
nil
|
|
844 |
)
|
|
845 |
!
|
|
846 |
|
|
847 |
directoryMenu
|
|
848 |
"This resource specification was automatically generated
|
|
849 |
by the MenuEditor of ST/X."
|
|
850 |
|
|
851 |
"Do not manually edit this!! If it is corrupted,
|
|
852 |
the MenuEditor may not be able to read the specification."
|
|
853 |
|
|
854 |
"
|
|
855 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#directoryMenu
|
|
856 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser directoryMenu)) startUp
|
|
857 |
"
|
|
858 |
|
|
859 |
<resource: #menu>
|
|
860 |
|
|
861 |
^
|
|
862 |
#(#Menu
|
|
863 |
#(
|
|
864 |
#(#MenuItem
|
|
865 |
#label: 'Up'
|
|
866 |
#translateLabel: true
|
|
867 |
#value: #doGoDirectoryUp
|
|
868 |
)
|
|
869 |
#(#MenuItem
|
|
870 |
#label: '-'
|
|
871 |
)
|
|
872 |
#(#MenuItem
|
|
873 |
#label: 'Back'
|
|
874 |
#translateLabel: true
|
|
875 |
#value: #doBack
|
|
876 |
#activeHelpKey: #directoryBack
|
|
877 |
#enabled: #enableBack
|
|
878 |
)
|
|
879 |
#(#MenuItem
|
|
880 |
#label: 'Forward'
|
|
881 |
#translateLabel: true
|
|
882 |
#value: #doForward
|
|
883 |
#activeHelpKey: #directoryBack
|
|
884 |
#enabled: #enableForward
|
|
885 |
)
|
|
886 |
#(#MenuItem
|
|
887 |
#label: '-'
|
|
888 |
)
|
|
889 |
#(#MenuItem
|
|
890 |
#label: 'Default'
|
|
891 |
#translateLabel: true
|
|
892 |
#value: #doGotoDefaultDirectory
|
|
893 |
)
|
|
894 |
#(#MenuItem
|
|
895 |
#label: 'Home'
|
|
896 |
#translateLabel: true
|
|
897 |
#value: #doGotoHomeDirectory
|
|
898 |
)
|
|
899 |
#(#MenuItem
|
|
900 |
#label: 'Bookmarks'
|
|
901 |
#translateLabel: true
|
|
902 |
#submenuChannel: #bookmarksMenuSpec
|
|
903 |
)
|
|
904 |
)
|
|
905 |
nil
|
|
906 |
nil
|
|
907 |
)
|
|
908 |
!
|
|
909 |
|
|
910 |
editMenu
|
|
911 |
"This resource specification was automatically generated
|
|
912 |
by the MenuEditor of ST/X."
|
|
913 |
|
|
914 |
"Do not manually edit this!! If it is corrupted,
|
|
915 |
the MenuEditor may not be able to read the specification."
|
|
916 |
|
|
917 |
"
|
|
918 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#editMenu
|
|
919 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser editMenu)) startUp
|
|
920 |
"
|
|
921 |
|
|
922 |
<resource: #menu>
|
|
923 |
|
|
924 |
^
|
|
925 |
#(#Menu
|
|
926 |
#(
|
|
927 |
#(#MenuItem
|
|
928 |
#label: 'Copy'
|
|
929 |
#translateLabel: true
|
|
930 |
#value: #copyInDirContentsBrowser
|
|
931 |
#enabled: #hasSelection
|
|
932 |
)
|
|
933 |
#(#MenuItem
|
|
934 |
#label: 'Cut'
|
|
935 |
#translateLabel: true
|
|
936 |
#value: #cutInDirContentsBrowser
|
|
937 |
#enabled: #hasSelection
|
|
938 |
)
|
|
939 |
#(#MenuItem
|
|
940 |
#label: 'Paste'
|
|
941 |
#translateLabel: true
|
|
942 |
#value: #pasteFiles
|
|
943 |
#enabled: #canPaste
|
|
944 |
)
|
|
945 |
#(#MenuItem
|
|
946 |
#label: 'Delete'
|
|
947 |
#translateLabel: true
|
|
948 |
#value: #deleteInDirContentsBrowser
|
|
949 |
#enabled: #hasSelection
|
|
950 |
)
|
|
951 |
#(#MenuItem
|
|
952 |
#label: '-'
|
|
953 |
)
|
|
954 |
#(#MenuItem
|
|
955 |
#label: 'Copy All Filenames'
|
|
956 |
#translateLabel: true
|
|
957 |
#value: #copyFileList
|
|
958 |
#enabled: #fileListIsNotEmpty
|
|
959 |
)
|
|
960 |
#(#MenuItem
|
|
961 |
#label: 'Copy Selected Filenames'
|
|
962 |
#translateLabel: true
|
|
963 |
#value: #copySelectedFilenames
|
|
964 |
#enabled: #hasSelection
|
|
965 |
)
|
|
966 |
)
|
|
967 |
nil
|
|
968 |
nil
|
|
969 |
)
|
|
970 |
!
|
|
971 |
|
|
972 |
fileMenu
|
|
973 |
"This resource specification was automatically generated
|
|
974 |
by the MenuEditor of ST/X."
|
|
975 |
|
|
976 |
"Do not manually edit this!! If it is corrupted,
|
|
977 |
the MenuEditor may not be able to read the specification."
|
|
978 |
|
|
979 |
"
|
|
980 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#fileMenu
|
|
981 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser fileMenu)) startUp
|
|
982 |
"
|
|
983 |
|
|
984 |
<resource: #menu>
|
|
985 |
|
|
986 |
^
|
|
987 |
#(#Menu
|
|
988 |
#(
|
|
989 |
#(#MenuItem
|
|
990 |
#label: 'New'
|
|
991 |
#translateLabel: true
|
|
992 |
#submenuChannel: #newMenu
|
|
993 |
)
|
|
994 |
#(#MenuItem
|
|
995 |
#label: 'Rename'
|
|
996 |
#translateLabel: true
|
|
997 |
#value: #renameSelection
|
|
998 |
#enabled: #hasSelection
|
|
999 |
#shortcutKeyCharacter: #Replace
|
|
1000 |
)
|
|
1001 |
#(#MenuItem
|
|
1002 |
#label: '-'
|
|
1003 |
)
|
|
1004 |
#(#MenuItem
|
|
1005 |
#label: 'Show File Contents'
|
|
1006 |
#translateLabel: true
|
|
1007 |
#value: #doShowFileContents
|
|
1008 |
)
|
|
1009 |
#(#MenuItem
|
|
1010 |
#label: 'Properties...'
|
|
1011 |
#translateLabel: true
|
|
1012 |
#value: #doShowProperties
|
|
1013 |
#enabled: #hasSelection
|
|
1014 |
)
|
|
1015 |
#(#MenuItem
|
|
1016 |
#label: '-'
|
|
1017 |
#isVisible: #javaSupportLoaded
|
|
1018 |
)
|
|
1019 |
#(#MenuItem
|
|
1020 |
#label: 'File In'
|
|
1021 |
#translateLabel: true
|
|
1022 |
#value: #fileFileIn
|
|
1023 |
#enabled: #hasSelection
|
|
1024 |
)
|
|
1025 |
#(#MenuItem
|
|
1026 |
#label: 'File in to NameSpace...'
|
|
1027 |
#translateLabel: true
|
|
1028 |
#value: #fileFileInToNameSpace
|
|
1029 |
#enabled: #hasSelection
|
|
1030 |
)
|
|
1031 |
#(#MenuItem
|
|
1032 |
#label: '-'
|
|
1033 |
#isVisible: #javaSupportLoaded
|
|
1034 |
)
|
|
1035 |
#(#MenuItem
|
|
1036 |
#label: 'Add to Java Class Path'
|
|
1037 |
#translateLabel: true
|
|
1038 |
#isVisible: #javaSupportLoaded
|
|
1039 |
#enabled: #canAddToClassPath
|
|
1040 |
)
|
|
1041 |
#(#MenuItem
|
|
1042 |
#label: 'Remove from Java Class Path'
|
|
1043 |
#translateLabel: true
|
|
1044 |
#isVisible: #javaSupportLoaded
|
|
1045 |
#enabled: #canRemoveFromClassPath
|
|
1046 |
)
|
|
1047 |
#(#MenuItem
|
|
1048 |
#label: 'Add to Java Source Path'
|
|
1049 |
#translateLabel: true
|
|
1050 |
#isVisible: #javaSupportLoaded
|
|
1051 |
#enabled: #canAddToSourcePath
|
|
1052 |
)
|
|
1053 |
#(#MenuItem
|
|
1054 |
#label: 'Remove from Java Source Path'
|
|
1055 |
#translateLabel: true
|
|
1056 |
#isVisible: #javaSupportLoaded
|
|
1057 |
#enabled: #canRemoveFromSourcePath
|
|
1058 |
)
|
|
1059 |
)
|
|
1060 |
nil
|
|
1061 |
nil
|
|
1062 |
)
|
|
1063 |
!
|
|
1064 |
|
|
1065 |
newMenu
|
|
1066 |
"This resource specification was automatically generated
|
|
1067 |
by the MenuEditor of ST/X."
|
|
1068 |
|
|
1069 |
"Do not manually edit this!! If it is corrupted,
|
|
1070 |
the MenuEditor may not be able to read the specification."
|
|
1071 |
|
|
1072 |
"
|
|
1073 |
MenuEditor new openOnClass:DirectoryTreeBrowser andSelector:#newMenu
|
|
1074 |
(Menu new fromLiteralArrayEncoding:(DirectoryTreeBrowser newMenu)) startUp
|
|
1075 |
"
|
|
1076 |
|
|
1077 |
<resource: #menu>
|
|
1078 |
|
|
1079 |
^
|
|
1080 |
#(#Menu
|
|
1081 |
#(
|
|
1082 |
#(#MenuItem
|
|
1083 |
#label: 'Directory...'
|
|
1084 |
#translateLabel: true
|
|
1085 |
#value: #newDirectory
|
|
1086 |
)
|
|
1087 |
#(#MenuItem
|
|
1088 |
#label: 'File...'
|
|
1089 |
#translateLabel: true
|
|
1090 |
#value: #newFile
|
|
1091 |
)
|
|
1092 |
#(#MenuItem
|
|
1093 |
#label: 'Hard Link...'
|
|
1094 |
#translateLabel: true
|
|
1095 |
#isVisible: #systemIsUnix
|
|
1096 |
#value: #newHardLink
|
|
1097 |
)
|
|
1098 |
#(#MenuItem
|
|
1099 |
#label: 'Symbolic Link...'
|
|
1100 |
#translateLabel: true
|
|
1101 |
#isVisible: #systemIsUnix
|
|
1102 |
#value: #newSoftLink
|
|
1103 |
)
|
|
1104 |
)
|
|
1105 |
nil
|
|
1106 |
nil
|
|
1107 |
)
|
|
1108 |
! !
|
|
1109 |
|
|
1110 |
!AbstractFileBrowser class methodsFor:'misc'!
|
|
1111 |
|
|
1112 |
newLock
|
|
1113 |
^ CodeExecutionLock new
|
|
1114 |
! !
|
|
1115 |
|
|
1116 |
!AbstractFileBrowser methodsFor:'actions'!
|
|
1117 |
|
|
1118 |
askForCommandFor:fileName thenDo:aBlock
|
|
1119 |
"setup and launch a querybox to ask for unix command.
|
|
1120 |
Then evaluate aBlock passing the command-string as argument."
|
|
1121 |
|
|
1122 |
|box osName|
|
|
1123 |
|
|
1124 |
osName := OperatingSystem platformName.
|
|
1125 |
|
|
1126 |
box := FilenameEnterBox
|
|
1127 |
title:(resources string:'Execute %1 command:' with:osName)
|
|
1128 |
okText:(resources string:'Execute')
|
|
1129 |
action:aBlock.
|
|
1130 |
|
|
1131 |
fileName notNil ifTrue:[
|
|
1132 |
self initialCommandFor:fileName into:box.
|
|
1133 |
].
|
|
1134 |
box directory:(self getDirWithoutFileName:fileName).
|
|
1135 |
box showAtPointer.
|
|
1136 |
box destroy.
|
|
1137 |
|
|
1138 |
"Modified: / 7.9.1995 / 10:31:54 / claus"
|
|
1139 |
"Modified: / 16.9.1997 / 15:35:10 / stefan"
|
|
1140 |
"Modified: / 14.8.1998 / 14:12:52 / cg"
|
|
1141 |
!
|
|
1142 |
|
|
1143 |
changeFileBrowserTitleTo:aString
|
|
1144 |
|
|
1145 |
self application:#FileBrowserV2
|
|
1146 |
do:#changeFileBrowserTitleTo:
|
|
1147 |
withArg:aString
|
|
1148 |
!
|
|
1149 |
|
|
1150 |
copyFileList
|
|
1151 |
|
|
1152 |
| fileList stream|
|
|
1153 |
fileList := self application:#DirectoryContentsBrowser do:#descriptions.
|
|
1154 |
stream := WriteStream on:''.
|
|
1155 |
fileList do:[: item |
|
|
1156 |
stream nextPutAll:(item fileName asString).
|
|
1157 |
stream cr.
|
|
1158 |
].
|
|
1159 |
self window setTextSelection:stream contents.
|
|
1160 |
stream close.
|
|
1161 |
!
|
|
1162 |
|
|
1163 |
copySelectedFilenames
|
|
1164 |
|
|
1165 |
| fileList stream|
|
|
1166 |
fileList := self application:#DirectoryContentsBrowser do:#getFilesFromSelection.
|
|
1167 |
fileList isEmpty ifTrue:[^ self].
|
|
1168 |
stream := WriteStream on:''.
|
|
1169 |
fileList do:[: file |
|
|
1170 |
stream nextPutAll:(file asString).
|
|
1171 |
stream cr.
|
|
1172 |
].
|
|
1173 |
self window setTextSelection:stream contents.
|
|
1174 |
stream close.
|
|
1175 |
!
|
|
1176 |
|
|
1177 |
doAddTerminal
|
|
1178 |
|
|
1179 |
| item dir directories|
|
|
1180 |
|
|
1181 |
directories := self currentDirectories value.
|
|
1182 |
|
|
1183 |
directories isEmpty ifTrue:[
|
|
1184 |
dir := Filename homeDirectory
|
|
1185 |
] ifFalse:[
|
|
1186 |
dir := directories first.
|
|
1187 |
].
|
|
1188 |
|
|
1189 |
item := (DirectoryContentsBrowser itemClass with:dir).
|
|
1190 |
self fileApplicationDo:#openTerminalApplication: withArg:item.
|
|
1191 |
!
|
|
1192 |
|
|
1193 |
doExecuteCommand
|
|
1194 |
|
|
1195 |
| action fileName|
|
|
1196 |
fileName := self getFirstFileFromSelection.
|
|
1197 |
action := [:command |
|
|
1198 |
self addToCommandHistory:command for:fileName.
|
|
1199 |
self executeCommand:command.
|
|
1200 |
].
|
|
1201 |
self askForCommandFor:fileName thenDo:action
|
|
1202 |
!
|
|
1203 |
|
|
1204 |
doGoDirectoryUp
|
|
1205 |
| upDir directories|
|
|
1206 |
|
|
1207 |
self enableDirectoryUp value ifFalse:[ ^ self].
|
|
1208 |
self currentFilesAreInSameDirectory ifTrue:[
|
|
1209 |
directories := self currentDirectories value.
|
|
1210 |
upDir := directories first directory.
|
|
1211 |
self currentFileNameHolder value:(OrderedCollection with:upDir).
|
|
1212 |
].
|
|
1213 |
!
|
|
1214 |
|
|
1215 |
doGotoDefaultDirectory
|
|
1216 |
self gotoFile:(Filename defaultDirectory).
|
|
1217 |
!
|
|
1218 |
|
|
1219 |
doGotoHomeDirectory
|
|
1220 |
|
|
1221 |
| home |
|
|
1222 |
|
|
1223 |
home := Filename homeDirectory.
|
|
1224 |
self gotoFile:home.
|
|
1225 |
!
|
|
1226 |
|
|
1227 |
doOpenSearchFile
|
|
1228 |
|
|
1229 |
|item files|
|
|
1230 |
|
|
1231 |
item:= self getFirstItemFromSelection.
|
|
1232 |
item isNil ifTrue:[
|
|
1233 |
files := self currentFileNameHolder value.
|
|
1234 |
files notEmpty ifTrue:[
|
|
1235 |
item := DirectoryContentsBrowser itemClass with:(files first).
|
|
1236 |
] ifFalse:[
|
|
1237 |
item := DirectoryContentsBrowser itemClass with:(Filename homeDirectory asAbsoluteFilename).
|
|
1238 |
].
|
|
1239 |
].
|
|
1240 |
self openSearchFileOn:item.
|
|
1241 |
!
|
|
1242 |
|
|
1243 |
doShowFileContents
|
|
1244 |
|
|
1245 |
^ self application:#DirectoryContentsBrowser do:#doShowFileContents.
|
|
1246 |
!
|
|
1247 |
|
|
1248 |
doShowProperties
|
|
1249 |
|
|
1250 |
"show long stat (file)-info"
|
|
1251 |
|
|
1252 |
self fileGetInfo:true
|
|
1253 |
!
|
|
1254 |
|
|
1255 |
fileApplicationDo:selector
|
|
1256 |
|
|
1257 |
^ self application:#FileApplicationNoteBook do:selector
|
|
1258 |
!
|
|
1259 |
|
|
1260 |
fileApplicationDo:selector withArg:arg
|
|
1261 |
^ self application:#FileApplicationNoteBook do:selector withArg:arg
|
|
1262 |
!
|
|
1263 |
|
|
1264 |
fileGetInfo:longInfo
|
|
1265 |
"get info on selected file - show it in a box"
|
|
1266 |
|
|
1267 |
|string box updater|
|
|
1268 |
|
|
1269 |
string := self
|
|
1270 |
application:#DirectoryContentsBrowser
|
|
1271 |
do:#getFileInfoStringForFirstSelectedFile:
|
|
1272 |
withArg:longInfo.
|
|
1273 |
string notNil ifTrue:[
|
|
1274 |
box := InfoBox title:string.
|
|
1275 |
updater := [
|
|
1276 |
[true] whileTrue:[
|
|
1277 |
Delay waitForSeconds:2.
|
|
1278 |
string := self
|
|
1279 |
application:#DirectoryContentsBrowser
|
|
1280 |
do:#getFileInfoStringForFirstSelectedFile:
|
|
1281 |
withArg:longInfo.
|
|
1282 |
box title:string
|
|
1283 |
]
|
|
1284 |
] fork.
|
|
1285 |
box showAtPointer.
|
|
1286 |
updater terminate.
|
|
1287 |
box destroy
|
|
1288 |
]
|
|
1289 |
!
|
|
1290 |
|
|
1291 |
gotoFile:aFilename
|
|
1292 |
|
|
1293 |
self currentFileNameHolder value:(OrderedCollection with:aFilename).
|
|
1294 |
!
|
|
1295 |
|
|
1296 |
openApplByFileItem:aItem
|
|
1297 |
|
|
1298 |
self fileApplicationDo:#openApplByFileItem: withArg:aItem
|
|
1299 |
!
|
|
1300 |
|
|
1301 |
openCommandResultApplication
|
|
1302 |
|
|
1303 |
^ self fileApplicationDo:#openCommandResultApplication
|
|
1304 |
!
|
|
1305 |
|
|
1306 |
openSearchFileOn:aItem
|
|
1307 |
|
|
1308 |
^ self fileApplicationDo:#openSearchFileOn: withArg:aItem
|
|
1309 |
!
|
|
1310 |
|
|
1311 |
openTextEditorOn:aItem
|
|
1312 |
|
|
1313 |
^ self fileApplicationDo:#openTextEditorOn: withArg:aItem
|
|
1314 |
!
|
|
1315 |
|
|
1316 |
updateAndSelect:aColOfFiles
|
|
1317 |
|
|
1318 |
self application:#DirectoryContentsBrowser do:#doUpdate.
|
|
1319 |
self application:#DirectoryTreeBrowser do:#doUpdate.
|
|
1320 |
|
|
1321 |
aColOfFiles notNil ifTrue:[ self currentFileNameHolder value:aColOfFiles ].
|
|
1322 |
!
|
|
1323 |
|
|
1324 |
updateCurrentDirectory
|
|
1325 |
|
|
1326 |
self updateAndSelect:nil
|
|
1327 |
! !
|
|
1328 |
|
|
1329 |
!AbstractFileBrowser methodsFor:'actions bookmarks'!
|
|
1330 |
|
|
1331 |
addBookmark
|
|
1332 |
|
|
1333 |
|directories|
|
|
1334 |
|
|
1335 |
self currentFilesAreInSameDirectory ifFalse:[^ self].
|
|
1336 |
directories := self currentDirectories value.
|
|
1337 |
self addBookmark:directories.
|
|
1338 |
!
|
|
1339 |
|
|
1340 |
addBookmark:aColOfDirectories
|
|
1341 |
|idx bookmarks|
|
|
1342 |
|
|
1343 |
aColOfDirectories do:[ : path |
|
|
1344 |
bookmarks := self class directoryBookmarks.
|
|
1345 |
idx := bookmarks indexOf:path.
|
|
1346 |
idx == 0 ifTrue:[
|
|
1347 |
bookmarks addLast:path.
|
|
1348 |
].
|
|
1349 |
].
|
|
1350 |
!
|
|
1351 |
|
|
1352 |
bookmarksMenuSpec
|
|
1353 |
"This resource specification was automatically generated
|
|
1354 |
by the MenuEditor of ST/X."
|
|
1355 |
|
|
1356 |
"Do not manually edit this!! If it is corrupted,
|
|
1357 |
the MenuEditor may not be able to read the specification."
|
|
1358 |
|
|
1359 |
"
|
|
1360 |
MenuEditor new openOnClass:FileBrowser andSelector:#bookmarksMenuSpec
|
|
1361 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser bookmarksMenuSpec)) startUp
|
|
1362 |
"
|
|
1363 |
<resource: #programMenu>
|
|
1364 |
|
|
1365 |
|menu bookmarks|
|
|
1366 |
|
|
1367 |
menu := self class baseBookmarksMenuSpec.
|
|
1368 |
menu := menu decodeAsLiteralArray.
|
|
1369 |
menu receiver:self.
|
|
1370 |
bookmarks := self class directoryBookmarks.
|
|
1371 |
"/ add the history items ...
|
|
1372 |
|
|
1373 |
bookmarks size > 0 ifTrue:[
|
|
1374 |
menu addItem:(MenuItem labeled:'-').
|
|
1375 |
bookmarks do:[:dirName |
|
|
1376 |
menu addItem:((MenuItem label:dirName asString value:[
|
|
1377 |
(self currentDirectories value includes:dirName) ifFalse:[
|
|
1378 |
self currentFileNameHolder value:(OrderedCollection with:dirName).
|
|
1379 |
].
|
|
1380 |
])).
|
|
1381 |
].
|
|
1382 |
].
|
|
1383 |
^ menu
|
|
1384 |
|
|
1385 |
"Modified: / 17.8.1998 / 10:13:05 / cg"
|
|
1386 |
!
|
|
1387 |
|
|
1388 |
hasBookmarks
|
|
1389 |
^ self class directoryBookmarks size > 0
|
|
1390 |
!
|
|
1391 |
|
|
1392 |
hasBookmarksToRemove
|
|
1393 |
|
|
1394 |
|bookmarks directories|
|
|
1395 |
|
|
1396 |
directories := self getDirectoriesFromSelection.
|
|
1397 |
bookmarks := self class directoryBookmarks.
|
|
1398 |
^ (bookmarks size > 0 and:[directories notEmpty])
|
|
1399 |
!
|
|
1400 |
|
|
1401 |
removeBookmark
|
|
1402 |
|
|
1403 |
|bookmarks directories|
|
|
1404 |
|
|
1405 |
bookmarks := self class directoryBookmarks.
|
|
1406 |
bookmarks isNil ifTrue:[ ^ self].
|
|
1407 |
directories := self getDirectoriesFromSelection.
|
|
1408 |
directories isEmpty ifTrue:[^ self].
|
|
1409 |
directories do:[:dir|
|
|
1410 |
bookmarks remove:dir ifAbsent:nil.
|
|
1411 |
].
|
|
1412 |
! !
|
|
1413 |
|
|
1414 |
!AbstractFileBrowser methodsFor:'actions history'!
|
|
1415 |
|
|
1416 |
addToCommandHistory:aCommandString for:aFilename
|
|
1417 |
|cmd suffix cmdHist|
|
|
1418 |
|
|
1419 |
cmdHist := self class commandHistory.
|
|
1420 |
(aCommandString notNil and:[aCommandString notEmpty]) ifTrue:[
|
|
1421 |
cmdHist notNil ifTrue:[
|
|
1422 |
cmdHist addFirst:aCommandString.
|
|
1423 |
cmdHist size > self class commandHistorySize ifTrue:[
|
|
1424 |
cmdHist removeLast
|
|
1425 |
]
|
|
1426 |
].
|
|
1427 |
aFilename notNil ifTrue:[
|
|
1428 |
cmd := aCommandString copyTo:(aCommandString indexOf:Character space ifAbsent:[aCommandString size + 1])-1.
|
|
1429 |
DefaultCommandPerSuffix isNil ifTrue:[
|
|
1430 |
DefaultCommandPerSuffix := Dictionary new.
|
|
1431 |
].
|
|
1432 |
suffix := aFilename asFilename suffix.
|
|
1433 |
suffix notNil ifTrue:[
|
|
1434 |
DefaultCommandPerSuffix at:suffix put:cmd.
|
|
1435 |
]
|
|
1436 |
]
|
|
1437 |
]
|
|
1438 |
!
|
|
1439 |
|
|
1440 |
doBack
|
|
1441 |
|
|
1442 |
| fileName |
|
|
1443 |
fileName := self dirHistory doBack.
|
|
1444 |
fileName notNil ifTrue:[
|
|
1445 |
self gotoFile:fileName.
|
|
1446 |
]
|
|
1447 |
!
|
|
1448 |
|
|
1449 |
doForward
|
|
1450 |
|
|
1451 |
| fileName |
|
|
1452 |
fileName := self dirHistory doForward.
|
|
1453 |
fileName notNil ifTrue:[
|
|
1454 |
self gotoFile:fileName.
|
|
1455 |
]
|
|
1456 |
! !
|
|
1457 |
|
|
1458 |
!AbstractFileBrowser methodsFor:'applications'!
|
|
1459 |
|
|
1460 |
application:aApplication do:aMethod
|
|
1461 |
|
|
1462 |
|appl|
|
|
1463 |
|
|
1464 |
appl := self applications at:aApplication ifAbsent:nil.
|
|
1465 |
appl notNil ifTrue:[
|
|
1466 |
^ appl perform:aMethod.
|
|
1467 |
].
|
|
1468 |
^ nil.
|
|
1469 |
!
|
|
1470 |
|
|
1471 |
application:aApplication do:aMethod withArg:arg
|
|
1472 |
|appl|
|
|
1473 |
|
|
1474 |
appl := self applications at:aApplication ifAbsent:nil.
|
|
1475 |
appl notNil ifTrue:[
|
|
1476 |
^ appl perform:aMethod with:arg
|
|
1477 |
].
|
|
1478 |
^ nil
|
|
1479 |
!
|
|
1480 |
|
|
1481 |
application:aApplication do:aMethod withArg:arg1 withArg:arg2
|
|
1482 |
|appl|
|
|
1483 |
|
|
1484 |
appl := self applications at:aApplication ifAbsent:nil.
|
|
1485 |
appl notNil ifTrue:[
|
|
1486 |
(arg1 notNil and:[arg2 notNil]) ifTrue:[
|
|
1487 |
^ appl perform:aMethod with:arg1 with:arg2
|
|
1488 |
]
|
|
1489 |
].
|
|
1490 |
^ nil
|
|
1491 |
! !
|
|
1492 |
|
|
1493 |
!AbstractFileBrowser methodsFor:'aspects'!
|
|
1494 |
|
|
1495 |
applications
|
|
1496 |
"returns the list of registered applications
|
|
1497 |
"
|
|
1498 |
^ aspects at:#applications
|
|
1499 |
!
|
|
1500 |
|
|
1501 |
backgroundProcesses
|
|
1502 |
|
|
1503 |
^ self aspectFor:#backgroundProcesses ifAbsent:[List new]
|
|
1504 |
!
|
|
1505 |
|
|
1506 |
browserFileList
|
|
1507 |
|
|
1508 |
^ self aspectFor:#browserFileList ifAbsent:[List new]
|
|
1509 |
!
|
|
1510 |
|
|
1511 |
currentDirectories
|
|
1512 |
|
|
1513 |
" returns a Ordered Collection of all directories currently selected
|
|
1514 |
if only a file is selected currentDirectories holds the directory of the file
|
|
1515 |
"
|
|
1516 |
|
|
1517 |
^ self aspectFor:#currentDirectories ifAbsent:[ (OrderedCollection new) asValue ].
|
|
1518 |
!
|
|
1519 |
|
|
1520 |
currentFileNameHolder
|
|
1521 |
|
|
1522 |
" returns a OrderedCollection of all files that are selected
|
|
1523 |
if no file but a directory is selected it contains the directories
|
|
1524 |
in contrast to currentDirectories wich have only the directories
|
|
1525 |
"
|
|
1526 |
|
|
1527 |
^ self aspectFor:#currentFileNameHolder ifAbsent:[(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) asValue]
|
|
1528 |
!
|
|
1529 |
|
|
1530 |
enableDirectoryUp
|
|
1531 |
|
|
1532 |
^ self aspectFor:#enableDirectoryUp ifAbsent:[false asValue]
|
|
1533 |
!
|
|
1534 |
|
|
1535 |
enableHome
|
|
1536 |
|
|
1537 |
^ self aspectFor:#enableHome ifAbsent:[ true asValue ].
|
|
1538 |
!
|
|
1539 |
|
|
1540 |
enableViewNoteBookApplication
|
|
1541 |
|
|
1542 |
^ self aspectFor:#enableViewNoteBookApplication ifAbsent:[false asValue]
|
|
1543 |
!
|
|
1544 |
|
|
1545 |
filterListModel
|
|
1546 |
|
|
1547 |
^ self aspectFor:#filterListModel ifAbsent:[self class defaultFilterList]
|
|
1548 |
!
|
|
1549 |
|
|
1550 |
filterModel
|
|
1551 |
|
|
1552 |
^ self aspectFor:#filterModel ifAbsent:[(self filterListModel at:1) asValue]
|
|
1553 |
!
|
|
1554 |
|
|
1555 |
hasSelection
|
|
1556 |
|
|
1557 |
^ self aspectFor:#hasSelection ifAbsent:[ false asValue ].
|
|
1558 |
!
|
|
1559 |
|
|
1560 |
notifyChannel
|
|
1561 |
|
|
1562 |
^ self aspectFor:#notifyChannel ifAbsent:['' asValue]
|
|
1563 |
!
|
|
1564 |
|
|
1565 |
selectionInFileList
|
|
1566 |
|
|
1567 |
^ self aspectFor:#selectionInFileList ifAbsent:[ OrderedCollection new asValue ]
|
|
1568 |
!
|
|
1569 |
|
|
1570 |
sortCaseless
|
|
1571 |
|
|
1572 |
^ self aspectFor:#sortCaseless ifAbsent:[
|
|
1573 |
| holder |
|
|
1574 |
holder := (Filename isCaseSensitive not) asValue.
|
|
1575 |
holder
|
|
1576 |
]
|
|
1577 |
!
|
|
1578 |
|
|
1579 |
treeSelectionHolder
|
|
1580 |
|
|
1581 |
^ self aspectFor:#treeSelectionHolder ifAbsent:[nil asValue]
|
|
1582 |
! !
|
|
1583 |
|
|
1584 |
!AbstractFileBrowser methodsFor:'aspects handling'!
|
|
1585 |
|
|
1586 |
aspectFor:something ifAbsent:aBlock
|
|
1587 |
"returns the model for an aspect
|
|
1588 |
"
|
|
1589 |
|holder saveAspectItem|
|
|
1590 |
|
|
1591 |
(holder := aspects at:something ifAbsent:nil) isNil ifTrue:[
|
|
1592 |
saveAspectItem := self settingsAspectValueFor:something.
|
|
1593 |
saveAspectItem isNil ifTrue:[
|
|
1594 |
saveAspectItem := self runtimeAspectValueFor:something.
|
|
1595 |
].
|
|
1596 |
saveAspectItem notNil ifTrue:[
|
|
1597 |
saveAspectItem isHolder ifTrue:[
|
|
1598 |
holder := ValueHolder with:saveAspectItem value
|
|
1599 |
] ifFalse:[
|
|
1600 |
holder := saveAspectItem value
|
|
1601 |
].
|
|
1602 |
] ifFalse:[
|
|
1603 |
holder := aBlock value.
|
|
1604 |
].
|
|
1605 |
holder notNil ifTrue:[
|
|
1606 |
aspects at:something put:holder
|
|
1607 |
]
|
|
1608 |
].
|
|
1609 |
^ holder
|
|
1610 |
!
|
|
1611 |
|
|
1612 |
aspects
|
|
1613 |
^ aspects
|
|
1614 |
!
|
|
1615 |
|
|
1616 |
runtimeAspectValueFor:something
|
|
1617 |
"returns the default aspect item from the class variable RuntimeAspects
|
|
1618 |
"
|
|
1619 |
^ self class runtimeAspects at:something ifAbsent:nil.
|
|
1620 |
!
|
|
1621 |
|
|
1622 |
saveRuntimeAspectValues
|
|
1623 |
|savedAspects dictionary value isHolder aspect|
|
|
1624 |
|
|
1625 |
savedAspects := self class listOfRuntimeValuesToRemark.
|
|
1626 |
dictionary := Dictionary new.
|
|
1627 |
savedAspects do:[ : aspectKey |
|
|
1628 |
aspect := self perform:aspectKey.
|
|
1629 |
isHolder := aspect isValueModel.
|
|
1630 |
isHolder ifTrue:[value:= aspect value] ifFalse:[ value := aspect].
|
|
1631 |
dictionary at:aspectKey
|
|
1632 |
put:(SaveAspectItem withValue:value isHolder:isHolder)
|
|
1633 |
].
|
|
1634 |
|
|
1635 |
RuntimeAspects := dictionary.
|
|
1636 |
!
|
|
1637 |
|
|
1638 |
saveSettingsAspectValues
|
|
1639 |
|savedAspects dictionary value isHolder aspect|
|
|
1640 |
|
|
1641 |
savedAspects := self class listOfSavedSettingsAspects.
|
|
1642 |
dictionary := Dictionary new.
|
|
1643 |
savedAspects do:[ : aspectKey |
|
|
1644 |
aspect := self perform:aspectKey.
|
|
1645 |
isHolder := aspect isValueModel.
|
|
1646 |
isHolder ifTrue:[value:= aspect value] ifFalse:[ value := aspect].
|
|
1647 |
dictionary at:aspectKey
|
|
1648 |
put:(SaveAspectItem withValue:value isHolder:isHolder)
|
|
1649 |
].
|
|
1650 |
|
|
1651 |
SettingsAspects := dictionary.
|
|
1652 |
!
|
|
1653 |
|
|
1654 |
settingsAspectValueFor:something
|
|
1655 |
"returns the default aspect from the class variable Aspects
|
|
1656 |
"
|
|
1657 |
^ self class settingsAspects at:something ifAbsent:nil.
|
|
1658 |
! !
|
|
1659 |
|
|
1660 |
!AbstractFileBrowser methodsFor:'aspects-history'!
|
|
1661 |
|
|
1662 |
dirHistory
|
|
1663 |
|
|
1664 |
^ self aspectFor:#dirHistory ifAbsent:[DirectoryHistory new]
|
|
1665 |
!
|
|
1666 |
|
|
1667 |
enableBack
|
|
1668 |
|
|
1669 |
^ self aspectFor:#enableBack ifAbsent:[false asValue]
|
|
1670 |
!
|
|
1671 |
|
|
1672 |
enableFileHistory
|
|
1673 |
|
|
1674 |
^ self aspectFor:#enableFileHistory ifAbsent:[false asValue]
|
|
1675 |
!
|
|
1676 |
|
|
1677 |
enableForward
|
|
1678 |
|
|
1679 |
^ self aspectFor:#enableForward ifAbsent:[false asValue]
|
|
1680 |
!
|
|
1681 |
|
|
1682 |
fileHistory
|
|
1683 |
|
|
1684 |
^ self aspectFor:#fileHistory ifAbsent:[FilenameHistory new]
|
|
1685 |
! !
|
|
1686 |
|
|
1687 |
!AbstractFileBrowser methodsFor:'aspects-visibility'!
|
|
1688 |
|
|
1689 |
filenameEntryFieldVisibleHolder
|
|
1690 |
|
|
1691 |
^ self aspectFor:#filenameEntryFieldVisibleHolder ifAbsent:[true asValue]
|
|
1692 |
!
|
|
1693 |
|
|
1694 |
openMultipleApplicationsForType
|
|
1695 |
|
|
1696 |
^ self aspectFor:#openMultipleApplicationsForType ifAbsent:[ false asValue ].
|
|
1697 |
!
|
|
1698 |
|
|
1699 |
showDirectoryTreeHolder
|
|
1700 |
|
|
1701 |
| |
|
|
1702 |
|
|
1703 |
^ self aspectFor:#showDirectoryTreeHolder ifAbsent:[ true asValue ]
|
|
1704 |
!
|
|
1705 |
|
|
1706 |
showHiddenFiles
|
|
1707 |
|
|
1708 |
^ self aspectFor:#showHiddenFiles ifAbsent:[ true asValue ].
|
|
1709 |
!
|
|
1710 |
|
|
1711 |
sortBlockHolder
|
|
1712 |
|
|
1713 |
^ self aspectFor:#sortBlockHolder ifAbsent:[ #baseName asValue ].
|
|
1714 |
!
|
|
1715 |
|
|
1716 |
toolBarVisibleHolder
|
|
1717 |
|
|
1718 |
^ self aspectFor:#toolBarVisibleHolder ifAbsent:[true asValue]
|
|
1719 |
!
|
|
1720 |
|
|
1721 |
viewDescription
|
|
1722 |
|
|
1723 |
^ self aspectFor:#viewDescription ifAbsent:[ false asValue ].
|
|
1724 |
!
|
|
1725 |
|
|
1726 |
viewDetails
|
|
1727 |
|
|
1728 |
^ self aspectFor:#viewDetails ifAbsent:[ false asValue ].
|
|
1729 |
!
|
|
1730 |
|
|
1731 |
viewDirectoriesInDirectoryContentsBrowser
|
|
1732 |
|
|
1733 |
^ self aspectFor:#viewDirectoriesInDirectoryContentsBrowser ifAbsent:[ false asValue ].
|
|
1734 |
!
|
|
1735 |
|
|
1736 |
viewDirectoryDescription
|
|
1737 |
|
|
1738 |
^ self aspectFor:#viewDirectoryDescription ifAbsent:[ true asValue ].
|
|
1739 |
!
|
|
1740 |
|
|
1741 |
viewFilesInDirectoryTree
|
|
1742 |
|
|
1743 |
^ self aspectFor:#viewFilesInDirectoryTree ifAbsent:[ false asValue ].
|
|
1744 |
!
|
|
1745 |
|
|
1746 |
viewGroup
|
|
1747 |
|
|
1748 |
^ self aspectFor:#viewGroup ifAbsent:[ false asValue ].
|
|
1749 |
!
|
|
1750 |
|
|
1751 |
viewNoteBookApplicationHolder
|
|
1752 |
|
|
1753 |
^ self aspectFor:#viewNoteBookApplicationHolder ifAbsent:[ false asValue].
|
|
1754 |
!
|
|
1755 |
|
|
1756 |
viewOwner
|
|
1757 |
|
|
1758 |
^ self aspectFor:#viewOwner ifAbsent:[ false asValue ].
|
|
1759 |
!
|
|
1760 |
|
|
1761 |
viewPermissions
|
|
1762 |
|
|
1763 |
^ self aspectFor:#viewPermissions ifAbsent:[ false asValue ].
|
|
1764 |
!
|
|
1765 |
|
|
1766 |
viewPreview
|
|
1767 |
|
|
1768 |
^ self aspectFor:#viewPreview ifAbsent:[ false asValue ].
|
|
1769 |
!
|
|
1770 |
|
|
1771 |
viewSize
|
|
1772 |
|
|
1773 |
^ self aspectFor:#viewSize ifAbsent:[ false asValue ].
|
|
1774 |
!
|
|
1775 |
|
|
1776 |
viewTime
|
|
1777 |
|
|
1778 |
^ self aspectFor:#viewTime ifAbsent:[ false asValue ].
|
|
1779 |
!
|
|
1780 |
|
|
1781 |
viewType
|
|
1782 |
|
|
1783 |
^ self aspectFor:#viewType ifAbsent:[ false asValue ].
|
|
1784 |
! !
|
|
1785 |
|
|
1786 |
!AbstractFileBrowser methodsFor:'background processing'!
|
|
1787 |
|
|
1788 |
executeCommand:cmd
|
|
1789 |
|
|
1790 |
self executeCommand:cmd inDirectory:nil
|
|
1791 |
!
|
|
1792 |
|
|
1793 |
executeCommand:cmd inDirectory:aDir
|
|
1794 |
|
|
1795 |
| nameString executionBlock|
|
|
1796 |
|
|
1797 |
executionBlock := self getExecutionBlockForCommand:cmd inDirectory:aDir.
|
|
1798 |
nameString := 'Command> ', cmd.
|
|
1799 |
self makeExecutionResultProcessFor:executionBlock withName:nameString.
|
|
1800 |
!
|
|
1801 |
|
|
1802 |
getExecutionBlockForCommand:cmd
|
|
1803 |
|
|
1804 |
^ self getExecutionBlockForCommand:cmd inDirectory:nil
|
|
1805 |
!
|
|
1806 |
|
|
1807 |
getExecutionBlockForCommand:cmd inDirectory:aDir
|
|
1808 |
|
|
1809 |
| dir dirs|
|
|
1810 |
|
|
1811 |
dir := aDir.
|
|
1812 |
aDir isNil ifTrue:[
|
|
1813 |
dirs := self getDirectoriesFromSelection.
|
|
1814 |
dirs size ~= 1 ifTrue:[ ^ self].
|
|
1815 |
dir := dirs anElement.
|
|
1816 |
].
|
|
1817 |
^ [:stream| stream notNil ifTrue:[
|
|
1818 |
OperatingSystem
|
|
1819 |
executeCommand:cmd
|
|
1820 |
inputFrom:nil
|
|
1821 |
outputTo:stream
|
|
1822 |
errorTo:stream
|
|
1823 |
inDirectory:dir
|
|
1824 |
onError:[:status| false].
|
|
1825 |
]
|
|
1826 |
].
|
|
1827 |
!
|
|
1828 |
|
|
1829 |
killAllRunningBackgroundProcesses
|
|
1830 |
|
|
1831 |
self backgroundProcesses do:[ : process |
|
|
1832 |
self notifyChannel value:'kill ', process name.
|
|
1833 |
process terminate.
|
|
1834 |
].
|
|
1835 |
!
|
|
1836 |
|
|
1837 |
makeExecutionResultProcessFor:aBlock withName:aString
|
|
1838 |
| stream process appl nameString|
|
|
1839 |
|
|
1840 |
appl := self openCommandResultApplication.
|
|
1841 |
stream := appl resultStream.
|
|
1842 |
nameString := aString ? 'Execution Result'.
|
|
1843 |
appl changeTabTo:nameString.
|
|
1844 |
process := [ [aBlock value:stream] valueNowOrOnUnwindDo:[
|
|
1845 |
self backgroundProcesses remove:process ifAbsent:[].
|
|
1846 |
appl process value:nil.
|
|
1847 |
]] newProcess.
|
|
1848 |
process priority:(Processor userBackgroundPriority).
|
|
1849 |
process name:nameString.
|
|
1850 |
self backgroundProcesses add:process.
|
|
1851 |
appl process value:process.
|
|
1852 |
process resume.
|
|
1853 |
! !
|
|
1854 |
|
|
1855 |
!AbstractFileBrowser methodsFor:'change & update'!
|
|
1856 |
|
|
1857 |
update:something with:aParameter from:changedObject
|
|
1858 |
|
|
1859 |
" do here all the things that have to be done for every part of the FileBrowserV2
|
|
1860 |
and the things that have to be done if it runs standalone "
|
|
1861 |
|
|
1862 |
| newDirectories oldDirectories size|
|
|
1863 |
|
|
1864 |
changedObject == self currentFileNameHolder ifTrue:[
|
|
1865 |
newDirectories := self getDirectoriesForFileList:(changedObject value).
|
|
1866 |
oldDirectories := self currentDirectories value.
|
|
1867 |
oldDirectories ~= newDirectories ifTrue:[
|
|
1868 |
self currentDirectories value:newDirectories.
|
|
1869 |
size := newDirectories size.
|
|
1870 |
newDirectories notEmpty ifTrue:[
|
|
1871 |
self enableDirectoryUp value:(((size == 1) and:[newDirectories first isRootDirectory not])).
|
|
1872 |
newDirectories do:[: dir |
|
|
1873 |
self dirHistory addFile:dir.
|
|
1874 |
].
|
|
1875 |
self enableForward value:self dirHistory canForward.
|
|
1876 |
self enableBack value:self dirHistory canBack.
|
|
1877 |
]
|
|
1878 |
].
|
|
1879 |
^ self
|
|
1880 |
].
|
|
1881 |
changedObject == self filterModel ifTrue:[
|
|
1882 |
(self filterModel value = '') ifTrue:[
|
|
1883 |
self filterModel value:'*'.
|
|
1884 |
].
|
|
1885 |
^ self
|
|
1886 |
].
|
|
1887 |
super update:something with:aParameter from:changedObject
|
|
1888 |
! !
|
|
1889 |
|
|
1890 |
!AbstractFileBrowser methodsFor:'clipboard'!
|
|
1891 |
|
|
1892 |
canPaste
|
|
1893 |
|
|
1894 |
^ self aspectFor:#canPaste ifAbsent:[ false asValue ].
|
|
1895 |
!
|
|
1896 |
|
|
1897 |
clipboard
|
|
1898 |
|
|
1899 |
^ self aspectFor:#clipboard ifAbsent:[Clipboard new]
|
|
1900 |
!
|
|
1901 |
|
|
1902 |
copyFilesToClipBoard:colOfFiles
|
|
1903 |
"defete current selected files/directories
|
|
1904 |
"
|
|
1905 |
self putInClipBoard:colOfFiles as:#copy.
|
|
1906 |
!
|
|
1907 |
|
|
1908 |
cutFilesToClipBoard:colOfFiles
|
|
1909 |
"defete current selected files/directories
|
|
1910 |
"
|
|
1911 |
self putInClipBoard:colOfFiles as:#cut.
|
|
1912 |
!
|
|
1913 |
|
|
1914 |
emptyClipBoard
|
|
1915 |
|
|
1916 |
self clipboard files:nil.
|
|
1917 |
self canPaste value:false.
|
|
1918 |
!
|
|
1919 |
|
|
1920 |
putInClipBoard:colOfFiles as:aSymbol
|
|
1921 |
|
|
1922 |
| stream clp|
|
|
1923 |
|
|
1924 |
colOfFiles isEmpty ifTrue:[ ^ self].
|
|
1925 |
clp := self clipboard.
|
|
1926 |
clp files:nil.
|
|
1927 |
clp method:aSymbol.
|
|
1928 |
stream := WriteStream on:''.
|
|
1929 |
stream nextPutAll:aSymbol asString.
|
|
1930 |
stream nextPutAll:' <'.
|
|
1931 |
stream nextPutAll:colOfFiles first asString.
|
|
1932 |
colOfFiles size > 1 ifTrue:[
|
|
1933 |
stream nextPutAll:' ...'.
|
|
1934 |
].
|
|
1935 |
stream nextPutAll:'> to clipboard'.
|
|
1936 |
|
|
1937 |
self notifyChannel value:stream contents.
|
|
1938 |
stream close.
|
|
1939 |
clp files:colOfFiles.
|
|
1940 |
self canPaste value:true.
|
|
1941 |
! !
|
|
1942 |
|
|
1943 |
!AbstractFileBrowser methodsFor:'drag & drop'!
|
|
1944 |
|
|
1945 |
canDropArchiv:dropedObjects for:filename
|
|
1946 |
|
|
1947 |
(filename isDirectory
|
|
1948 |
and:[filename isWritable and:[dropedObjects notEmpty]]) ifTrue:[
|
|
1949 |
^ true
|
|
1950 |
].
|
|
1951 |
^ false
|
|
1952 |
!
|
|
1953 |
|
|
1954 |
canDropFiles:dropedObjects for:filename
|
|
1955 |
| checkObject filenameDirString checkObjectString filenameDir|
|
|
1956 |
|
|
1957 |
dropedObjects isEmpty ifTrue:[^ false].
|
|
1958 |
filenameDir := self getDirWithoutFileName:filename.
|
|
1959 |
filenameDir isWritable not ifTrue:[^ false].
|
|
1960 |
filenameDirString := filenameDir asString.
|
|
1961 |
dropedObjects do:[:aObject |
|
|
1962 |
checkObject := aObject theObject.
|
|
1963 |
checkObject isFilename not ifTrue:[^ false].
|
|
1964 |
checkObject asFilename exists not ifTrue:[^ false].
|
|
1965 |
checkObjectString := checkObject asString.
|
|
1966 |
checkObject isDirectory ifTrue:[
|
|
1967 |
(self fileName:filenameDirString startsWith:checkObjectString) ifTrue:[
|
|
1968 |
" can not drop a directory in his parents "
|
|
1969 |
^ false
|
|
1970 |
]
|
|
1971 |
] ifFalse:[
|
|
1972 |
(filenameDirString = checkObject directory asString
|
|
1973 |
or:[ filenameDirString = checkObject physicalPathName asFilename directory asString ]) ifTrue:[
|
|
1974 |
" can not drop a file in same directory "
|
|
1975 |
^ false
|
|
1976 |
]
|
|
1977 |
]
|
|
1978 |
].
|
|
1979 |
^ true
|
|
1980 |
!
|
|
1981 |
|
|
1982 |
doStartDrag:aDropSource in:aView
|
|
1983 |
"set the cursors before starting the drag & drop operation
|
|
1984 |
"
|
|
1985 |
|hdl|
|
|
1986 |
|
|
1987 |
|
|
1988 |
hdl := DragAndDropManager new.
|
|
1989 |
|
|
1990 |
hdl disabledCursor:self class DisabledCursorImage.
|
|
1991 |
hdl enabledCursor:self class EnabledCursorImage.
|
|
1992 |
hdl alienCursor:nil.
|
|
1993 |
|
|
1994 |
hdl startDragFrom:aView dropSource:aDropSource offset:#topLeft
|
|
1995 |
! !
|
|
1996 |
|
|
1997 |
!AbstractFileBrowser methodsFor:'file operations'!
|
|
1998 |
|
|
1999 |
copyFile:aSourceFile to:aDestFile
|
|
2000 |
"copy to
|
|
2001 |
"
|
|
2002 |
|copy|
|
|
2003 |
|
|
2004 |
copy := FileOperation copy copyFile:aSourceFile to:aDestFile withOverWriteWarning:true copyFileIfSame:true.
|
|
2005 |
copy result ifTrue:[
|
|
2006 |
self notifyChannel value:('copy ', aSourceFile baseName, ' to:,', aDestFile baseName).
|
|
2007 |
] ifFalse:[
|
|
2008 |
self notifyChannel value:copy errorString.
|
|
2009 |
].
|
|
2010 |
^ copy result
|
|
2011 |
!
|
|
2012 |
|
|
2013 |
copyFiles:aColOfSourceFiles to:aDirectory
|
|
2014 |
"copy aColOfSourceFiles to aDirectory
|
|
2015 |
"
|
|
2016 |
|copy|
|
|
2017 |
|
|
2018 |
copy := FileOperation copy copyFiles:aColOfSourceFiles to:aDirectory.
|
|
2019 |
copy result ifFalse:[
|
|
2020 |
self notifyChannel value:copy errorString.
|
|
2021 |
].
|
|
2022 |
self updateCurrentDirectory.
|
|
2023 |
^ copy colOfCopiedFiles
|
|
2024 |
!
|
|
2025 |
|
|
2026 |
copyOrMoveDialog:aCol
|
|
2027 |
|
|
2028 |
| size stream dialog|
|
|
2029 |
|
|
2030 |
size := aCol size.
|
|
2031 |
stream := WriteStream on:''.
|
|
2032 |
stream nextPutAll:'copy or move file'.
|
|
2033 |
size == 1 ifFalse:[
|
|
2034 |
stream nextPutAll:'s'.
|
|
2035 |
].
|
|
2036 |
stream nextPutAll:': '.
|
|
2037 |
stream nextPutAll:aCol first baseName asString.
|
|
2038 |
size == 1 ifFalse:[
|
|
2039 |
stream nextPutAll:' ... '.
|
|
2040 |
stream nextPutAll:aCol last baseName asString.
|
|
2041 |
].
|
|
2042 |
|
|
2043 |
dialog := OptionBox
|
|
2044 |
request:stream contents
|
|
2045 |
label:'move or copy'
|
|
2046 |
form:(WarningBox iconBitmap)
|
|
2047 |
buttonLabels:#('cancel' 'move' 'copy')
|
|
2048 |
values:#(#cancel #move #copy)
|
|
2049 |
default:#copy.
|
|
2050 |
dialog isNil ifTrue:[dialog := #cancel].
|
|
2051 |
^ dialog.
|
|
2052 |
!
|
|
2053 |
|
|
2054 |
copyOrMoveFiles:aColOfSourceFiles to:aDirectory
|
|
2055 |
"copy aColOfSourceFiles to aDirectory
|
|
2056 |
"
|
|
2057 |
|dialog|
|
|
2058 |
|
|
2059 |
dialog := self copyOrMoveDialog:aColOfSourceFiles.
|
|
2060 |
dialog == #copy ifTrue:[
|
|
2061 |
self copyFiles:aColOfSourceFiles to:aDirectory.
|
|
2062 |
^ self.
|
|
2063 |
].
|
|
2064 |
dialog == #move ifTrue:[
|
|
2065 |
self moveFiles:aColOfSourceFiles to:aDirectory.
|
|
2066 |
^ self.
|
|
2067 |
].
|
|
2068 |
!
|
|
2069 |
|
|
2070 |
deleteFile:aFile
|
|
2071 |
"delete current selected files/directories
|
|
2072 |
"
|
|
2073 |
|
|
2074 |
^ self deleteFiles:(OrderedCollection with:aFile).
|
|
2075 |
!
|
|
2076 |
|
|
2077 |
deleteFiles:colOfFiles
|
|
2078 |
"delete current selected files/directories
|
|
2079 |
"
|
|
2080 |
|delete|
|
|
2081 |
|
|
2082 |
delete := FileOperation delete deleteFiles:colOfFiles.
|
|
2083 |
delete result ifFalse:[
|
|
2084 |
self notifyChannel value:delete errorString.
|
|
2085 |
].
|
|
2086 |
self updateCurrentDirectory.
|
|
2087 |
^ delete result.
|
|
2088 |
!
|
|
2089 |
|
|
2090 |
moveFile:aSourceFile to:aDestFile
|
|
2091 |
"defete current selected files/directories
|
|
2092 |
"
|
|
2093 |
|
|
2094 |
|move|
|
|
2095 |
|
|
2096 |
move := FileOperation move moveFile:aSourceFile to:aDestFile.
|
|
2097 |
move result ifTrue:[
|
|
2098 |
self notifyChannel value:('move ', aSourceFile asString, ' to ', aDestFile asString).
|
|
2099 |
] ifFalse:[
|
|
2100 |
self notifyChannel value:move errorString.
|
|
2101 |
].
|
|
2102 |
self updateCurrentDirectory.
|
|
2103 |
^ move result
|
|
2104 |
!
|
|
2105 |
|
|
2106 |
moveFiles:aColOfSourceFiles to:aDirectory
|
|
2107 |
"move aColOfSourceFiles to aDirectory
|
|
2108 |
"
|
|
2109 |
|move|
|
|
2110 |
|
|
2111 |
move := FileOperation move moveFiles:aColOfSourceFiles to:aDirectory.
|
|
2112 |
move result ifFalse:[
|
|
2113 |
self notifyChannel value:move errorString.
|
|
2114 |
].
|
|
2115 |
self updateCurrentDirectory.
|
|
2116 |
^ move colOfMovedFiles
|
|
2117 |
!
|
|
2118 |
|
|
2119 |
newDirectory
|
|
2120 |
"ask for and create a new directory"
|
|
2121 |
|
|
2122 |
| directories directory create newFile|
|
|
2123 |
|
|
2124 |
directories := self currentDirectories value.
|
|
2125 |
(directories size ~= 1) ifTrue:[^ self].
|
|
2126 |
directory := directories first.
|
|
2127 |
create := FileOperation create createDirectoryIn:directory.
|
|
2128 |
create result ifFalse:[ ^ self].
|
|
2129 |
newFile := create createdFile.
|
|
2130 |
newFile notNil ifTrue:[
|
|
2131 |
self updateAndSelect:(OrderedCollection with:newFile).
|
|
2132 |
]
|
|
2133 |
!
|
|
2134 |
|
|
2135 |
newFile
|
|
2136 |
"ask for and create a new file"
|
|
2137 |
|
|
2138 |
| curFile directories directory create file|
|
|
2139 |
|
|
2140 |
directories := self currentDirectories value.
|
|
2141 |
(directories size ~= 1) ifTrue:[^ self].
|
|
2142 |
directory := directories first.
|
|
2143 |
curFile := self getFirstFileFromSelection.
|
|
2144 |
curFile notNil ifTrue:[
|
|
2145 |
file := curFile.
|
|
2146 |
] ifFalse:[
|
|
2147 |
file := directory.
|
|
2148 |
].
|
|
2149 |
create := FileOperation create createFileIn:file.
|
|
2150 |
create result ifFalse:[ ^ self].
|
|
2151 |
self updateAndSelect:(OrderedCollection with:(create createdFile)).
|
|
2152 |
!
|
|
2153 |
|
|
2154 |
newHardLink
|
|
2155 |
"ask for and create a hard link (unix only)"
|
|
2156 |
|
|
2157 |
self newLink:false.
|
|
2158 |
!
|
|
2159 |
|
|
2160 |
newLink:symbolic
|
|
2161 |
|
|
2162 |
"ask for and create a symbolic if symbolic is true otherwise a hard link (unix only)"
|
|
2163 |
|
|
2164 |
| sel create createdFile|
|
|
2165 |
|
|
2166 |
sel := self currentFileNameHolder value.
|
|
2167 |
(sel size ~= 1) ifTrue:[^ self].
|
|
2168 |
symbolic ifTrue:[
|
|
2169 |
create := FileOperation create createSoftLinkIn:(sel first).
|
|
2170 |
] ifFalse:[
|
|
2171 |
create := FileOperation create createHardLinkIn:(sel first).
|
|
2172 |
].
|
|
2173 |
create result ifFalse:[ ^ self].
|
|
2174 |
createdFile := create createdFile.
|
|
2175 |
createdFile notNil ifTrue:[
|
|
2176 |
self updateAndSelect:(OrderedCollection with:createdFile).
|
|
2177 |
].
|
|
2178 |
!
|
|
2179 |
|
|
2180 |
newSoftLink
|
|
2181 |
"ask for and create a soft link (unix only)"
|
|
2182 |
|
|
2183 |
self newLink:true.
|
|
2184 |
!
|
|
2185 |
|
|
2186 |
pasteFiles
|
|
2187 |
"defete current selected files/directories
|
|
2188 |
"
|
|
2189 |
| buffer destination files directories copiedFiles|
|
|
2190 |
|
|
2191 |
files := self clipboard files.
|
|
2192 |
(files isNil or:[files isEmpty]) ifTrue:[ ^ self ].
|
|
2193 |
buffer := self clipboard copy.
|
|
2194 |
directories := self getDirectoriesFromSelection.
|
|
2195 |
directories isEmpty ifTrue:[
|
|
2196 |
|box dirStringCol|
|
|
2197 |
dirStringCol := directories collect:[:aDir| aDir asString].
|
|
2198 |
box := ListSelectionBox new.
|
|
2199 |
box title:'In which directory you want to paste ?'.
|
|
2200 |
box list:dirStringCol.
|
|
2201 |
box okAction:[:sel | destination := sel asFilename].
|
|
2202 |
box showAtPointer
|
|
2203 |
] ifFalse:[
|
|
2204 |
destination := directories first.
|
|
2205 |
].
|
|
2206 |
copiedFiles := self copyFiles:(buffer files) to:destination.
|
|
2207 |
|
|
2208 |
(self clipboard method == #cut) ifTrue:[
|
|
2209 |
self deleteFiles:copiedFiles.
|
|
2210 |
]
|
|
2211 |
!
|
|
2212 |
|
|
2213 |
renameFile:aFile
|
|
2214 |
"rename the selected file(s)"
|
|
2215 |
|
|
2216 |
^ self renameFiles:(OrderedCollection with:aFile).
|
|
2217 |
!
|
|
2218 |
|
|
2219 |
renameFile:filename to:newFileString update:aBoolean
|
|
2220 |
"rename filename to newFileString"
|
|
2221 |
|
|
2222 |
|rename|
|
|
2223 |
|
|
2224 |
rename := FileOperation rename renameFile:filename to:newFileString.
|
|
2225 |
rename result ifTrue:[
|
|
2226 |
aBoolean ifTrue:[
|
|
2227 |
self updateAndSelect:(rename renamedFiles).
|
|
2228 |
].
|
|
2229 |
] ifFalse:[
|
|
2230 |
self notifyChannel value:rename errorString.
|
|
2231 |
].
|
|
2232 |
^ rename result
|
|
2233 |
!
|
|
2234 |
|
|
2235 |
renameFiles:aColOfFiles
|
|
2236 |
"rename the selected file(s)"
|
|
2237 |
|
|
2238 |
|rename|
|
|
2239 |
|
|
2240 |
rename := FileOperation rename renameFiles:aColOfFiles.
|
|
2241 |
rename result ifFalse:[
|
|
2242 |
self notifyChannel value:rename errorString
|
|
2243 |
] ifTrue:[
|
|
2244 |
self updateAndSelect:(rename renamedFiles)
|
|
2245 |
].
|
|
2246 |
^ rename result
|
|
2247 |
!
|
|
2248 |
|
|
2249 |
renameSelection
|
|
2250 |
"rename the selected file(s)"
|
|
2251 |
|
|
2252 |
|rename|
|
|
2253 |
|
|
2254 |
rename := FileOperation rename renameFiles:self currentFileNameHolder value.
|
|
2255 |
rename result ifFalse:[
|
|
2256 |
self notifyChannel value:rename errorString
|
|
2257 |
] ifTrue:[
|
|
2258 |
self updateAndSelect:(rename renamedFiles)
|
|
2259 |
].
|
|
2260 |
^ rename result
|
|
2261 |
! !
|
|
2262 |
|
|
2263 |
!AbstractFileBrowser methodsFor:'font encoding'!
|
|
2264 |
|
|
2265 |
fileEncoding
|
|
2266 |
"open a dialog to allow change of the files character encoding.
|
|
2267 |
Files are converted to internal encoding when read, and converted back
|
|
2268 |
to this encoding when saved.
|
|
2269 |
The default encoding is nil, which means that files are already in
|
|
2270 |
the internal encoding (which is iso8859).
|
|
2271 |
Notice: currently, not too many encodings are supported by the system."
|
|
2272 |
|
|
2273 |
|dialog list descr encodings encodingNames idx|
|
|
2274 |
|
|
2275 |
list := SelectionInList new.
|
|
2276 |
|
|
2277 |
descr := CharacterArray supportedExternalEncodings.
|
|
2278 |
encodings := descr at:2.
|
|
2279 |
encodingNames := descr at:1.
|
|
2280 |
|
|
2281 |
list list:encodingNames.
|
|
2282 |
list selectionIndex:(encodings indexOf:(self fileEncodingHolder value) ifAbsent:1).
|
|
2283 |
dialog := Dialog new.
|
|
2284 |
|
|
2285 |
dialog addTextLabel:('Specify the files encoding.\\The default (a 1-to-1 encoding) works for 7bit ascii\and iso8859 (= ANSI) encoded text files.\') withCRs.
|
|
2286 |
dialog addVerticalSpace.
|
|
2287 |
dialog addListBoxOn:list withNumberOfLines:5.
|
|
2288 |
|
|
2289 |
dialog addAbortAndOkButtons.
|
|
2290 |
dialog open.
|
|
2291 |
|
|
2292 |
dialog accepted ifTrue:[
|
|
2293 |
idx := list selectionIndex.
|
|
2294 |
self fileEncodingHolder value:(encodings at:idx).
|
|
2295 |
"/ subView externalEncoding:fileEncoding.
|
|
2296 |
|
|
2297 |
self validateFontEncodingFor:(encodings at:idx) ask:true.
|
|
2298 |
].
|
|
2299 |
!
|
|
2300 |
|
|
2301 |
fileEncodingHolder
|
|
2302 |
"return/create the 'fileEncodingModel' value holder (automatically generated)"
|
|
2303 |
|
|
2304 |
^ self aspectFor:#fileEncodingHolder ifAbsent:[ValueHolder new]
|
|
2305 |
!
|
|
2306 |
|
|
2307 |
preferredFontEncodingFor:fileEncoding
|
|
2308 |
"given a file encoding, return corresponding preferred fontEncoding
|
|
2309 |
match pattern"
|
|
2310 |
|
|
2311 |
|fe|
|
|
2312 |
|
|
2313 |
fe := MIMETypes fontForCharset:fileEncoding.
|
|
2314 |
fe notNil ifTrue:[^ fe].
|
|
2315 |
^ 'iso8859*'
|
|
2316 |
!
|
|
2317 |
|
|
2318 |
validateFontEncodingFor:newEncoding ask:ask
|
|
2319 |
"if required, query user if he/she wants to change to another font,
|
|
2320 |
which is able to display text encoded as specified by newEncoding"
|
|
2321 |
|
|
2322 |
|fontsEncoding msg filter f defaultFont pref|
|
|
2323 |
|
|
2324 |
"/ PENK fontsEncoding := subView font encoding.
|
|
2325 |
|
|
2326 |
pref := self preferredFontEncodingFor:newEncoding.
|
|
2327 |
|
|
2328 |
(pref match:fontsEncoding) ifTrue:[
|
|
2329 |
^ self
|
|
2330 |
].
|
|
2331 |
"/ stupid ...
|
|
2332 |
pref = 'ascii*' ifTrue:[
|
|
2333 |
(fontsEncoding match:'iso8859*') ifTrue:[
|
|
2334 |
^ self
|
|
2335 |
]
|
|
2336 |
].
|
|
2337 |
|
|
2338 |
filter := [:f | |coding|
|
|
2339 |
(coding := f encoding) notNil
|
|
2340 |
and:[pref match:coding]].
|
|
2341 |
|
|
2342 |
defaultFont := TextView defaultFont onDevice:device.
|
|
2343 |
(pref match:(defaultFont encoding)) ifFalse:[
|
|
2344 |
defaultFont := nil.
|
|
2345 |
].
|
|
2346 |
|
|
2347 |
defaultFont isNil ifTrue:[
|
|
2348 |
(pref = 'ascii*'
|
|
2349 |
or:[pref = 'iso8859*']) ifTrue:[
|
|
2350 |
defaultFont := FontDescription family:'courier' face:'medium' style:'roman' size:12
|
|
2351 |
]
|
|
2352 |
].
|
|
2353 |
|
|
2354 |
defaultFont isNil ifTrue:[
|
|
2355 |
defaultFont := device
|
|
2356 |
listOfAvailableFonts
|
|
2357 |
detect:[:f | filter value:f]
|
|
2358 |
ifNone:nil.
|
|
2359 |
defaultFont isNil ifTrue:[
|
|
2360 |
|
|
2361 |
"/ flush list, and refetch font list
|
|
2362 |
"/ (in case someone just changed the font path ...)
|
|
2363 |
|
|
2364 |
device flushListOfAvailableFonts.
|
|
2365 |
defaultFont := device
|
|
2366 |
listOfAvailableFonts
|
|
2367 |
detect:[:f | filter value:f]
|
|
2368 |
ifNone:nil.
|
|
2369 |
].
|
|
2370 |
|
|
2371 |
defaultFont isNil ifTrue:[
|
|
2372 |
Dialog warn:'your display does not seem to provide any ' , newEncoding , '-encoded font.'.
|
|
2373 |
^ self.
|
|
2374 |
]
|
|
2375 |
].
|
|
2376 |
|
|
2377 |
msg := 'switch to a %1 encoded font ?'.
|
|
2378 |
(ask not or:[self confirm:(resources string:msg with:pref) withCRs])
|
|
2379 |
ifTrue:[
|
|
2380 |
self withWaitCursorDo:[
|
|
2381 |
f := FontPanel
|
|
2382 |
fontFromUserInitial:defaultFont
|
|
2383 |
title:(resources string:'font selection')
|
|
2384 |
filter:filter.
|
|
2385 |
f notNil ifTrue:[
|
|
2386 |
"/ PENK subView font:f
|
|
2387 |
]
|
|
2388 |
]
|
|
2389 |
]
|
|
2390 |
! !
|
|
2391 |
|
|
2392 |
!AbstractFileBrowser methodsFor:'menu'!
|
|
2393 |
|
|
2394 |
menuDirHistory:backOrForward
|
|
2395 |
"initialize the directory menu
|
|
2396 |
"
|
|
2397 |
<resource: #programMenu >
|
|
2398 |
|
|
2399 |
|menu histCopy index text removeItem directories dir|
|
|
2400 |
|
|
2401 |
menu := Menu new.
|
|
2402 |
menu receiver:self.
|
|
2403 |
|
|
2404 |
directories := self getDirectoriesFromSelection.
|
|
2405 |
directories isEmpty ifTrue:[^ nil].
|
|
2406 |
|
|
2407 |
dir := directories first.
|
|
2408 |
self dirHistory isEmpty ifTrue:[^ nil].
|
|
2409 |
index := self dirHistory indexOf:dir.
|
|
2410 |
index = 0 ifTrue:[^ nil].
|
|
2411 |
text := LabelAndIcon icon:(self class clearHistoryIcon) string:'Clear History'.
|
|
2412 |
backOrForward == #back ifTrue:[
|
|
2413 |
histCopy := self dirHistory copyTo:index - 1.
|
|
2414 |
removeItem := MenuItem label:text value:[
|
|
2415 |
self dirHistory removeBack.
|
|
2416 |
self enableBack value:self dirHistory canBack.
|
|
2417 |
].
|
|
2418 |
] ifFalse:[
|
|
2419 |
histCopy := self dirHistory copyFrom:index + 1.
|
|
2420 |
removeItem := MenuItem label:text value:[
|
|
2421 |
self dirHistory removeForward.
|
|
2422 |
self enableForward value:self dirHistory canForward.
|
|
2423 |
].
|
|
2424 |
].
|
|
2425 |
histCopy do:[:aFile|
|
|
2426 |
menu addItem:(MenuItem label:aFile asString value:[
|
|
2427 |
self dirHistory setIndexTo:aFile.
|
|
2428 |
self currentFileNameHolder value:(OrderedCollection with:aFile).
|
|
2429 |
]).
|
|
2430 |
].
|
|
2431 |
menu addItem:(MenuItem label:'-').
|
|
2432 |
menu addItem:removeItem.
|
|
2433 |
^ menu
|
|
2434 |
!
|
|
2435 |
|
|
2436 |
menuDirHistoryBack
|
|
2437 |
"initialize the directory menu
|
|
2438 |
"
|
|
2439 |
<resource: #programMenu >
|
|
2440 |
|
|
2441 |
^ self menuDirHistory:#back.
|
|
2442 |
!
|
|
2443 |
|
|
2444 |
menuDirHistoryForward
|
|
2445 |
"initialize the directory menu
|
|
2446 |
"
|
|
2447 |
<resource: #programMenu >
|
|
2448 |
|
|
2449 |
^ self menuDirHistory:#forward.
|
|
2450 |
! !
|
|
2451 |
|
|
2452 |
!AbstractFileBrowser methodsFor:'menu access'!
|
|
2453 |
|
|
2454 |
sortMenu
|
|
2455 |
|
|
2456 |
^ self application:#DirectoryContentsBrowser do:#sortMenu.
|
|
2457 |
!
|
|
2458 |
|
|
2459 |
viewFileBrowserMenu
|
|
2460 |
|
|
2461 |
^ self application:#DirectoryContentsBrowser do:#viewBrowserMenu.
|
|
2462 |
! !
|
|
2463 |
|
|
2464 |
!AbstractFileBrowser methodsFor:'menu actions cvs'!
|
|
2465 |
|
|
2466 |
cvsAddAndCommit
|
|
2467 |
|
|
2468 |
self cvsAddAndCommit:true.
|
|
2469 |
!
|
|
2470 |
|
|
2471 |
cvsAddAndCommit:withCommit
|
|
2472 |
|
|
2473 |
|sel log cmd dir directories executionBlock nameString block|
|
|
2474 |
|
|
2475 |
log := Dialog
|
|
2476 |
requestText:(resources string:'enter initial log message')
|
|
2477 |
lines:10
|
|
2478 |
columns:70
|
|
2479 |
initialAnswer:nil.
|
|
2480 |
|
|
2481 |
sel := self getFilesFromSelection.
|
|
2482 |
executionBlock := [ : stream |
|
|
2483 |
log notNil ifTrue:[
|
|
2484 |
sel size > 0 ifTrue:[
|
|
2485 |
sel do:[:fn |
|
|
2486 |
dir := self getDirWithoutFileName:fn.
|
|
2487 |
cmd := ('cvs add -m ''' , log , ''' ' , fn baseName).
|
|
2488 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir.
|
|
2489 |
block value:stream.
|
|
2490 |
]
|
|
2491 |
] ifFalse:[
|
|
2492 |
directories := self currentDirectories value.
|
|
2493 |
directories do:[:dir |
|
|
2494 |
cmd := ('cvs add -m ''' , log , ''' ' , dir baseName).
|
|
2495 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir.
|
|
2496 |
block value:stream.
|
|
2497 |
]
|
|
2498 |
].
|
|
2499 |
withCommit ifTrue:[
|
|
2500 |
cmd := ('cvs commit -l -m ''' , log , '''').
|
|
2501 |
block := self getExecutionBlockForCommand:cmd.
|
|
2502 |
block value:stream.
|
|
2503 |
]
|
|
2504 |
]
|
|
2505 |
].
|
|
2506 |
nameString := 'Command> add and commit'.
|
|
2507 |
self makeExecutionResultProcessFor:executionBlock withName:nameString.
|
|
2508 |
!
|
|
2509 |
|
|
2510 |
cvsCommit
|
|
2511 |
|
|
2512 |
|nSel log msg cmd selectedFiles|
|
|
2513 |
|
|
2514 |
selectedFiles:= self getFilesFromSelection.
|
|
2515 |
nSel := selectedFiles size.
|
|
2516 |
|
|
2517 |
nSel == 1 ifTrue:[
|
|
2518 |
msg := resources string:'enter log message for checkIn of ''%1''' with:(selectedFiles first baseName)
|
|
2519 |
] ifFalse:[
|
|
2520 |
nSel > 1 ifTrue:[
|
|
2521 |
msg := resources string:'enter log message for %1 files to checkIn' with:nSel printString
|
|
2522 |
] ifFalse:[
|
|
2523 |
msg := resources string:'enter log message for checkIn'
|
|
2524 |
]
|
|
2525 |
].
|
|
2526 |
|
|
2527 |
log := Dialog
|
|
2528 |
requestText:msg
|
|
2529 |
lines:10
|
|
2530 |
columns:70
|
|
2531 |
initialAnswer:nil.
|
|
2532 |
|
|
2533 |
log notNil ifTrue:[
|
|
2534 |
nSel > 0 ifTrue:[
|
|
2535 |
selectedFiles do:[:fn |
|
|
2536 |
cmd := ('cvs commit -m ''' , log , ''' ' , fn baseName).
|
|
2537 |
self executeCommand:cmd.
|
|
2538 |
]
|
|
2539 |
] ifFalse:[
|
|
2540 |
cmd := ('cvs commit -l -m ''' , log , '''').
|
|
2541 |
self executeCommand:cmd.
|
|
2542 |
].
|
|
2543 |
]
|
|
2544 |
!
|
|
2545 |
|
|
2546 |
cvsRemoveAndRemoveFromCVS:filesToRemove
|
|
2547 |
"remove the selected file(s) and their CVS containers - no questions asked"
|
|
2548 |
|
|
2549 |
|msg toRemove updateRunning cmd executionBlock nameString|
|
|
2550 |
|
|
2551 |
updateRunning := self backgroundProcesses value notEmpty.
|
|
2552 |
self killAllRunningBackgroundProcesses.
|
|
2553 |
toRemove := OrderedCollection new.
|
|
2554 |
|
|
2555 |
executionBlock := [ : stream |
|
|
2556 |
| block |
|
|
2557 |
filesToRemove do:[:fileName |
|
|
2558 |
OperatingSystem accessDeniedErrorSignal handle:[:ex|
|
|
2559 |
"was not able to remove it"
|
|
2560 |
| lastError |
|
|
2561 |
lastError := OperatingSystem lastErrorString.
|
|
2562 |
msg := (resources string:'cannot remove ''%1'' !!' with:fileName).
|
|
2563 |
lastError isNil ifFalse:[
|
|
2564 |
msg := msg , '\\(' , lastError , ')'
|
|
2565 |
].
|
|
2566 |
Dialog warn:msg withCRs
|
|
2567 |
] do:[
|
|
2568 |
|answer contents|
|
|
2569 |
|
|
2570 |
(fileName isSymbolicLink not) ifTrue:[
|
|
2571 |
fileName remove.
|
|
2572 |
cmd := ('cvs remove -f ' , fileName baseName).
|
|
2573 |
block := self getExecutionBlockForCommand:cmd.
|
|
2574 |
block value:stream.
|
|
2575 |
]
|
|
2576 |
].
|
|
2577 |
].
|
|
2578 |
|
|
2579 |
cmd := ('cvs commit -m ''removed via FileBrowser''').
|
|
2580 |
block := self getExecutionBlockForCommand:cmd.
|
|
2581 |
block value:stream.
|
|
2582 |
].
|
|
2583 |
nameString := 'Command> remove and commit ', filesToRemove first baseName.
|
|
2584 |
filesToRemove size > 1 ifTrue:[
|
|
2585 |
nameString := nameString, ' ...'.
|
|
2586 |
].
|
|
2587 |
self makeExecutionResultProcessFor:executionBlock withName:nameString.
|
|
2588 |
!
|
|
2589 |
|
|
2590 |
cvsRemoveFileAndCVSContainer
|
|
2591 |
|
|
2592 |
|sel question aswer|
|
|
2593 |
|
|
2594 |
sel := self getFilesFromSelection.
|
|
2595 |
|
|
2596 |
sel size > 0 ifTrue:[
|
|
2597 |
sel size > 1 ifTrue:[
|
|
2598 |
question := resources string:'Remove %1 selected files and their CVS containers ?' with:(sel size)
|
|
2599 |
] ifFalse:[
|
|
2600 |
question := resources string:'Remove ''%1'' and its CVS container ?' with:(sel first baseName allBold)
|
|
2601 |
].
|
|
2602 |
|
|
2603 |
aswer := Dialog
|
|
2604 |
confirm:question withCRs
|
|
2605 |
yesLabel:(resources at:'Remove')
|
|
2606 |
noLabel:(resources at:'Cancel').
|
|
2607 |
aswer ifTrue:[
|
|
2608 |
self withCursor:(Cursor wait) do:[
|
|
2609 |
self cvsRemoveAndRemoveFromCVS:sel
|
|
2610 |
]
|
|
2611 |
]
|
|
2612 |
]
|
|
2613 |
!
|
|
2614 |
|
|
2615 |
cvsUpdateAll
|
|
2616 |
|
|
2617 |
| cmd |
|
|
2618 |
|
|
2619 |
cmd := 'cvs upd -l'.
|
|
2620 |
self executeCommand:cmd.
|
|
2621 |
!
|
|
2622 |
|
|
2623 |
cvsUpdateAllRecursive
|
|
2624 |
|
|
2625 |
| cmd |
|
|
2626 |
|
|
2627 |
cmd := 'cvs upd -d'.
|
|
2628 |
self executeCommand:cmd.
|
|
2629 |
!
|
|
2630 |
|
|
2631 |
cvsUpdateSelection
|
|
2632 |
|
|
2633 |
| selectedFiles stream|
|
|
2634 |
|
|
2635 |
|
|
2636 |
selectedFiles:= self getFilesFromSelection.
|
|
2637 |
stream := WriteStream on:''.
|
|
2638 |
stream nextPutAll:'cvs upd '.
|
|
2639 |
selectedFiles do:[: file |
|
|
2640 |
stream nextPutAll:file baseName.
|
|
2641 |
stream space.
|
|
2642 |
].
|
|
2643 |
self executeCommand:stream contents.
|
|
2644 |
stream close.
|
|
2645 |
! !
|
|
2646 |
|
|
2647 |
!AbstractFileBrowser methodsFor:'menu actions edit'!
|
|
2648 |
|
|
2649 |
copyInDirContentsBrowser
|
|
2650 |
|
|
2651 |
^ self application:#DirectoryContentsBrowser do:#doCopy.
|
|
2652 |
!
|
|
2653 |
|
|
2654 |
cutInDirContentsBrowser
|
|
2655 |
|
|
2656 |
^ self application:#DirectoryContentsBrowser do:#doCut.
|
|
2657 |
!
|
|
2658 |
|
|
2659 |
deleteInDirContentsBrowser
|
|
2660 |
|
|
2661 |
^ self application:#DirectoryContentsBrowser do:#doDelete.
|
|
2662 |
! !
|
|
2663 |
|
|
2664 |
!AbstractFileBrowser methodsFor:'menu actions tools'!
|
|
2665 |
|
|
2666 |
createProjectAndOpenProjectBrowser
|
|
2667 |
|nm f s directory|
|
|
2668 |
|
|
2669 |
self currentFilesAreInSameDirectory ifFalse:[^ self].
|
|
2670 |
directory := self currentDirectories value first.
|
|
2671 |
nm := directory baseName.
|
|
2672 |
f := (directory construct:nm) withSuffix:'prj'.
|
|
2673 |
f exists ifTrue:[
|
|
2674 |
Dialog warn:'A file named ' , f baseName , ' already exists.'.
|
|
2675 |
^ self.
|
|
2676 |
].
|
|
2677 |
s := f writeStream.
|
|
2678 |
s nextPutAll:'
|
|
2679 |
name ''' , nm , '''
|
|
2680 |
type #classLibrary
|
|
2681 |
package #''private:' , nm , '''
|
|
2682 |
prerequisites nil
|
|
2683 |
|
|
2684 |
classes #( )
|
|
2685 |
'.
|
|
2686 |
s close.
|
|
2687 |
ProjectBrowser openOnFile:f.
|
|
2688 |
!
|
|
2689 |
|
|
2690 |
fileFileIn
|
|
2691 |
"fileIn the selected file(s)"
|
|
2692 |
|
|
2693 |
self fileFileInLazy:false
|
|
2694 |
!
|
|
2695 |
|
|
2696 |
fileFileInLazy
|
|
2697 |
"fileIn the selected file(s). Do a quick load (no compilation)"
|
|
2698 |
|
|
2699 |
self fileFileInLazy:true
|
|
2700 |
!
|
|
2701 |
|
|
2702 |
fileFileInLazy:lazy
|
|
2703 |
"fileIn the selected file(s)"
|
|
2704 |
|
|
2705 |
| selectedFiles|
|
|
2706 |
|
|
2707 |
selectedFiles:= self getFilesFromSelection.
|
|
2708 |
selectedFiles do:[:fileName |
|
|
2709 |
self singleFileFileIn:fileName lazy:lazy
|
|
2710 |
].
|
|
2711 |
!
|
|
2712 |
|
|
2713 |
fileFileInToNameSpace
|
|
2714 |
"fileIn the selected file(s)<into a nameSpace"
|
|
2715 |
|
|
2716 |
|ns listOfKnownNameSpaces|
|
|
2717 |
|
|
2718 |
listOfKnownNameSpaces := Set new.
|
|
2719 |
NameSpace
|
|
2720 |
allNamespaces
|
|
2721 |
do:[:eachNameSpace |
|
|
2722 |
listOfKnownNameSpaces add:eachNameSpace name
|
|
2723 |
].
|
|
2724 |
listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort.
|
|
2725 |
|
|
2726 |
ns := Dialog
|
|
2727 |
request:'During fileIn, new classes are created in nameSpace:'
|
|
2728 |
initialAnswer:(LastEnforcedNameSpace ? Class nameSpaceQuerySignal query name)
|
|
2729 |
list:listOfKnownNameSpaces.
|
|
2730 |
ns isEmptyOrNil ifTrue:[^ self].
|
|
2731 |
|
|
2732 |
LastEnforcedNameSpace := ns.
|
|
2733 |
ns := NameSpace name:ns.
|
|
2734 |
|
|
2735 |
Class nameSpaceQuerySignal
|
|
2736 |
answer:ns
|
|
2737 |
do:[ self fileFileInLazy:false ]
|
|
2738 |
!
|
|
2739 |
|
|
2740 |
fileFindAllDuplicates
|
|
2741 |
"scan directory and all subdirs for duplicate files"
|
|
2742 |
|
|
2743 |
|fileNames dir infoDir filesBySize
|
|
2744 |
result info dirPrefix myName stream textBox maxLength directories|
|
|
2745 |
|
|
2746 |
|
|
2747 |
self withWaitCursorDo:[
|
|
2748 |
result := Dictionary new.
|
|
2749 |
myName := self class name asString.
|
|
2750 |
directories := self getDirectoriesFromSelection.
|
|
2751 |
directories isEmpty ifTrue:[^ self].
|
|
2752 |
|
|
2753 |
dir := directories first.
|
|
2754 |
"/ self label: myName, '- gathering file names ...'.
|
|
2755 |
fileNames := dir recursiveDirectoryContents.
|
|
2756 |
fileNames := fileNames collect:[:fn | dir construct:fn].
|
|
2757 |
fileNames := fileNames select:[:fn | fn isDirectory not].
|
|
2758 |
|
|
2759 |
"/ self label:myName , '- gathering sizes ...'.
|
|
2760 |
infoDir := Dictionary new.
|
|
2761 |
fileNames do:[:fn |
|
|
2762 |
infoDir at:fn put:(fn fileSize)
|
|
2763 |
].
|
|
2764 |
|
|
2765 |
"/ for each, get the files size.
|
|
2766 |
"/ in a first pass, look for files of the same size and
|
|
2767 |
"/ compare them ...
|
|
2768 |
|
|
2769 |
"/ self label:myName , '- preselect possible duplicates ...'.
|
|
2770 |
filesBySize := Dictionary new.
|
|
2771 |
infoDir keysAndValuesDo:[:fn :sz |
|
|
2772 |
|entry|
|
|
2773 |
|
|
2774 |
entry := filesBySize at:sz ifAbsentPut:[Set new].
|
|
2775 |
entry add:fn.
|
|
2776 |
].
|
|
2777 |
|
|
2778 |
"/ any of same size ?
|
|
2779 |
|
|
2780 |
"/ self label:myName , '- checking for duplicates ...'.
|
|
2781 |
filesBySize do:[:entry |
|
|
2782 |
|files|
|
|
2783 |
|
|
2784 |
entry size > 1 ifTrue:[
|
|
2785 |
files := entry asArray.
|
|
2786 |
1 to:files size-1 do:[:idx1 |
|
|
2787 |
idx1+1 to:files size do:[:idx2 |
|
|
2788 |
|fn1 fn2|
|
|
2789 |
|
|
2790 |
fn1 := files at:idx1.
|
|
2791 |
fn2 := files at:idx2.
|
|
2792 |
|
|
2793 |
"/ self label:myName , '- checking ' , fn1 baseName , ' vs. ' , fn2 baseName , ' ...'.
|
|
2794 |
(result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[
|
|
2795 |
"/ compare the files
|
|
2796 |
(fn1 sameContentsAs:fn2) ifTrue:[
|
|
2797 |
"/ Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName.
|
|
2798 |
result at:fn1 put:fn2.
|
|
2799 |
]
|
|
2800 |
]
|
|
2801 |
]
|
|
2802 |
]
|
|
2803 |
]
|
|
2804 |
].
|
|
2805 |
|
|
2806 |
"/ self label:myName , '- sorting ...'.
|
|
2807 |
dirPrefix := dir pathName.
|
|
2808 |
result := result associations.
|
|
2809 |
result := result collect:[:assoc |
|
|
2810 |
|f1 f2|
|
|
2811 |
|
|
2812 |
f1 := assoc key name.
|
|
2813 |
f2 := assoc value name.
|
|
2814 |
(f1 startsWith:dirPrefix) ifTrue:[
|
|
2815 |
f1 := f1 copyFrom:dirPrefix size + 2.
|
|
2816 |
].
|
|
2817 |
(f2 startsWith:dirPrefix) ifTrue:[
|
|
2818 |
f2 := f2 copyFrom:dirPrefix size + 2.
|
|
2819 |
].
|
|
2820 |
f1 < f2 ifTrue:[
|
|
2821 |
f2 -> f1
|
|
2822 |
] ifFalse:[
|
|
2823 |
f1 -> f2
|
|
2824 |
]
|
|
2825 |
].
|
|
2826 |
result sort:[:f1 :f2 | f2 value < f1 value].
|
|
2827 |
|
|
2828 |
info := OrderedCollection new.
|
|
2829 |
result do:[:assoc |
|
|
2830 |
info add:(assoc key , ' same as ' , assoc value)
|
|
2831 |
].
|
|
2832 |
info isEmpty ifTrue:[
|
|
2833 |
info := 'No duplicate files found.'
|
|
2834 |
].
|
|
2835 |
].
|
|
2836 |
|
|
2837 |
stream := WriteStream on:''.
|
|
2838 |
info do:[:el|
|
|
2839 |
stream nextPutAll:el.
|
|
2840 |
stream cr.
|
|
2841 |
].
|
|
2842 |
textBox := TextBox new.
|
|
2843 |
textBox initialText:(stream contents).
|
|
2844 |
textBox title:'File dublicates in directory: ', dir asString.
|
|
2845 |
textBox readOnly:true.
|
|
2846 |
textBox noCancel.
|
|
2847 |
textBox label:'Dublicates in ', dir asString.
|
|
2848 |
maxLength := 10.
|
|
2849 |
info do:[: el |
|
|
2850 |
maxLength := maxLength max:(el size).
|
|
2851 |
].
|
|
2852 |
textBox extent:((maxLength * 5)@(info size * 20)); sizeFixed:false.
|
|
2853 |
textBox showAtPointer.
|
|
2854 |
stream close.
|
|
2855 |
"/ subView contents:info.
|
|
2856 |
"/ self label:myName.
|
|
2857 |
!
|
|
2858 |
|
|
2859 |
fileFindDuplicates
|
|
2860 |
"scan directory for duplicate files"
|
|
2861 |
|
|
2862 |
|fileNames dir infoDir filesBySize
|
|
2863 |
result info stream textBox maxLength directories allFiles titleStream size|
|
|
2864 |
|
|
2865 |
"/ (self askIfModified:'contents has not been saved.\\Modifications will be lost when you proceed.'
|
|
2866 |
"/ yesButton:'proceed') ifFalse:[^ self].
|
|
2867 |
|
|
2868 |
self withWaitCursorDo:[
|
|
2869 |
result := Dictionary new.
|
|
2870 |
|
|
2871 |
directories := self getDirectoriesFromSelection.
|
|
2872 |
directories isEmpty ifTrue:[^ self].
|
|
2873 |
|
|
2874 |
allFiles := OrderedCollection new.
|
|
2875 |
directories do:[ : dir|
|
|
2876 |
fileNames := dir directoryContents.
|
|
2877 |
fileNames := fileNames collect:[:fn | dir construct:fn].
|
|
2878 |
fileNames := fileNames select:[:fn | fn isDirectory not].
|
|
2879 |
allFiles addAll:fileNames.
|
|
2880 |
].
|
|
2881 |
|
|
2882 |
infoDir := Dictionary new.
|
|
2883 |
allFiles do:[:fn |
|
|
2884 |
infoDir at:fn put:(fn info)
|
|
2885 |
].
|
|
2886 |
|
|
2887 |
"/ for each, get the files size.
|
|
2888 |
"/ in a first pass, look for files of the same size and
|
|
2889 |
"/ compare them ...
|
|
2890 |
|
|
2891 |
filesBySize := Dictionary new.
|
|
2892 |
infoDir keysAndValuesDo:[:fn :info |
|
|
2893 |
|sz entry|
|
|
2894 |
|
|
2895 |
sz := info size.
|
|
2896 |
entry := filesBySize at:sz ifAbsentPut:[Set new].
|
|
2897 |
entry add:fn.
|
|
2898 |
].
|
|
2899 |
|
|
2900 |
"/ any of same size ?
|
|
2901 |
|
|
2902 |
filesBySize do:[:entry |
|
|
2903 |
|files|
|
|
2904 |
|
|
2905 |
entry size > 1 ifTrue:[
|
|
2906 |
files := entry asArray.
|
|
2907 |
1 to:files size-1 do:[:idx1 |
|
|
2908 |
idx1+1 to:files size do:[:idx2 |
|
|
2909 |
|fn1 fn2|
|
|
2910 |
|
|
2911 |
fn1 := files at:idx1.
|
|
2912 |
fn2 := files at:idx2.
|
|
2913 |
|
|
2914 |
(result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[
|
|
2915 |
"/ compare the files
|
|
2916 |
(fn1 sameContentsAs:fn2) ifTrue:[
|
|
2917 |
"/ Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName.
|
|
2918 |
result at:fn1 put:fn2.
|
|
2919 |
]
|
|
2920 |
]
|
|
2921 |
]
|
|
2922 |
]
|
|
2923 |
]
|
|
2924 |
].
|
|
2925 |
|
|
2926 |
result := result associations.
|
|
2927 |
result := result collect:[:assoc |
|
|
2928 |
|f1 f2|
|
|
2929 |
|
|
2930 |
f1 := assoc key asString.
|
|
2931 |
f2 := assoc value asString.
|
|
2932 |
f1 < f2 ifTrue:[
|
|
2933 |
f2 -> f1
|
|
2934 |
] ifFalse:[
|
|
2935 |
f1 -> f2
|
|
2936 |
]
|
|
2937 |
].
|
|
2938 |
result sort:[:f1 :f2 | f2 value < f1 value].
|
|
2939 |
|
|
2940 |
info := OrderedCollection new.
|
|
2941 |
size := self getBestDirectory asString size.
|
|
2942 |
result do:[:assoc |
|
|
2943 |
|fn1 fn2|
|
|
2944 |
|
|
2945 |
fn1 := assoc key.
|
|
2946 |
fn2 := assoc value.
|
|
2947 |
size > 1 ifTrue:[
|
|
2948 |
fn1 := ('..', (fn1 copyFrom:(size + 1))).
|
|
2949 |
fn2 := ('..', (fn2 copyFrom:(size + 1))).
|
|
2950 |
].
|
|
2951 |
(fn1 includes:Character space) ifTrue:[
|
|
2952 |
fn1 := '"' , fn1 , '"'
|
|
2953 |
].
|
|
2954 |
(fn2 includes:Character space) ifTrue:[
|
|
2955 |
fn2 := '"' , fn2 , '"'
|
|
2956 |
].
|
|
2957 |
info add:(fn1 , ' same as ' , fn2)
|
|
2958 |
].
|
|
2959 |
info isEmpty ifTrue:[
|
|
2960 |
info add:'No duplicate files found.'
|
|
2961 |
].
|
|
2962 |
].
|
|
2963 |
stream := WriteStream on:''.
|
|
2964 |
info do:[:el|
|
|
2965 |
stream nextPutAll:el.
|
|
2966 |
stream cr.
|
|
2967 |
].
|
|
2968 |
titleStream := WriteStream on:''.
|
|
2969 |
titleStream nextPutAll:'File dublicates in director'.
|
|
2970 |
directories size == 1 ifTrue:[
|
|
2971 |
titleStream nextPutAll:'y: ', directories first asString.
|
|
2972 |
] ifFalse:[
|
|
2973 |
titleStream nextPutAll:'ies: '.
|
|
2974 |
titleStream cr.
|
|
2975 |
directories do:[:dir|
|
|
2976 |
size > 1 ifTrue:[
|
|
2977 |
titleStream nextPutAll:'..'.
|
|
2978 |
titleStream nextPutAll:((dir asString) copyFrom:(size + 1)).
|
|
2979 |
] ifFalse:[
|
|
2980 |
titleStream nextPutAll:(dir asString).
|
|
2981 |
].
|
|
2982 |
titleStream cr.
|
|
2983 |
]
|
|
2984 |
].
|
|
2985 |
|
|
2986 |
textBox := TextBox new.
|
|
2987 |
textBox initialText:(stream contents).
|
|
2988 |
textBox title:(titleStream contents).
|
|
2989 |
textBox readOnly:true.
|
|
2990 |
textBox noCancel.
|
|
2991 |
textBox label:'Dublicates in ', dir asString.
|
|
2992 |
maxLength := 10.
|
|
2993 |
info do:[: el |
|
|
2994 |
maxLength := maxLength max:(el size).
|
|
2995 |
].
|
|
2996 |
textBox extent:((maxLength * 5)@(info size * 10)); sizeFixed:false.
|
|
2997 |
textBox showAtPointer.
|
|
2998 |
titleStream close.
|
|
2999 |
stream close.
|
|
3000 |
!
|
|
3001 |
|
|
3002 |
fileFindFile
|
|
3003 |
|filename files|
|
|
3004 |
|
|
3005 |
files := self currentFileNameHolder value.
|
|
3006 |
files notEmpty ifTrue:[
|
|
3007 |
filename := files first.
|
|
3008 |
] ifFalse:[
|
|
3009 |
filename := (Filename homeDirectory).
|
|
3010 |
].
|
|
3011 |
FindFileApplication openOnFileName:filename.
|
|
3012 |
!
|
|
3013 |
|
|
3014 |
installAllAsAutoloaded
|
|
3015 |
"install all classes found here as autoloaded classes"
|
|
3016 |
|
|
3017 |
self allItemsOfCurrentDirectory do:[:fileItem |
|
|
3018 |
(fileItem hasMimeType and:[fileItem mimeType isSmalltalkSource]) ifTrue:[
|
|
3019 |
self installAsAutoloaded:(fileItem fileName).
|
|
3020 |
]
|
|
3021 |
].
|
|
3022 |
!
|
|
3023 |
|
|
3024 |
installAsAutoloaded:aFilename
|
|
3025 |
"install aFilename as autoloaded class"
|
|
3026 |
|
|
3027 |
|chunks s|
|
|
3028 |
|
|
3029 |
chunks := ChangeSet fromStream:(s := aFilename asFilename readStream). s close.
|
|
3030 |
chunks
|
|
3031 |
select:[:eachChunk | eachChunk isClassDefinitionChange]
|
|
3032 |
thenDo:[:eachClassChunk | eachClassChunk installAsAutoloadedClassIfNotPrivate].
|
|
3033 |
!
|
|
3034 |
|
|
3035 |
loadImageAndPerform:aSelectorOrBlock
|
|
3036 |
|
|
3037 |
|img path files|
|
|
3038 |
|
|
3039 |
files := self getFilesFromSelection.
|
|
3040 |
files isEmpty ifTrue:[ ^ self].
|
|
3041 |
files do:[:fileName |
|
|
3042 |
path := fileName.
|
|
3043 |
path isDirectory ifFalse:[
|
|
3044 |
img := Image fromFile:(path pathName).
|
|
3045 |
img notNil ifTrue:[
|
|
3046 |
aSelectorOrBlock isSymbol ifTrue:[
|
|
3047 |
img perform:aSelectorOrBlock
|
|
3048 |
] ifFalse:[
|
|
3049 |
aSelectorOrBlock value:img
|
|
3050 |
]
|
|
3051 |
] ifFalse:[
|
|
3052 |
Dialog warn:'unknown format: ' , fileName asString
|
|
3053 |
]
|
|
3054 |
]
|
|
3055 |
].
|
|
3056 |
!
|
|
3057 |
|
|
3058 |
openASN1Browser
|
|
3059 |
|
|
3060 |
self openTool:OSI::ASN1Browser
|
|
3061 |
!
|
|
3062 |
|
|
3063 |
openAppletViewer
|
|
3064 |
|numItems files|
|
|
3065 |
|
|
3066 |
files := self getFilesFromSelection.
|
|
3067 |
(numItems := files size) > 2 ifTrue:[
|
|
3068 |
(self
|
|
3069 |
confirm:(resources string:'open for each of the %1 items ?'
|
|
3070 |
with:numItems)) ifFalse:[^ self].
|
|
3071 |
].
|
|
3072 |
|
|
3073 |
Java startupJavaSystem.
|
|
3074 |
"/ Java markAllClassesUninitialized.
|
|
3075 |
"/ Java initAllStaticFields.
|
|
3076 |
"/ Java initAllClasses.
|
|
3077 |
|
|
3078 |
files do:[:fileName |
|
|
3079 |
|p path|
|
|
3080 |
|
|
3081 |
path := fileName.
|
|
3082 |
path isDirectory ifFalse:[
|
|
3083 |
p := Java
|
|
3084 |
javaProcessForMainOf:(Java classForName:'sun.applet.AppletViewer')
|
|
3085 |
argumentString:path pathName.
|
|
3086 |
p resume.
|
|
3087 |
]
|
|
3088 |
].
|
|
3089 |
!
|
|
3090 |
|
|
3091 |
openCBrowser
|
|
3092 |
|
|
3093 |
|directories|
|
|
3094 |
|
|
3095 |
directories := self getDirectoriesFromSelection.
|
|
3096 |
directories isEmpty ifTrue:[ ^ self].
|
|
3097 |
self withWaitCursorDo:[
|
|
3098 |
CBrowser::Browser openIn:directories first.
|
|
3099 |
]
|
|
3100 |
!
|
|
3101 |
|
|
3102 |
openChangesBrowser
|
|
3103 |
"open a change browser on the selected file(s)"
|
|
3104 |
|
|
3105 |
self openTool:(UserPreferences current changesBrowserClass)
|
|
3106 |
!
|
|
3107 |
|
|
3108 |
openDiffView
|
|
3109 |
"open a diff-view"
|
|
3110 |
|
|
3111 |
| name1 name2 text1 text2 f d err nm l1 files title|
|
|
3112 |
|
|
3113 |
files := self getFilesFromSelection.
|
|
3114 |
files isEmpty ifTrue:[
|
|
3115 |
Dialog warn:'you have to select a file first'.
|
|
3116 |
^ self.
|
|
3117 |
].
|
|
3118 |
(files size == 2) ifTrue:[
|
|
3119 |
name1 := files last.
|
|
3120 |
name2 := files first.
|
|
3121 |
] ifFalse:[
|
|
3122 |
LastFileDiffFile notNil ifTrue:[
|
|
3123 |
"/ f := self currentDirectory value asFilename construct:(LastFileDiffFile baseName).
|
|
3124 |
(LastFileDiffFile exists
|
|
3125 |
and:[LastFileDiffFile isReadable]) ifTrue:[
|
|
3126 |
name1 := f.
|
|
3127 |
]
|
|
3128 |
].
|
|
3129 |
name2 := files first.
|
|
3130 |
title := 'show difference between ', name2 baseName.
|
|
3131 |
name1 := FileSelectionBox requestFileName:title default:(name1 baseName) fromDirectory:(name2 asFilename pathName).
|
|
3132 |
].
|
|
3133 |
|
|
3134 |
(name1 isNil or:[name1 asString isEmpty]) ifTrue:[
|
|
3135 |
text1 := self getAllFilesAsStringCollection asStringCollection withTabs.
|
|
3136 |
text1 := text1 collect:[:l | l isNil ifTrue:[' '] ifFalse:[l]].
|
|
3137 |
name1 := nil.
|
|
3138 |
l1 := 'browser contents'
|
|
3139 |
] ifFalse:[
|
|
3140 |
LastFileDiffFile := name1.
|
|
3141 |
name1 isReadable ifFalse:[
|
|
3142 |
nm := name1.
|
|
3143 |
name1 exists ifFalse:[
|
|
3144 |
err := '%1 does not exist'.
|
|
3145 |
] ifTrue:[
|
|
3146 |
err := '%1 is not readable'
|
|
3147 |
].
|
|
3148 |
].
|
|
3149 |
l1 := name1 pathName
|
|
3150 |
].
|
|
3151 |
|
|
3152 |
err isNil ifTrue:[
|
|
3153 |
name2 isReadable ifFalse:[
|
|
3154 |
nm := name2.
|
|
3155 |
name2 exists ifFalse:[
|
|
3156 |
err := '%1 does not exist'.
|
|
3157 |
] ifTrue:[
|
|
3158 |
err := '%1 is not readable'
|
|
3159 |
].
|
|
3160 |
].
|
|
3161 |
].
|
|
3162 |
err notNil ifTrue:[
|
|
3163 |
Dialog warn:(resources string:err with:nm pathName).
|
|
3164 |
^ self
|
|
3165 |
].
|
|
3166 |
|
|
3167 |
self withWaitCursorDo:[
|
|
3168 |
name1 notNil ifTrue:[
|
|
3169 |
text1 := name1 contents.
|
|
3170 |
].
|
|
3171 |
text2 := name2 contents.
|
|
3172 |
text1 = text2 ifTrue:[
|
|
3173 |
self information:'same contents'
|
|
3174 |
] ifFalse:[
|
|
3175 |
d := DiffTextView
|
|
3176 |
openOn:text1 label:l1
|
|
3177 |
and:text2 label:name2 pathName.
|
|
3178 |
d label:'file differences'.
|
|
3179 |
]
|
|
3180 |
]
|
|
3181 |
!
|
|
3182 |
|
|
3183 |
openEditor
|
|
3184 |
self openTool:EditTextView
|
|
3185 |
!
|
|
3186 |
|
|
3187 |
openHTMLReader
|
|
3188 |
|
|
3189 |
self openTool:HTMLDocumentView ignoreDirectories:false
|
|
3190 |
!
|
|
3191 |
|
|
3192 |
openImageEditor
|
|
3193 |
|
|
3194 |
[self loadImageAndPerform:#edit] fork
|
|
3195 |
!
|
|
3196 |
|
|
3197 |
openImageInspector
|
|
3198 |
[self loadImageAndPerform:#inspect] fork
|
|
3199 |
!
|
|
3200 |
|
|
3201 |
openImagePreview
|
|
3202 |
|
|
3203 |
[self loadImageAndPerform:[:img |
|
|
3204 |
|i top viewer|
|
|
3205 |
|
|
3206 |
top := StandardSystemView new.
|
|
3207 |
|
|
3208 |
viewer := ImageView origin:0.0@0.0 corner:1.0@1.0 in:top.
|
|
3209 |
i := img.
|
|
3210 |
top extent:200@200.
|
|
3211 |
top label:(img fileName asFilename directoryName asFilename baseName , '/' , img fileName asFilename baseName).
|
|
3212 |
top openAndWait.
|
|
3213 |
|
|
3214 |
(i width > 200 or:[i height > 200]) ifTrue:[
|
|
3215 |
i := i magnifiedPreservingRatioTo:200@200.
|
|
3216 |
].
|
|
3217 |
viewer image:i.
|
|
3218 |
].
|
|
3219 |
] fork
|
|
3220 |
!
|
|
3221 |
|
|
3222 |
openMP3Player
|
|
3223 |
|file|
|
|
3224 |
|
|
3225 |
file := self getFilesFromSelection.
|
|
3226 |
(file isEmpty) ifTrue:[
|
|
3227 |
^ self.
|
|
3228 |
].
|
|
3229 |
file := file first.
|
|
3230 |
(MP3PlayerApplication ? SaugFix::MP3PlayerApplication) playSong:file.
|
|
3231 |
!
|
|
3232 |
|
|
3233 |
openSlideShow
|
|
3234 |
|
|
3235 |
|directories dir|
|
|
3236 |
|
|
3237 |
directories := self getDirectoriesFromSelection.
|
|
3238 |
directories isEmpty ifTrue:[^ self].
|
|
3239 |
|
|
3240 |
dir := directories first.
|
|
3241 |
CodingExamples_GUI::SlideShow openIn:dir.
|
|
3242 |
!
|
|
3243 |
|
|
3244 |
openSnapshotImageBrowser
|
|
3245 |
^ self openTool:SystemBrowser with:#openOnSnapShotImage: ignoreDirectories:true
|
|
3246 |
!
|
|
3247 |
|
|
3248 |
openTerminal
|
|
3249 |
|
|
3250 |
|directories dir|
|
|
3251 |
|
|
3252 |
directories := self getDirectoriesFromSelection.
|
|
3253 |
directories isEmpty ifTrue:[
|
|
3254 |
dir := Filename homeDirectory.
|
|
3255 |
] ifFalse:[
|
|
3256 |
dir := directories first.
|
|
3257 |
].
|
|
3258 |
|
|
3259 |
VT100TerminalView openShellIn:dir.
|
|
3260 |
!
|
|
3261 |
|
|
3262 |
openTool:aToolClass
|
|
3263 |
"open a tool on the selected file(s)"
|
|
3264 |
|
|
3265 |
^ self openTool:aToolClass ignoreDirectories:true
|
|
3266 |
!
|
|
3267 |
|
|
3268 |
openTool:aToolClass ignoreDirectories:ignoreDirs
|
|
3269 |
"open a tool on the selected file(s)"
|
|
3270 |
|
|
3271 |
^ self
|
|
3272 |
openTool:aToolClass
|
|
3273 |
with:#openOn:
|
|
3274 |
ignoreDirectories:ignoreDirs
|
|
3275 |
!
|
|
3276 |
|
|
3277 |
openTool:aToolClass with:aSelector ignoreDirectories:ignoreDirs
|
|
3278 |
"open a tool on the selected file(s)"
|
|
3279 |
|
|
3280 |
|numItems path tool files|
|
|
3281 |
|
|
3282 |
aToolClass isNil ifTrue:[
|
|
3283 |
Dialog warn:'Sorry, that tool seems to be not available'.
|
|
3284 |
^ nil.
|
|
3285 |
].
|
|
3286 |
files := self getFilesFromSelection.
|
|
3287 |
|
|
3288 |
(numItems := files size) > 2 ifTrue:[
|
|
3289 |
(self
|
|
3290 |
confirm:(resources string:'open for each of the %1 items ?'
|
|
3291 |
with:numItems)) ifFalse:[^ self].
|
|
3292 |
].
|
|
3293 |
|
|
3294 |
self withWaitCursorDo:[
|
|
3295 |
files do:[:fileName |
|
|
3296 |
(ignoreDirs not or:[fileName isDirectory not]) ifTrue:[
|
|
3297 |
fileName isAbsolute ifTrue:[
|
|
3298 |
path := fileName getName.
|
|
3299 |
] ifFalse:[
|
|
3300 |
path := fileName pathName.
|
|
3301 |
].
|
|
3302 |
tool := aToolClass perform:aSelector with:path.
|
|
3303 |
]
|
|
3304 |
].
|
|
3305 |
].
|
|
3306 |
^ tool
|
|
3307 |
!
|
|
3308 |
|
|
3309 |
openZipTool
|
|
3310 |
|zipTool directories dir|
|
|
3311 |
|
|
3312 |
(zipTool := self openTool:ZipTool) notNil ifTrue:[
|
|
3313 |
directories := self getDirectoriesFromSelection.
|
|
3314 |
directories isEmpty ifTrue:[
|
|
3315 |
dir := directories first.
|
|
3316 |
] ifFalse:[
|
|
3317 |
dir := Filename homeDirectory.
|
|
3318 |
].
|
|
3319 |
|
|
3320 |
zipTool initialExtractDirectory:dir.
|
|
3321 |
].
|
|
3322 |
!
|
|
3323 |
|
|
3324 |
readAbbrevFile
|
|
3325 |
"read the abbrev file and install classes found there as autoloaded classes"
|
|
3326 |
|
|
3327 |
| directories dir|
|
|
3328 |
|
|
3329 |
directories := self getDirectoriesFromSelection.
|
|
3330 |
directories isEmpty ifTrue:[^ self].
|
|
3331 |
|
|
3332 |
dir := directories first.
|
|
3333 |
Smalltalk installAutoloadedClassesFrom:(dir construct:'abbrev.stc').
|
|
3334 |
!
|
|
3335 |
|
|
3336 |
singleFileFileIn:fileName lazy:lazy
|
|
3337 |
"fileIn the selected file(s)"
|
|
3338 |
|
|
3339 |
|aStream wasLazy|
|
|
3340 |
|
|
3341 |
fileName type == #regular ifTrue:[
|
|
3342 |
|
|
3343 |
(ObjectFileLoader notNil
|
|
3344 |
and:[ObjectFileLoader hasValidBinaryExtension:fileName]) ifTrue:[
|
|
3345 |
AbortOperationRequest catch:[
|
|
3346 |
|p|
|
|
3347 |
|
|
3348 |
"/
|
|
3349 |
"/ look if already loaded ... then unload first
|
|
3350 |
"/
|
|
3351 |
p := fileName pathName.
|
|
3352 |
(ObjectFileLoader loadedObjectFiles includes:p) ifTrue:[
|
|
3353 |
(Dialog confirm:(resources
|
|
3354 |
string:'%1 is already loaded; load anyway ?'
|
|
3355 |
with:p)) ifFalse:[
|
|
3356 |
^ self
|
|
3357 |
].
|
|
3358 |
Transcript showCR:'unloading old ' , p , ' ...'.
|
|
3359 |
ObjectFileLoader unloadObjectFile:p.
|
|
3360 |
].
|
|
3361 |
|
|
3362 |
Transcript showCR:'loading ' , p , ' ...'.
|
|
3363 |
ObjectFileLoader loadObjectFile:p.
|
|
3364 |
Class addInfoRecord:('fileIn ' , fileName)
|
|
3365 |
]
|
|
3366 |
] ifFalse:[ ((fileName hasSuffix:'cls')
|
|
3367 |
and:[((fileName mimeTypeOfContents ? '') startsWith:'application/x-smalltalk-source') not ]) ifTrue:[
|
|
3368 |
"/ loading a binary class file
|
|
3369 |
aStream := fileName readStream.
|
|
3370 |
aStream notNil ifTrue:[
|
|
3371 |
aStream fileInBinary.
|
|
3372 |
]
|
|
3373 |
] ifFalse:[
|
|
3374 |
((fileName hasSuffix:'class')
|
|
3375 |
or:[(fileName hasSuffix:'cla')]) ifTrue:[
|
|
3376 |
"/ loading a java class file
|
|
3377 |
JavaClassReader notNil ifTrue:[
|
|
3378 |
JavaClassReader loadFile:(fileName pathName)
|
|
3379 |
]
|
|
3380 |
] ifFalse:[ (fileName hasSuffix:'sif') ifTrue:[
|
|
3381 |
"/ loading a sif (smalltalk interchange format) file
|
|
3382 |
SmalltalkInterchangeSTXFileInManager autoload.
|
|
3383 |
SmalltalkInterchangeFileManager newForFileIn
|
|
3384 |
fileName: fileName pathName;
|
|
3385 |
fileIn.
|
|
3386 |
] ifFalse:[ (fileName hasSuffix:'pcl') ifTrue:[
|
|
3387 |
Parcel isNil ifTrue:[
|
|
3388 |
Dialog warn:'Parcel support not loaded.'
|
|
3389 |
] ifFalse:[
|
|
3390 |
Parcel loadParcelFrom: fileName pathName
|
|
3391 |
]
|
|
3392 |
] ifFalse:[
|
|
3393 |
"/ loading a regular (chunk) or xml source file
|
|
3394 |
aStream := fileName readStream.
|
|
3395 |
aStream notNil ifTrue:[
|
|
3396 |
Error handle:[ : ex |
|
|
3397 |
Dialog warn:'Error on file in: ', ex errorString.
|
|
3398 |
] do:[
|
|
3399 |
[
|
|
3400 |
Class withoutUpdatingChangesDo:[
|
|
3401 |
wasLazy := Compiler compileLazy:lazy.
|
|
3402 |
aStream fileIn.
|
|
3403 |
].
|
|
3404 |
Class addInfoRecord:('fileIn ' , fileName asString)
|
|
3405 |
] ensure:[
|
|
3406 |
Compiler compileLazy:wasLazy.
|
|
3407 |
aStream close
|
|
3408 |
]
|
|
3409 |
]
|
|
3410 |
]
|
|
3411 |
]]]
|
|
3412 |
]]
|
|
3413 |
].
|
|
3414 |
! !
|
|
3415 |
|
|
3416 |
!AbstractFileBrowser methodsFor:'menu queries cvs'!
|
|
3417 |
|
|
3418 |
canCvsAddAndCommit
|
|
3419 |
|
|
3420 |
|fileItems|
|
|
3421 |
|
|
3422 |
fileItems := self getFileItemsFromSelection.
|
|
3423 |
^ (fileItems notEmpty and:[self currentFilesAreInSameDirectory]).
|
|
3424 |
!
|
|
3425 |
|
|
3426 |
canRemoveCVSContainer
|
|
3427 |
|
|
3428 |
|fileItems dirOfFile cvsDir|
|
|
3429 |
|
|
3430 |
fileItems := self getFileItemsFromSelection.
|
|
3431 |
fileItems isEmpty ifTrue:[^ false].
|
|
3432 |
^ ((fileItems detect:[:item|
|
|
3433 |
dirOfFile := self getDirWithoutFileName:(item fileName).
|
|
3434 |
cvsDir := dirOfFile construct:'CVS'.
|
|
3435 |
(cvsDir isDirectory and:[cvsDir exists])
|
|
3436 |
] ifNone:[nil]) notNil).
|
|
3437 |
! !
|
|
3438 |
|
|
3439 |
!AbstractFileBrowser methodsFor:'menu queries tools'!
|
|
3440 |
|
|
3441 |
anySTFilesPresent
|
|
3442 |
|
|
3443 |
^ self anyFilesPresentWithSuffix:'st'
|
|
3444 |
!
|
|
3445 |
|
|
3446 |
canCreateNewProject
|
|
3447 |
|
|
3448 |
| contents |
|
|
3449 |
|
|
3450 |
self currentFilesAreInSameDirectory ifFalse:[^ false].
|
|
3451 |
contents := self getItemsFromSelection.
|
|
3452 |
^ [
|
|
3453 |
(((contents detect:[:item| item lastSuffix = 'prj'] ifNone:[nil]) isNil))
|
|
3454 |
and:[((contents detect:[:item| item lastSuffix = 'st'] ifNone:[nil]) notNil)
|
|
3455 |
]]
|
|
3456 |
!
|
|
3457 |
|
|
3458 |
canDoTerminal
|
|
3459 |
|
|
3460 |
^ OperatingSystem isUNIXlike
|
|
3461 |
or:[OperatingSystem isMSWINDOWSlike]
|
|
3462 |
!
|
|
3463 |
|
|
3464 |
canDoTerminalAndSystemIsDOS
|
|
3465 |
|
|
3466 |
^ self canDoTerminal and:[OperatingSystem isMSWINDOWSlike]
|
|
3467 |
!
|
|
3468 |
|
|
3469 |
canDoTerminalAndSystemIsUnix
|
|
3470 |
|
|
3471 |
^ self canDoTerminal and:[OperatingSystem isUNIXlike]
|
|
3472 |
!
|
|
3473 |
|
|
3474 |
canReadAbbrevFile
|
|
3475 |
|
|
3476 |
|
|
3477 |
self currentFilesAreInSameDirectory ifFalse:[^ false].
|
|
3478 |
^ (self currentDirectories value first construct:'abbrev.stc') exists
|
|
3479 |
!
|
|
3480 |
|
|
3481 |
canRemoveFromSourcePath
|
|
3482 |
|
|
3483 |
^ false
|
|
3484 |
!
|
|
3485 |
|
|
3486 |
hasASN1
|
|
3487 |
^ [ OSI::ASN1Parser notNil
|
|
3488 |
and:[OSI::ASN1Parser isLoaded]]
|
|
3489 |
|
|
3490 |
!
|
|
3491 |
|
|
3492 |
hasASN1AndSelection
|
|
3493 |
^ [ self hasSelection value
|
|
3494 |
and:[self getFilesFromSelection size > 0
|
|
3495 |
and:[OSI::ASN1Parser notNil
|
|
3496 |
and:[OSI::ASN1Parser isLoaded]]]]
|
|
3497 |
!
|
|
3498 |
|
|
3499 |
hasCBrowser
|
|
3500 |
^ [ CBrowser::Browser notNil ]
|
|
3501 |
!
|
|
3502 |
|
|
3503 |
hasJava
|
|
3504 |
|
|
3505 |
^ [ JavaClassReader notNil
|
|
3506 |
and:[JavaClassReader isLoaded]]
|
|
3507 |
!
|
|
3508 |
|
|
3509 |
hasJavaAndSelection
|
|
3510 |
|
|
3511 |
^ [ self getFilesFromSelection size > 0
|
|
3512 |
and:[JavaClassReader notNil
|
|
3513 |
and:[JavaClassReader isLoaded]]]
|
|
3514 |
!
|
|
3515 |
|
|
3516 |
hasMP3Player
|
|
3517 |
|
|
3518 |
^ [ MP3PlayerApplication notNil
|
|
3519 |
or:[SaugFix::MP3PlayerApplication notNil ]]
|
|
3520 |
!
|
|
3521 |
|
|
3522 |
hasMP3PlayerAndSelection
|
|
3523 |
|
|
3524 |
^ [ self getFilesFromSelection size > 0
|
|
3525 |
and:[ self hasMP3Player value]]
|
|
3526 |
!
|
|
3527 |
|
|
3528 |
hasSlideShow
|
|
3529 |
|
|
3530 |
^ [CodingExamples_GUI::SlideShow notNil]
|
|
3531 |
!
|
|
3532 |
|
|
3533 |
hasSnapshotSelection
|
|
3534 |
|
|
3535 |
^ [
|
|
3536 |
| files |
|
|
3537 |
files := self getFilesFromSelection.
|
|
3538 |
((files size == 1)
|
|
3539 |
and:[ files first hasSuffix:'img' ])
|
|
3540 |
]
|
|
3541 |
!
|
|
3542 |
|
|
3543 |
hasZipFileSelected
|
|
3544 |
|
|
3545 |
^ [|sel item fn suff|
|
|
3546 |
|
|
3547 |
sel := self getItemsFromSelection.
|
|
3548 |
sel size == 1 ifTrue:[
|
|
3549 |
item := sel first.
|
|
3550 |
item notNil ifTrue:[
|
|
3551 |
suff := item suffix asLowercase.
|
|
3552 |
suff = 'zip' or:[suff = 'jar']
|
|
3553 |
] ifFalse:[
|
|
3554 |
false
|
|
3555 |
]
|
|
3556 |
] ifFalse:[
|
|
3557 |
false
|
|
3558 |
]
|
|
3559 |
]
|
|
3560 |
!
|
|
3561 |
|
|
3562 |
javaSupportLoaded
|
|
3563 |
|
|
3564 |
^ false
|
|
3565 |
! !
|
|
3566 |
|
|
3567 |
!AbstractFileBrowser methodsFor:'queries'!
|
|
3568 |
|
|
3569 |
initialCommandFor:fileName into:aBox
|
|
3570 |
"set a useful initial command for execute box."
|
|
3571 |
|
|
3572 |
|mime cmd select path suffix|
|
|
3573 |
|
|
3574 |
path := self getDirWithoutFileName:fileName.
|
|
3575 |
suffix := fileName asFilename suffix.
|
|
3576 |
DefaultCommandPerSuffix notNil ifTrue:[
|
|
3577 |
cmd := DefaultCommandPerSuffix at:suffix ifAbsent:nil.
|
|
3578 |
cmd notNil ifTrue:[
|
|
3579 |
aBox initialText:(cmd , ' ' , fileName baseName) selectFrom:1 to:cmd size.
|
|
3580 |
^ self
|
|
3581 |
].
|
|
3582 |
].
|
|
3583 |
mime := MIMETypes mimeTypeForSuffix:suffix.
|
|
3584 |
"/ mime notNil ifTrue:[
|
|
3585 |
"/ cmd := self initialCommandForMIME:mime file:path
|
|
3586 |
"/ ].
|
|
3587 |
|
|
3588 |
"/ XXX should be changed to take stuff from a config file
|
|
3589 |
"/ XXX or from resources.
|
|
3590 |
|
|
3591 |
(path type == #regular) ifTrue:[
|
|
3592 |
path isExecutableProgram ifTrue:[
|
|
3593 |
aBox initialText:(fileName , ' <arguments>').
|
|
3594 |
^ self
|
|
3595 |
].
|
|
3596 |
|
|
3597 |
select := true.
|
|
3598 |
|
|
3599 |
"some heuristics - my personal preferences ...
|
|
3600 |
(actually this should come from a configfile)"
|
|
3601 |
|
|
3602 |
(fileName endsWith:'akefile') ifTrue:[
|
|
3603 |
aBox initialText:'make target' selectFrom:6 to:11.
|
|
3604 |
^ self
|
|
3605 |
].
|
|
3606 |
|
|
3607 |
cmd := self class defaultCommandPerMIME at:mime ifAbsent:nil.
|
|
3608 |
cmd notNil ifTrue:[
|
|
3609 |
select := false
|
|
3610 |
].
|
|
3611 |
|
|
3612 |
cmd isNil ifTrue:[
|
|
3613 |
|
|
3614 |
suffix := path suffix.
|
|
3615 |
(suffix = 'C') ifTrue:[
|
|
3616 |
cmd := 'g++ -c %1'.
|
|
3617 |
select := 6.
|
|
3618 |
] ifFalse:[
|
|
3619 |
suffix := suffix asLowercase.
|
|
3620 |
|
|
3621 |
(suffix = 'taz') ifTrue:[
|
|
3622 |
aBox initialText:'zcat %1 | tar tvf -'.
|
|
3623 |
select := false.
|
|
3624 |
].
|
|
3625 |
(suffix = 'tar') ifTrue:[
|
|
3626 |
cmd := 'tar tvf %1'.
|
|
3627 |
select := 7.
|
|
3628 |
].
|
|
3629 |
(suffix = 'zoo') ifTrue:[
|
|
3630 |
cmd := 'zoo -list %1'.
|
|
3631 |
select := 9.
|
|
3632 |
].
|
|
3633 |
(suffix = 'zip') ifTrue:[
|
|
3634 |
cmd := 'unzip -l %1'.
|
|
3635 |
select := 8.
|
|
3636 |
].
|
|
3637 |
(suffix = 'jar') ifTrue:[
|
|
3638 |
cmd := 'unzip -l %1'.
|
|
3639 |
select := 8.
|
|
3640 |
].
|
|
3641 |
(suffix = 'z') ifTrue:[
|
|
3642 |
(fileName asLowercase endsWith:'tar.z') ifTrue:[
|
|
3643 |
cmd := 'zcat %1 | tar tvf -'.
|
|
3644 |
select := false.
|
|
3645 |
] ifFalse:[
|
|
3646 |
cmd := 'uncompress %1'
|
|
3647 |
].
|
|
3648 |
].
|
|
3649 |
(suffix = 'gz') ifTrue:[
|
|
3650 |
(fileName asLowercase endsWith:'tar.gz') ifTrue:[
|
|
3651 |
cmd := ('gunzip < %1 | tar tvf -' ).
|
|
3652 |
select := false.
|
|
3653 |
] ifFalse:[
|
|
3654 |
cmd := 'gunzip %1'.
|
|
3655 |
].
|
|
3656 |
].
|
|
3657 |
(suffix = 'html') ifTrue:[
|
|
3658 |
cmd := 'netscape %1'
|
|
3659 |
].
|
|
3660 |
(suffix = 'htm') ifTrue:[
|
|
3661 |
cmd := 'netscape %1'
|
|
3662 |
].
|
|
3663 |
(suffix = 'uue') ifTrue:[
|
|
3664 |
cmd := 'uudecode %1'
|
|
3665 |
].
|
|
3666 |
(suffix = 'c') ifTrue:[
|
|
3667 |
cmd := 'cc -c %1'.
|
|
3668 |
select := 5.
|
|
3669 |
].
|
|
3670 |
(suffix = 'cc') ifTrue:[
|
|
3671 |
cmd := 'g++ -c %1'.
|
|
3672 |
select := 6.
|
|
3673 |
].
|
|
3674 |
(suffix = 'xbm') ifTrue:[
|
|
3675 |
cmd := 'bitmap %1'
|
|
3676 |
].
|
|
3677 |
(suffix = 'ps') ifTrue:[
|
|
3678 |
cmd := 'ghostview %1'
|
|
3679 |
].
|
|
3680 |
((suffix = '1') or:[suffix = 'man']) ifTrue:[
|
|
3681 |
cmd := 'nroff -man %1'.
|
|
3682 |
select := 10.
|
|
3683 |
].
|
|
3684 |
].
|
|
3685 |
].
|
|
3686 |
|
|
3687 |
cmd isNil ifTrue:[
|
|
3688 |
DefaultCommandPerSuffix isNil ifTrue:[
|
|
3689 |
cmd := '<cmd>'
|
|
3690 |
] ifFalse:[
|
|
3691 |
cmd := DefaultCommandPerSuffix
|
|
3692 |
at:suffix
|
|
3693 |
ifAbsent:'<cmd>'.
|
|
3694 |
].
|
|
3695 |
cmd := cmd , ' %1'.
|
|
3696 |
].
|
|
3697 |
|
|
3698 |
cmd := cmd bindWith:fileName.
|
|
3699 |
select == false ifTrue:[
|
|
3700 |
aBox initialText:cmd
|
|
3701 |
] ifFalse:[
|
|
3702 |
select class == Interval ifTrue:[
|
|
3703 |
aBox initialText:cmd selectFrom:select start to:select stop
|
|
3704 |
] ifFalse:[
|
|
3705 |
select isInteger ifFalse:[
|
|
3706 |
select := (cmd indexOf:Character space ifAbsent:[cmd size + 1]) - 1.
|
|
3707 |
].
|
|
3708 |
aBox initialText:cmd selectFrom:1 to:select
|
|
3709 |
].
|
|
3710 |
]
|
|
3711 |
]
|
|
3712 |
!
|
|
3713 |
|
|
3714 |
isAbstractFileBrowser
|
|
3715 |
|
|
3716 |
^ true
|
|
3717 |
!
|
|
3718 |
|
|
3719 |
systemIsDOS
|
|
3720 |
|
|
3721 |
^ OperatingSystem isMSDOSlike
|
|
3722 |
!
|
|
3723 |
|
|
3724 |
systemIsUnix
|
|
3725 |
^ OperatingSystem isUNIXlike
|
|
3726 |
! !
|
|
3727 |
|
|
3728 |
!AbstractFileBrowser methodsFor:'queries-file'!
|
|
3729 |
|
|
3730 |
allItemsOfCurrentDirectory
|
|
3731 |
|
|
3732 |
^ self application:#DirectoryContentsBrowser do:#allItemsOfCurrentDirectory.
|
|
3733 |
!
|
|
3734 |
|
|
3735 |
anyFilesPresentWithSuffix:suffix
|
|
3736 |
|
|
3737 |
| directories |
|
|
3738 |
|
|
3739 |
directories := self currentDirectories value.
|
|
3740 |
directories do:[ : dir|
|
|
3741 |
(dir directoryContents do:[:f| (f asFilename suffix = suffix) ifTrue:[ ^ true]])
|
|
3742 |
].
|
|
3743 |
^ false.
|
|
3744 |
!
|
|
3745 |
|
|
3746 |
currentFilesAreInSameDirectory
|
|
3747 |
|
|
3748 |
^ (self currentDirectories value size == 1).
|
|
3749 |
!
|
|
3750 |
|
|
3751 |
currentFilesHasDirectories
|
|
3752 |
|
|
3753 |
^ self currentDirectories value notEmpty.
|
|
3754 |
!
|
|
3755 |
|
|
3756 |
fileListIsEmpty
|
|
3757 |
|
|
3758 |
^ self application:#DirectoryContentsBrowser do:#fileListIsEmpty.
|
|
3759 |
!
|
|
3760 |
|
|
3761 |
fileListIsNotEmpty
|
|
3762 |
|
|
3763 |
^ self fileListIsEmpty not.
|
|
3764 |
!
|
|
3765 |
|
|
3766 |
fileName:aFilename1 startsWith:aFilename2
|
|
3767 |
|
|
3768 |
" check if aFilename2 starts with the same directories like aFilename1 "
|
|
3769 |
|
|
3770 |
| file1 file2 |
|
|
3771 |
|
|
3772 |
aFilename2 isNil ifTrue:[ ^ false].
|
|
3773 |
file1 := aFilename1 asFilename.
|
|
3774 |
file2 := aFilename2 asFilename.
|
|
3775 |
file2 isRootDirectory ifTrue:[ ^ true].
|
|
3776 |
((file1 isDirectory)
|
|
3777 |
and:[(file2 isDirectory)
|
|
3778 |
and:[file1 directory = file2 directory]]) ifTrue:[
|
|
3779 |
^ file1 baseName = file2 baseName
|
|
3780 |
].
|
|
3781 |
^ aFilename1 startsWith:aFilename2.
|
|
3782 |
!
|
|
3783 |
|
|
3784 |
getAllFilesAsStringCollection
|
|
3785 |
|
|
3786 |
^ self application:#DirectoryContentsBrowser do:#getAllFilesAsStringCollection.
|
|
3787 |
!
|
|
3788 |
|
|
3789 |
getBestDirectory
|
|
3790 |
|
|
3791 |
|selFiles stringCol firstPre|
|
|
3792 |
|
|
3793 |
selFiles := self currentDirectories value.
|
|
3794 |
selFiles isEmpty ifTrue:[^ nil].
|
|
3795 |
selFiles size == 1 ifTrue:[^ selFiles first].
|
|
3796 |
stringCol := (selFiles collect:[: file| file asString]) asOrderedCollection.
|
|
3797 |
firstPre := stringCol at:1.
|
|
3798 |
stringCol from:2 do:[:el|
|
|
3799 |
firstPre := firstPre commonPrefixWith:el.
|
|
3800 |
].
|
|
3801 |
(firstPre endsWith:(OperatingSystem fileSeparator)) ifTrue:[
|
|
3802 |
firstPre removeLast.
|
|
3803 |
].
|
|
3804 |
^ firstPre asFilename
|
|
3805 |
!
|
|
3806 |
|
|
3807 |
getBestFile
|
|
3808 |
|
|
3809 |
|selFiles stringCol firtsPre|
|
|
3810 |
|
|
3811 |
selFiles := self currentFileNameHolder value.
|
|
3812 |
selFiles isEmpty ifTrue:[^ nil].
|
|
3813 |
stringCol := selFiles collect:[: file| file asString].
|
|
3814 |
firtsPre := stringCol at:1.
|
|
3815 |
stringCol from:2 do:[:el|
|
|
3816 |
firtsPre := firtsPre commonPrefixWith:el.
|
|
3817 |
].
|
|
3818 |
^ firtsPre asFilename
|
|
3819 |
!
|
|
3820 |
|
|
3821 |
getDirWithoutFileName:aFileName
|
|
3822 |
|
|
3823 |
| dir |
|
|
3824 |
aFileName isNil ifTrue:[
|
|
3825 |
^ aFileName.
|
|
3826 |
].
|
|
3827 |
dir := aFileName asFilename.
|
|
3828 |
dir isDirectory ifFalse:[
|
|
3829 |
dir := dir directory.
|
|
3830 |
].
|
|
3831 |
^ dir.
|
|
3832 |
!
|
|
3833 |
|
|
3834 |
getDirectoriesForFileList:aFileCol
|
|
3835 |
|
|
3836 |
^ ((aFileCol collect:[:file| self getDirWithoutFileName:file]) asSet).
|
|
3837 |
!
|
|
3838 |
|
|
3839 |
getDirectoriesFromSelection
|
|
3840 |
|
|
3841 |
^ self currentDirectories value.
|
|
3842 |
!
|
|
3843 |
|
|
3844 |
getFileItemsFromSelection
|
|
3845 |
|
|
3846 |
^ self application:#DirectoryContentsBrowser do:#getFileItemsFromSelection.
|
|
3847 |
!
|
|
3848 |
|
|
3849 |
getFilesFromSelection
|
|
3850 |
|
|
3851 |
| files |
|
|
3852 |
files := self currentFileNameHolder value.
|
|
3853 |
^ (files select:[: file | file isDirectory not]).
|
|
3854 |
!
|
|
3855 |
|
|
3856 |
getFirstFileFromSelection
|
|
3857 |
|
|
3858 |
| files |
|
|
3859 |
files := self currentFileNameHolder value.
|
|
3860 |
^ (files detect:[: file | file isDirectory not] ifNone:[nil]).
|
|
3861 |
!
|
|
3862 |
|
|
3863 |
getFirstItemFromSelection
|
|
3864 |
|
|
3865 |
^ self application:#DirectoryContentsBrowser do:#getFirstItemFromSelection.
|
|
3866 |
!
|
|
3867 |
|
|
3868 |
getInfoItem
|
|
3869 |
"get filename of a description-file (.dir.info, README etc.);
|
|
3870 |
This file is automatically shown when a directory is enterred.
|
|
3871 |
You can add more names below if you like."
|
|
3872 |
|
|
3873 |
|directories|
|
|
3874 |
|
|
3875 |
directories := self getDirectoriesFromSelection.
|
|
3876 |
(directories size ~= 1) ifTrue:[ ^ nil].
|
|
3877 |
|
|
3878 |
#(
|
|
3879 |
'.dir.info'
|
|
3880 |
'README'
|
|
3881 |
'ReadMe'
|
|
3882 |
'Readme'
|
|
3883 |
'readme'
|
|
3884 |
'read.me'
|
|
3885 |
'Read.me'
|
|
3886 |
'READ.ME'
|
|
3887 |
'README.TXT'
|
|
3888 |
'readme.txt'
|
|
3889 |
'Readme.txt'
|
|
3890 |
'Info.txt'
|
|
3891 |
'info.txt'
|
|
3892 |
'INFO.TXT'
|
|
3893 |
) do:[:f |
|
|
3894 |
|n|
|
|
3895 |
n := (directories first) construct:f.
|
|
3896 |
(n isReadable and:[n isDirectory not]) ifTrue:[
|
|
3897 |
^ (DirectoryContentsBrowser itemClass with:n) .
|
|
3898 |
]
|
|
3899 |
].
|
|
3900 |
^ nil
|
|
3901 |
!
|
|
3902 |
|
|
3903 |
getItemsFromSelection
|
|
3904 |
|
|
3905 |
^ self application:#DirectoryContentsBrowser do:#getItemsFromSelection.
|
|
3906 |
! !
|
|
3907 |
|
|
3908 |
!AbstractFileBrowser methodsFor:'startup & release'!
|
|
3909 |
|
|
3910 |
makeDependent
|
|
3911 |
|
|
3912 |
"
|
|
3913 |
never invoked here because there is no instance
|
|
3914 |
"
|
|
3915 |
!
|
|
3916 |
|
|
3917 |
masterApplication:anApplication
|
|
3918 |
|
|
3919 |
masterApplication isNil ifTrue:[
|
|
3920 |
(anApplication notNil and:[anApplication askFor:#isAbstractFileBrowser]) ifTrue:[
|
|
3921 |
super masterApplication:anApplication.
|
|
3922 |
aspects := anApplication aspects
|
|
3923 |
] ifFalse:[
|
|
3924 |
aspects isNil ifTrue:[
|
|
3925 |
aspects := IdentityDictionary new.
|
|
3926 |
aspects at:#applications put:(IdentityDictionary new).
|
|
3927 |
]
|
|
3928 |
].
|
|
3929 |
self applications at:(self className) put:self.
|
|
3930 |
self makeDependent.
|
|
3931 |
].
|
|
3932 |
!
|
|
3933 |
|
|
3934 |
postOpenWith:aBuilder
|
|
3935 |
|
|
3936 |
super postOpenWith:aBuilder.
|
|
3937 |
! !
|
|
3938 |
|
|
3939 |
!AbstractFileBrowser::Clipboard methodsFor:'accessing'!
|
|
3940 |
|
|
3941 |
files
|
|
3942 |
"return the value of the instance variable 'files' (automatically generated)"
|
|
3943 |
|
|
3944 |
^ files
|
|
3945 |
!
|
|
3946 |
|
|
3947 |
files:something
|
|
3948 |
"set the value of the instance variable 'files' (automatically generated)"
|
|
3949 |
|
|
3950 |
files := something.
|
|
3951 |
!
|
|
3952 |
|
|
3953 |
method
|
|
3954 |
"return the value of the instance variable 'method' (automatically generated)"
|
|
3955 |
|
|
3956 |
^ method
|
|
3957 |
!
|
|
3958 |
|
|
3959 |
method:something
|
|
3960 |
"set the value of the instance variable 'method' (automatically generated)"
|
|
3961 |
|
|
3962 |
method := something.
|
|
3963 |
! !
|
|
3964 |
|
|
3965 |
!AbstractFileBrowser::CodeExecutionLock methodsFor:'accessing'!
|
|
3966 |
|
|
3967 |
locked
|
|
3968 |
"return the value of the instance variable 'locked' (automatically generated)"
|
|
3969 |
|
|
3970 |
locked isNil ifTrue:[
|
|
3971 |
locked := false.
|
|
3972 |
].
|
|
3973 |
^ locked
|
|
3974 |
! !
|
|
3975 |
|
|
3976 |
!AbstractFileBrowser::CodeExecutionLock methodsFor:'actions'!
|
|
3977 |
|
|
3978 |
doIfUnLocked:aBlock
|
|
3979 |
|
|
3980 |
self locked ifFalse:[
|
|
3981 |
aBlock value.
|
|
3982 |
].
|
|
3983 |
!
|
|
3984 |
|
|
3985 |
doLocked:aBlock
|
|
3986 |
|
|
3987 |
locked := true.
|
|
3988 |
aBlock value.
|
|
3989 |
locked := false.
|
|
3990 |
! !
|
|
3991 |
|
|
3992 |
!AbstractFileBrowser::DirectoryHistory class methodsFor:'attributes access'!
|
|
3993 |
|
|
3994 |
HistorySize
|
|
3995 |
|
|
3996 |
^ 20
|
|
3997 |
! !
|
|
3998 |
|
|
3999 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'actions'!
|
|
4000 |
|
|
4001 |
doBack
|
|
4002 |
|
|
4003 |
self isEmpty ifTrue:[ ^ nil ].
|
|
4004 |
index > 1 ifTrue:[
|
|
4005 |
index := index - 1.
|
|
4006 |
^ self at:index ifAbsent:nil.
|
|
4007 |
].
|
|
4008 |
^ nil
|
|
4009 |
!
|
|
4010 |
|
|
4011 |
doForward
|
|
4012 |
|
|
4013 |
self isEmpty ifTrue:[ ^ nil ].
|
|
4014 |
index < self size ifTrue:[
|
|
4015 |
index := index + 1.
|
|
4016 |
^ self at:index ifAbsent:nil.
|
|
4017 |
].
|
|
4018 |
^ nil
|
|
4019 |
!
|
|
4020 |
|
|
4021 |
setIndexTo:aFile
|
|
4022 |
|
|
4023 |
index := self indexOf:aFile.
|
|
4024 |
! !
|
|
4025 |
|
|
4026 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'adding & removing'!
|
|
4027 |
|
|
4028 |
addFile:aFilename
|
|
4029 |
|
|
4030 |
index notNil ifTrue:[
|
|
4031 |
((self at:index) = aFilename) ifTrue:[^ self].
|
|
4032 |
].
|
|
4033 |
(self includes:aFilename) ifTrue:[
|
|
4034 |
"/ remove the filename to put it later after index
|
|
4035 |
self remove:aFilename.
|
|
4036 |
].
|
|
4037 |
self size > self class HistorySize ifTrue:[
|
|
4038 |
self removeFirst.
|
|
4039 |
].
|
|
4040 |
index isNil ifTrue:[
|
|
4041 |
self add:aFilename.
|
|
4042 |
index := 1.
|
|
4043 |
] ifFalse:[
|
|
4044 |
self add:aFilename afterIndex:index.
|
|
4045 |
index := index + 1.
|
|
4046 |
].
|
|
4047 |
!
|
|
4048 |
|
|
4049 |
remove:aFilename
|
|
4050 |
|
|
4051 |
| indexOfFile |
|
|
4052 |
|
|
4053 |
indexOfFile := self indexOf:aFilename.
|
|
4054 |
index >= indexOfFile ifTrue:[
|
|
4055 |
index := index - 1.
|
|
4056 |
].
|
|
4057 |
super remove:aFilename.
|
|
4058 |
!
|
|
4059 |
|
|
4060 |
removeBack
|
|
4061 |
|
|
4062 |
index == 1 ifTrue:[^ self].
|
|
4063 |
self removeFromIndex:1 toIndex:index - 1.
|
|
4064 |
index := 1.
|
|
4065 |
!
|
|
4066 |
|
|
4067 |
removeFirst
|
|
4068 |
|
|
4069 |
super removeFirst.
|
|
4070 |
index ~= 1 ifTrue:[
|
|
4071 |
index := index - 1
|
|
4072 |
].
|
|
4073 |
!
|
|
4074 |
|
|
4075 |
removeForward
|
|
4076 |
|
|
4077 |
self removeFromIndex:(index + 1) toIndex:(self size).
|
|
4078 |
! !
|
|
4079 |
|
|
4080 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'queries'!
|
|
4081 |
|
|
4082 |
canBack
|
|
4083 |
|
|
4084 |
^ (index notNil and:[index > 1])
|
|
4085 |
!
|
|
4086 |
|
|
4087 |
canForward
|
|
4088 |
|
|
4089 |
^ (index notNil and:[(index < self size)])
|
|
4090 |
! !
|
|
4091 |
|
|
4092 |
!AbstractFileBrowser::FilenameHistory class methodsFor:'attributes access'!
|
|
4093 |
|
|
4094 |
FilenameHistorySize
|
|
4095 |
|
|
4096 |
^ 20
|
|
4097 |
!
|
|
4098 |
|
|
4099 |
HistorySize
|
|
4100 |
|
|
4101 |
^ 20
|
|
4102 |
! !
|
|
4103 |
|
|
4104 |
!AbstractFileBrowser::FilenameHistory methodsFor:'adding & removing'!
|
|
4105 |
|
|
4106 |
add:aApplItem
|
|
4107 |
|
|
4108 |
super add:aApplItem.
|
|
4109 |
(self size > self class FilenameHistorySize) ifTrue:[
|
|
4110 |
self removeLast.
|
|
4111 |
]
|
|
4112 |
! !
|
|
4113 |
|
|
4114 |
!AbstractFileBrowser::SaveAspectItem class methodsFor:'instance creation'!
|
|
4115 |
|
|
4116 |
withValue:aValue isHolder:aBoolean
|
|
4117 |
|
|
4118 |
| instance |
|
|
4119 |
|
|
4120 |
instance := self basicNew.
|
|
4121 |
instance value:aValue.
|
|
4122 |
instance isHolder:aBoolean.
|
|
4123 |
^ instance
|
|
4124 |
! !
|
|
4125 |
|
|
4126 |
!AbstractFileBrowser::SaveAspectItem methodsFor:'accessing'!
|
|
4127 |
|
|
4128 |
isHolder
|
|
4129 |
"return the value of the instance variable 'isHolder' (automatically generated)"
|
|
4130 |
|
|
4131 |
^ isHolder
|
|
4132 |
!
|
|
4133 |
|
|
4134 |
isHolder:something
|
|
4135 |
"set the value of the instance variable 'isHolder' (automatically generated)"
|
|
4136 |
|
|
4137 |
isHolder := something.
|
|
4138 |
!
|
|
4139 |
|
|
4140 |
value
|
|
4141 |
"return the value of the instance variable 'value' (automatically generated)"
|
|
4142 |
|
|
4143 |
^ value
|
|
4144 |
!
|
|
4145 |
|
|
4146 |
value:something
|
|
4147 |
"set the value of the instance variable 'value' (automatically generated)"
|
|
4148 |
|
|
4149 |
value := something.
|
|
4150 |
! !
|
|
4151 |
|
|
4152 |
!AbstractFileBrowser class methodsFor:'documentation'!
|
|
4153 |
|
|
4154 |
version
|
|
4155 |
^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.1 2002-09-25 07:58:48 penk Exp $'
|
|
4156 |
! !
|