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