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