3892
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
"{ Package: 'stx:libtool' }"
|
|
14 |
|
|
15 |
AbstractFileBrowser subclass:#FileBrowserV2
|
3914
|
16 |
instanceVariableNames:'fileEntryFieldHolder'
|
|
17 |
classVariableNames:'Icons'
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'Interface-Tools-File'
|
3892
|
20 |
!
|
|
21 |
|
|
22 |
!FileBrowserV2 class methodsFor:'documentation'!
|
|
23 |
|
|
24 |
copyright
|
|
25 |
"
|
|
26 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
|
27 |
All Rights Reserved
|
|
28 |
|
|
29 |
This software is furnished under a license and may be used
|
|
30 |
only in accordance with the terms of that license and with the
|
|
31 |
inclusion of the above copyright notice. This software may not
|
|
32 |
be provided or otherwise made available to, or used by, any
|
|
33 |
other person. No title to or ownership of the software is
|
|
34 |
hereby transferred.
|
|
35 |
"
|
|
36 |
!
|
|
37 |
|
|
38 |
documentation
|
|
39 |
"
|
|
40 |
FileBrowserV2 is based on Filebrowser created by Claus Gittinger
|
|
41 |
|
|
42 |
WARNING: files edited with FileBrowser will have leading spaces (multiple-8)
|
|
43 |
being replaced by tabs. If tabs are to be preserved at other
|
|
44 |
positions (for example, sendmail-config files) they will be
|
|
45 |
corrupt after being written.
|
|
46 |
|
|
47 |
[instance variables]:
|
|
48 |
|
|
49 |
checkDelta <Integer> number of seconds of check interval
|
|
50 |
(looks ever so often if shown directory
|
|
51 |
has changed). You may make this number
|
|
52 |
higher, if your network-times are
|
|
53 |
incorrect and thus, the filebrowser
|
|
54 |
checks too often.
|
|
55 |
|
|
56 |
compressTabs <Boolean> if true, leading spaces will be
|
|
57 |
replaced by tabs when saving text
|
|
58 |
|
|
59 |
some of the defaults (long/short list etc.) can be set by the resource file;
|
|
60 |
see FileBrowser>>initialize for more details..
|
|
61 |
|
|
62 |
[author:]
|
|
63 |
Christian Penk
|
|
64 |
|
|
65 |
[start with:]
|
|
66 |
FileBrowserV2 open
|
|
67 |
"
|
|
68 |
! !
|
|
69 |
|
|
70 |
!FileBrowserV2 class methodsFor:'instance creation'!
|
|
71 |
|
|
72 |
on:aDirectoryPath
|
|
73 |
"return a new FileBrowserV2 in a pathname"
|
|
74 |
|
3907
|
75 |
| instance files|
|
3892
|
76 |
instance := self new.
|
3907
|
77 |
files := aDirectoryPath isCollection ifTrue:[aDirectoryPath] ifFalse:[(Array with:aDirectoryPath)].
|
|
78 |
instance currentFileNameHolder value:files.
|
3892
|
79 |
^ instance
|
|
80 |
|
|
81 |
"/ | instance builder|
|
|
82 |
"/
|
|
83 |
"/ builder := super open.
|
|
84 |
"/ instance := builder application.
|
|
85 |
"/ instance currentFileNameHolder value:aDirectoryPath.
|
|
86 |
"/ ^ instance
|
|
87 |
|
|
88 |
"
|
|
89 |
(FileBrowserV2 on:'/usr/local/bin') open
|
|
90 |
(FileBrowserV2 on:'/etc' ) open
|
|
91 |
(FileBrowserV2 on:'..' ) open
|
|
92 |
(FileBrowserV2 on:'.' ) open
|
|
93 |
"
|
|
94 |
!
|
|
95 |
|
|
96 |
open
|
|
97 |
"start a new FileBrowserV2"
|
|
98 |
|
|
99 |
| instance |
|
|
100 |
instance := self new.
|
|
101 |
instance open.
|
|
102 |
^ instance
|
|
103 |
"
|
|
104 |
FileBrowserV2 openOn:'/etc' withExtent:800@600
|
|
105 |
FileBrowserV2 openOn:'..' withExtent:200@300
|
|
106 |
FileBrowserV2 openOn:'.' withExtent:1024@768
|
|
107 |
"
|
|
108 |
!
|
|
109 |
|
|
110 |
openOn:aDirectoryPath
|
|
111 |
"start a new FileBrowserV2 in a pathname"
|
|
112 |
|
|
113 |
| instance|
|
|
114 |
instance := self on:aDirectoryPath asFilename.
|
|
115 |
^ instance open.
|
|
116 |
"
|
|
117 |
FileBrowserV2 openOn:'/etc'
|
|
118 |
FileBrowserV2 openOn:'..'
|
|
119 |
FileBrowserV2 openOn:'.'
|
|
120 |
"
|
|
121 |
!
|
|
122 |
|
|
123 |
openOn:aDirectoryPath withExtent:extent
|
|
124 |
"start a new FileBrowserV2 in a pathname"
|
|
125 |
|
|
126 |
| instance builder|
|
|
127 |
instance := self on:aDirectoryPath.
|
|
128 |
builder := instance open.
|
|
129 |
builder window extent:extent.
|
|
130 |
^ instance
|
|
131 |
"
|
|
132 |
FileBrowserV2 openOn:'/etc' withExtent:800@600
|
|
133 |
FileBrowserV2 openOn:'..' withExtent:200@300
|
|
134 |
FileBrowserV2 openOn:'.' withExtent:1024@768
|
|
135 |
"
|
|
136 |
!
|
|
137 |
|
|
138 |
openWithAspects:someAspects withExtent:extent
|
|
139 |
"start a new FileBrowserV2 in a pathname"
|
|
140 |
|
|
141 |
|dir clone|
|
|
142 |
|
|
143 |
dir := someAspects at:#currentFileNameHolder ifAbsent:nil.
|
|
144 |
clone := self openOn:(dir value) withExtent:extent.
|
|
145 |
|
|
146 |
"
|
|
147 |
FileBrowserV2 openOn:'/etc' withExtent:800@600
|
|
148 |
FileBrowserV2 openOn:'..' withExtent:200@300
|
|
149 |
FileBrowserV2 openOn:'.' withExtent:1024@768
|
|
150 |
"
|
|
151 |
! !
|
|
152 |
|
|
153 |
!FileBrowserV2 class methodsFor:'class initialization'!
|
|
154 |
|
|
155 |
clearHistoryIcon
|
|
156 |
^ Icon deleteIcon
|
|
157 |
!
|
|
158 |
|
|
159 |
initialize
|
|
160 |
|
|
161 |
self installInLauncher.
|
|
162 |
!
|
|
163 |
|
|
164 |
initializeDefaultCommands
|
|
165 |
DefaultCommandPerMIME := Dictionary new.
|
|
166 |
|
|
167 |
DefaultCommandPerMIME at:'application/x-tar-compressed' put:'gunzip < %1 | tar tvf -'.
|
|
168 |
DefaultCommandPerMIME at:'application/pdf' put:'acroread %1'.
|
|
169 |
|
|
170 |
"
|
|
171 |
self initializeDefaultCommands
|
|
172 |
"
|
|
173 |
!
|
|
174 |
|
|
175 |
installInLauncher
|
|
176 |
"add myself to the launcher menu and toolBar"
|
|
177 |
|
3914
|
178 |
|menuItem icon action currentLauncher|
|
3892
|
179 |
|
|
180 |
FileBrowserV2 isNil ifTrue:[^ self].
|
|
181 |
|
|
182 |
action := [FileBrowserV2 open].
|
|
183 |
|
3901
|
184 |
icon := NewLauncher startNewFileBrowserIcon. "/ self defaultIcon magnifiedTo:28@28.
|
3892
|
185 |
|
|
186 |
menuItem := MenuItem new
|
|
187 |
label: 'FileBrowser V2';
|
|
188 |
value: action;
|
|
189 |
isButton: false;
|
|
190 |
labelImage: (LabelAndIcon icon:icon string:'FileBrowser V2');
|
|
191 |
nameKey: #fileBrowserV2;
|
|
192 |
activeHelpKey: #fileBrowserV2;
|
|
193 |
submenuChannel: #menuFileHistory;
|
|
194 |
showBusyCursorWhilePerforming:true.
|
|
195 |
|
|
196 |
NewLauncher addMenuItem:menuItem in:'menu.file' position:#( #before #fileBrowser) space:true.
|
|
197 |
|
|
198 |
menuItem := MenuItem new
|
|
199 |
label: 'FileBrowser V2';
|
|
200 |
value: action;
|
|
201 |
isButton: true;
|
|
202 |
labelImage: icon;
|
|
203 |
nameKey: #fileBrowserV2;
|
|
204 |
activeHelpKey: #fileBrowserV2;
|
|
205 |
submenuChannel: #menuFileHistory;
|
|
206 |
showBusyCursorWhilePerforming:true.
|
|
207 |
|
|
208 |
NewLauncher addMenuItem:menuItem in:'toolbar' position:#( #before #fileBrowser) space:false.
|
|
209 |
|
3918
|
210 |
currentLauncher := NewLauncher current.
|
3914
|
211 |
currentLauncher notNil ifTrue:[
|
|
212 |
currentLauncher fileBrowserItemVisible value:false
|
|
213 |
].
|
3908
|
214 |
|
3892
|
215 |
"
|
|
216 |
self installInLauncher
|
|
217 |
self removeFromLauncher
|
|
218 |
"
|
|
219 |
!
|
|
220 |
|
|
221 |
removeFromLauncher
|
|
222 |
"/
|
|
223 |
"/ remove myself from the launcher menu
|
|
224 |
"/
|
|
225 |
|
3914
|
226 |
|currentLauncher|
|
|
227 |
|
3892
|
228 |
NewLauncher isNil ifTrue:[^ self].
|
3908
|
229 |
NewLauncher removeUserTool:#fileBrowserV2.
|
3918
|
230 |
currentLauncher := NewLauncher current.
|
3914
|
231 |
currentLauncher notNil ifTrue:[
|
|
232 |
currentLauncher fileBrowserItemVisible value:false
|
|
233 |
].
|
3892
|
234 |
|
|
235 |
"
|
|
236 |
self removeFromLauncher
|
|
237 |
"
|
|
238 |
! !
|
|
239 |
|
|
240 |
!FileBrowserV2 class methodsFor:'defaults'!
|
|
241 |
|
|
242 |
entryFieldEndStringForMultipleSelection
|
|
243 |
|
|
244 |
^ ('[*]')
|
|
245 |
! !
|
|
246 |
|
|
247 |
!FileBrowserV2 class methodsFor:'help specs'!
|
|
248 |
|
|
249 |
flyByHelpSpec
|
|
250 |
<resource: #help>
|
|
251 |
|
|
252 |
|spec|
|
|
253 |
|
|
254 |
spec := super flyByHelpSpec addPairsFrom:#(
|
|
255 |
|
|
256 |
#addTerminal
|
|
257 |
'Shell Terminal'
|
|
258 |
|
|
259 |
#searchFile
|
|
260 |
'Search a File'
|
|
261 |
|
|
262 |
#directoryUp
|
|
263 |
'Up'
|
|
264 |
|
|
265 |
#directoryBack
|
|
266 |
'Back'
|
|
267 |
|
|
268 |
#copyFile
|
|
269 |
'CopyFile'
|
|
270 |
|
|
271 |
#cutFile
|
|
272 |
'CutFile'
|
|
273 |
|
|
274 |
#fileHome
|
|
275 |
'Home'
|
|
276 |
|
|
277 |
#pasteFile
|
|
278 |
'PasteFile'
|
|
279 |
|
|
280 |
#deleteFile
|
|
281 |
'DeleteFile'
|
|
282 |
|
|
283 |
#fileIn
|
|
284 |
'FileIn'
|
|
285 |
|
|
286 |
#directoryForward
|
|
287 |
'Forward'
|
|
288 |
|
|
289 |
#directoryHistory
|
|
290 |
'Directory'
|
|
291 |
|
|
292 |
#fileHistory
|
|
293 |
'History'
|
|
294 |
|
|
295 |
#hideToolBar
|
|
296 |
'Hide Toolbar'
|
|
297 |
|
|
298 |
#hideFilenameEntryField
|
|
299 |
'Hide Filename Field'
|
|
300 |
|
|
301 |
).
|
|
302 |
|
|
303 |
^ spec.
|
|
304 |
! !
|
|
305 |
|
|
306 |
!FileBrowserV2 class methodsFor:'icon'!
|
|
307 |
|
|
308 |
defaultIcon
|
|
309 |
"This resource specification was automatically generated
|
|
310 |
by the ImageEditor of ST/X."
|
|
311 |
|
|
312 |
"Do not manually edit this!! If it is corrupted,
|
|
313 |
the ImageEditor may not be able to read the specification."
|
|
314 |
|
|
315 |
"
|
|
316 |
self defaultIcon inspect
|
|
317 |
ImageEditor openOnClass:self andSelector:#defaultIcon
|
|
318 |
"
|
|
319 |
|
|
320 |
<resource: #image>
|
|
321 |
|
|
322 |
^Icon
|
|
323 |
constantNamed:#'FileBrowserV2 class defaultIcon'
|
|
324 |
ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
325 |
@@@@@@@@@@@@@@@@@@@@CLA&Y&Y&Y&X@@ADP@@@L0F@@@@@@A @ADAD@@@3@XN;.;.8F@ADPDQ@@CLA ;.@@@@@@D@@@D@@L0FC.8O[6=/@QDADP@@3@X@;
|
|
326 |
[6=/[0DPDP@@CLA DNC6<@@F<ADP@@@L0F@A@F= [0= @@@@@@3@X@@P=/[6=/@@@@@@CLA @@A/[6=/X@@@@@@L0FC0@O[6=/[0@@@@@@3@XF<@@@@@@@@@
|
|
327 |
@@@@CLA = @@@@@@@@@@@@@L0FA/[6=/A @@@@@@@@3@XO[6=/XF@@@@@@@@CLA @@@@@@X@@@@@@@@L0FY&Y&Y&Y @@@@@@@@C@Y&Y&Y&Y&@@@@@@@@@@@@
|
|
328 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
|
329 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C @b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
|
|
330 |
O??# C??9<@??>? O???<C????@????0O???8C???<@???>@O??<@C???@@???0@O??<@C??8@@??>@@O?? @C??8@@??>@@G?? @@??8@@@@@@@G.P=0AAD
|
|
331 |
HP@PQBD@GDP8 AADHD@PQBA@DN^=0@@a') ; yourself); yourself]
|
|
332 |
!
|
|
333 |
|
|
334 |
hideFilenameEntryFieldIcon
|
|
335 |
<resource: #programImage>
|
|
336 |
|
|
337 |
^ ToolbarIconLibrary hideToolbarIconH14
|
|
338 |
!
|
|
339 |
|
|
340 |
hideToolBarIcon
|
|
341 |
<resource: #programImage>
|
|
342 |
|
|
343 |
^ ToolbarIconLibrary hideToolbarIconH26
|
|
344 |
! !
|
|
345 |
|
|
346 |
!FileBrowserV2 class methodsFor:'interface specs'!
|
|
347 |
|
|
348 |
windowSpec
|
|
349 |
"This resource specification was automatically generated
|
|
350 |
by the UIPainter of ST/X."
|
|
351 |
|
|
352 |
"Do not manually edit this!! If it is corrupted,
|
|
353 |
the UIPainter may not be able to read the specification."
|
|
354 |
|
|
355 |
"
|
|
356 |
UIPainter new openOnClass:FileBrowserV2 andSelector:#windowSpec
|
|
357 |
FileBrowserV2 new openInterface:#windowSpec
|
|
358 |
FileBrowserV2 open
|
|
359 |
"
|
|
360 |
|
|
361 |
<resource: #canvas>
|
|
362 |
|
|
363 |
^
|
|
364 |
#(#FullSpec
|
|
365 |
#name: #windowSpec
|
|
366 |
#window:
|
|
367 |
#(#WindowSpec
|
|
368 |
#label: #FileBrowser
|
|
369 |
#name: #FileBrowser
|
|
370 |
#min: #(#Point 10 10)
|
|
371 |
#max: #(#Point 1152 864)
|
|
372 |
#bounds: #(#Rectangle 16 42 816 642)
|
|
373 |
#menu: #mainMenu
|
|
374 |
)
|
|
375 |
#component:
|
|
376 |
#(#SpecCollection
|
|
377 |
#collection: #(
|
|
378 |
#(#ViewSpec
|
|
379 |
#name: 'ToolbarBox'
|
|
380 |
#layout: #(#LayoutFrame 0 0 0 0 0 1 30 0)
|
|
381 |
#level: 0
|
|
382 |
#visibilityChannel: #toolBarVisibleHolder
|
|
383 |
#component:
|
|
384 |
#(#SpecCollection
|
|
385 |
#collection: #(
|
|
386 |
#(#ActionButtonSpec
|
|
387 |
#label: 'hideToolBarIcon'
|
|
388 |
#name: 'HideToolBarButton'
|
|
389 |
#layout: #(#LayoutFrame 0 0 0 0 13 0 30 0)
|
|
390 |
#activeHelpKey: #hideToolBar
|
|
391 |
#hasCharacterOrientedLabel: false
|
|
392 |
#translateLabel: true
|
|
393 |
#model: #hideToolbar
|
|
394 |
#postBuildCallback: #hideToolBarButtonCreated:
|
|
395 |
)
|
|
396 |
#(#MenuPanelSpec
|
|
397 |
#name: 'ToolBar'
|
|
398 |
#layout: #(#LayoutFrame 13 0 0 0 0 1 30 0)
|
|
399 |
#menu: #toolBarMainMenu
|
|
400 |
#textDefault: true
|
|
401 |
)
|
|
402 |
)
|
|
403 |
|
|
404 |
)
|
|
405 |
)
|
|
406 |
#(#ViewSpec
|
|
407 |
#name: 'FilenameEntryFieldBox'
|
|
408 |
#layout: #(#LayoutFrame 0 0 30 0 0 1 55 0)
|
|
409 |
#level: 0
|
|
410 |
#visibilityChannel: #filenameEntryFieldVisibleHolder
|
|
411 |
#component:
|
|
412 |
#(#SpecCollection
|
|
413 |
#collection: #(
|
|
414 |
#(#ActionButtonSpec
|
|
415 |
#label: 'hideFilenameEntryFieldIcon'
|
|
416 |
#name: 'HideFilenameEntryFieldButton'
|
|
417 |
#layout: #(#LayoutFrame 0 0 0 0 13 0 0 1)
|
|
418 |
#activeHelpKey: #hideFilenameEntryField
|
|
419 |
#hasCharacterOrientedLabel: false
|
|
420 |
#translateLabel: true
|
|
421 |
#model: #hideFilenameEntryField
|
|
422 |
#postBuildCallback: #hideFilenameEntryFieldButtonCreated:
|
|
423 |
)
|
|
424 |
#(#ViewSpec
|
|
425 |
#name: 'Box1'
|
|
426 |
#layout: #(#LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0)
|
|
427 |
#level: 1
|
|
428 |
#component:
|
|
429 |
#(#SpecCollection
|
|
430 |
#collection: #(
|
|
431 |
#(#VariableHorizontalPanelSpec
|
|
432 |
#name: 'VariableHorizontalPanel1'
|
|
433 |
#layout: #(#LayoutFrame 1 0.0 1 0.0 -1 1.0 -1 1.0)
|
|
434 |
#level: 0
|
|
435 |
#showHandle: true
|
|
436 |
#component:
|
|
437 |
#(#SpecCollection
|
|
438 |
#collection: #(
|
|
439 |
#(#FilenameInputFieldSpec
|
|
440 |
#name: 'FilenameEntryField'
|
|
441 |
#level: 1
|
|
442 |
#model: #fileEntryFieldHolder
|
|
443 |
#acceptOnPointerLeave: false
|
|
444 |
#postBuildCallback: #postBuildPathField:
|
|
445 |
)
|
|
446 |
#(#ViewSpec
|
|
447 |
#name: 'FilterBox'
|
|
448 |
#component:
|
|
449 |
#(#SpecCollection
|
|
450 |
#collection: #(
|
|
451 |
#(#LabelSpec
|
|
452 |
#label: 'Filter:'
|
|
453 |
#name: 'Filter'
|
|
454 |
#layout: #(#LayoutFrame 0 0 0 0 40 0 0 1)
|
|
455 |
#translateLabel: true
|
|
456 |
#adjust: #left
|
|
457 |
#postBuildCallback: #postBuildPathViewBox:
|
|
458 |
)
|
|
459 |
#(#ComboBoxSpec
|
|
460 |
#name: 'FilterSelectionBox'
|
|
461 |
#layout: #(#LayoutFrame 40 0 0 0 0 1 0 1)
|
|
462 |
#model: #filterModel
|
|
463 |
#immediateAccept: true
|
|
464 |
#acceptOnPointerLeave: false
|
|
465 |
#comboList: #filterListModel
|
|
466 |
)
|
|
467 |
)
|
|
468 |
|
|
469 |
)
|
|
470 |
#postBuildCallback: #postBuildPathViewBox:
|
|
471 |
)
|
|
472 |
)
|
|
473 |
|
|
474 |
)
|
|
475 |
#handles: #(#Any 0.8 1.0)
|
|
476 |
#postBuildCallback: #postBuildPathViewBox:
|
|
477 |
)
|
|
478 |
)
|
|
479 |
|
|
480 |
)
|
|
481 |
#postBuildCallback: #postBuildPathViewBox:
|
|
482 |
)
|
|
483 |
)
|
|
484 |
|
|
485 |
)
|
|
486 |
)
|
|
487 |
#(#ViewSpec
|
|
488 |
#name: 'BrowserBox'
|
|
489 |
#layout: #(#LayoutFrame 0 0.0 55 0 0 1.0 -20 1)
|
|
490 |
#level: 0
|
|
491 |
#component:
|
|
492 |
#(#SpecCollection
|
|
493 |
#collection: #(
|
|
494 |
#(#'FileBrowserV2UISpecifications::PanelSpec'
|
|
495 |
#name: 'VerticalPanel'
|
|
496 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
497 |
#level: 0
|
|
498 |
#whichView: #last
|
|
499 |
#orientation: #vertical
|
|
500 |
#visibility: #viewNoteBookApplicationHolder
|
|
501 |
#component:
|
|
502 |
#(#SpecCollection
|
|
503 |
#collection: #(
|
|
504 |
#(#'FileBrowserV2UISpecifications::PanelSpec'
|
|
505 |
#name: 'HorizontalPanel'
|
|
506 |
#level: 0
|
|
507 |
#whichView: #first
|
|
508 |
#orientation: #horizontal
|
|
509 |
#visibility: #showDirectoryTreeHolder
|
|
510 |
#component:
|
|
511 |
#(#SpecCollection
|
|
512 |
#collection: #(
|
|
513 |
#(#SubCanvasSpec
|
|
514 |
#name: 'DirectoryTreeBrowser'
|
|
515 |
#hasHorizontalScrollBar: false
|
|
516 |
#hasVerticalScrollBar: false
|
|
517 |
#majorKey: #DirectoryTreeBrowser
|
|
518 |
#createNewApplication: true
|
|
519 |
#createNewBuilder: true
|
|
520 |
)
|
|
521 |
#(#SubCanvasSpec
|
|
522 |
#name: 'DirectoryContentsBrowser'
|
|
523 |
#hasHorizontalScrollBar: false
|
|
524 |
#hasVerticalScrollBar: false
|
|
525 |
#majorKey: #DirectoryContentsBrowser
|
|
526 |
#createNewApplication: true
|
|
527 |
#createNewBuilder: true
|
|
528 |
)
|
|
529 |
)
|
|
530 |
|
|
531 |
)
|
|
532 |
#handles: #(#Any 0.229621 1.0)
|
|
533 |
)
|
|
534 |
#(#SubCanvasSpec
|
|
535 |
#name: 'FileApplicationNoteBook'
|
|
536 |
#hasHorizontalScrollBar: false
|
|
537 |
#hasVerticalScrollBar: false
|
|
538 |
#majorKey: #FileApplicationNoteBook
|
|
539 |
#createNewApplication: true
|
|
540 |
#createNewBuilder: true
|
3903
|
541 |
#tabable: false
|
3892
|
542 |
)
|
|
543 |
)
|
|
544 |
|
|
545 |
)
|
|
546 |
#handles: #(#Any 0.5 1.0)
|
|
547 |
)
|
|
548 |
)
|
|
549 |
|
|
550 |
)
|
|
551 |
)
|
|
552 |
#(#ViewSpec
|
|
553 |
#name: 'Box2'
|
|
554 |
#layout: #(#LayoutFrame 0 0 -20 1 0 1 0 1)
|
|
555 |
#level: 0
|
|
556 |
#component:
|
|
557 |
#(#SpecCollection
|
|
558 |
#collection: #(
|
|
559 |
#(#LabelSpec
|
|
560 |
#label: 'NotifyLabel'
|
|
561 |
#name: 'NotifyLabel'
|
|
562 |
#layout: #(#LayoutFrame 1 0.0 1 0.0 1 1.0 1 1.0)
|
|
563 |
#level: -1
|
|
564 |
#translateLabel: true
|
|
565 |
#labelChannel: #notifyChannel
|
|
566 |
#adjust: #left
|
|
567 |
)
|
|
568 |
)
|
|
569 |
|
|
570 |
)
|
|
571 |
)
|
|
572 |
)
|
|
573 |
|
|
574 |
)
|
|
575 |
)
|
|
576 |
! !
|
|
577 |
|
|
578 |
!FileBrowserV2 class methodsFor:'menu specs'!
|
|
579 |
|
|
580 |
browserMenu
|
|
581 |
"This resource specification was automatically generated
|
|
582 |
by the MenuEditor of ST/X."
|
|
583 |
|
|
584 |
"Do not manually edit this!! If it is corrupted,
|
|
585 |
the MenuEditor may not be able to read the specification."
|
|
586 |
|
|
587 |
"
|
|
588 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#browserMenu
|
|
589 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 browserMenu)) startUp
|
|
590 |
"
|
|
591 |
|
|
592 |
<resource: #menu>
|
|
593 |
|
|
594 |
^
|
|
595 |
#(#Menu
|
|
596 |
#(
|
|
597 |
#(#MenuItem
|
|
598 |
#label: 'Spawn'
|
|
599 |
#translateLabel: true
|
|
600 |
#value: #doSpawn
|
|
601 |
)
|
|
602 |
#(#MenuItem
|
|
603 |
#label: 'Save Settings'
|
|
604 |
#translateLabel: true
|
|
605 |
#value: #saveSettingsAspectValues
|
|
606 |
)
|
|
607 |
#(#MenuItem
|
|
608 |
#label: '-'
|
|
609 |
)
|
|
610 |
#(#MenuItem
|
|
611 |
#label: 'Search File'
|
|
612 |
#translateLabel: true
|
|
613 |
#value: #doOpenSearchFile
|
|
614 |
)
|
|
615 |
#(#MenuItem
|
|
616 |
#label: 'Terminal View'
|
|
617 |
#translateLabel: true
|
|
618 |
#value: #doAddTerminal
|
|
619 |
)
|
|
620 |
#(#MenuItem
|
|
621 |
#label: '-'
|
|
622 |
)
|
|
623 |
#(#MenuItem
|
|
624 |
#label: 'Exit'
|
|
625 |
#translateLabel: true
|
|
626 |
#value: #closeRequest
|
|
627 |
)
|
|
628 |
)
|
|
629 |
nil
|
|
630 |
nil
|
|
631 |
)
|
|
632 |
!
|
|
633 |
|
|
634 |
mainMenu
|
|
635 |
"This resource specification was automatically generated
|
|
636 |
by the MenuEditor of ST/X."
|
|
637 |
|
|
638 |
"Do not manually edit this!! If it is corrupted,
|
|
639 |
the MenuEditor may not be able to read the specification."
|
|
640 |
|
|
641 |
"
|
|
642 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#mainMenu
|
|
643 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 mainMenu)) startUp
|
|
644 |
"
|
|
645 |
|
|
646 |
<resource: #menu>
|
|
647 |
|
|
648 |
^
|
|
649 |
#(#Menu
|
|
650 |
#(
|
|
651 |
#(#MenuItem
|
|
652 |
#label: 'Browser'
|
|
653 |
#translateLabel: true
|
|
654 |
#submenuChannel: #browserMenu
|
|
655 |
)
|
|
656 |
#(#MenuItem
|
|
657 |
#label: 'Directory'
|
|
658 |
#translateLabel: true
|
|
659 |
#submenuChannel: #directoryMenu
|
|
660 |
)
|
|
661 |
#(#MenuItem
|
|
662 |
#label: 'File'
|
|
663 |
#translateLabel: true
|
|
664 |
#submenuChannel: #fileMenu
|
|
665 |
)
|
|
666 |
#(#MenuItem
|
|
667 |
#label: 'Edit'
|
|
668 |
#translateLabel: true
|
|
669 |
#submenuChannel: #editMenu
|
|
670 |
)
|
|
671 |
#(#MenuItem
|
|
672 |
#label: 'View'
|
|
673 |
#translateLabel: true
|
|
674 |
#submenu:
|
|
675 |
#(#Menu
|
|
676 |
#(
|
|
677 |
#(#MenuItem
|
|
678 |
#label: 'View File List'
|
|
679 |
#translateLabel: true
|
3903
|
680 |
#submenuChannel: #viewInContentsBrowserMenu
|
3892
|
681 |
)
|
|
682 |
#(#MenuItem
|
|
683 |
#label: 'Sort File List'
|
|
684 |
#translateLabel: true
|
|
685 |
#submenuChannel: #sortMenu
|
|
686 |
)
|
|
687 |
#(#MenuItem
|
3907
|
688 |
#label: 'View Directory Tree'
|
3892
|
689 |
#translateLabel: true
|
|
690 |
#indication: #showDirectoryTreeHolder
|
|
691 |
)
|
|
692 |
#(#MenuItem
|
3919
|
693 |
#label: 'View Directory Description'
|
3892
|
694 |
#translateLabel: true
|
|
695 |
#indication: #viewDirectoryDescription
|
|
696 |
)
|
|
697 |
#(#MenuItem
|
3907
|
698 |
#label: 'View Files in Tree'
|
3892
|
699 |
#translateLabel: true
|
|
700 |
#indication: #viewFilesInDirectoryTree
|
|
701 |
)
|
|
702 |
#(#MenuItem
|
3907
|
703 |
#label: 'View Directories in Contents'
|
3892
|
704 |
#translateLabel: true
|
|
705 |
#indication: #viewDirectoriesInDirectoryContentsBrowser
|
|
706 |
)
|
|
707 |
#(#MenuItem
|
3907
|
708 |
#label: 'View File Applications'
|
3892
|
709 |
#translateLabel: true
|
|
710 |
#enabled: #enableViewNoteBookApplication
|
|
711 |
#indication: #viewNoteBookApplicationHolder
|
|
712 |
)
|
|
713 |
#(#MenuItem
|
|
714 |
#label: 'Open Multiple Applications'
|
|
715 |
#translateLabel: true
|
|
716 |
#indication: #openMultipleApplicationsForType
|
|
717 |
)
|
|
718 |
#(#MenuItem
|
|
719 |
#label: '-'
|
|
720 |
)
|
|
721 |
#(#MenuItem
|
|
722 |
#label: 'Toolbar'
|
|
723 |
#translateLabel: true
|
|
724 |
#hideMenuOnActivated: false
|
|
725 |
#indication: #toolBarVisibleHolder
|
|
726 |
)
|
|
727 |
#(#MenuItem
|
|
728 |
#label: 'Pathname '
|
|
729 |
#translateLabel: true
|
|
730 |
#hideMenuOnActivated: false
|
|
731 |
#indication: #filenameEntryFieldVisibleHolder
|
|
732 |
)
|
|
733 |
#(#MenuItem
|
|
734 |
#label: '-'
|
|
735 |
)
|
|
736 |
#(#MenuItem
|
|
737 |
#label: 'Update'
|
|
738 |
#translateLabel: true
|
|
739 |
)
|
|
740 |
)
|
|
741 |
nil
|
|
742 |
nil
|
|
743 |
)
|
|
744 |
)
|
|
745 |
#(#MenuItem
|
|
746 |
#label: 'Tools'
|
|
747 |
#translateLabel: true
|
|
748 |
#submenuChannel: #toolsMenuSpec
|
|
749 |
)
|
|
750 |
#(#MenuItem
|
|
751 |
#label: 'CVS'
|
|
752 |
#translateLabel: true
|
|
753 |
#submenu:
|
|
754 |
#(#Menu
|
|
755 |
#(
|
|
756 |
#(#MenuItem
|
|
757 |
#label: 'Update selected Files/Directories'
|
|
758 |
#translateLabel: true
|
|
759 |
#value: #cvsUpdateSelection
|
|
760 |
#enabled: #hasSelection
|
|
761 |
)
|
|
762 |
#(#MenuItem
|
|
763 |
#label: 'Update Directory Local'
|
|
764 |
#translateLabel: true
|
|
765 |
#value: #cvsUpdateAll
|
|
766 |
)
|
|
767 |
#(#MenuItem
|
|
768 |
#label: 'Update Directory Recursive'
|
|
769 |
#translateLabel: true
|
|
770 |
#value: #cvsUpdateAllRecursive
|
|
771 |
)
|
|
772 |
#(#MenuItem
|
|
773 |
#label: '-'
|
|
774 |
)
|
|
775 |
#(#MenuItem
|
|
776 |
#label: 'Commit...'
|
|
777 |
#translateLabel: true
|
|
778 |
#value: #cvsCommit
|
|
779 |
)
|
|
780 |
#(#MenuItem
|
|
781 |
#label: 'Add && Commit...'
|
|
782 |
#translateLabel: true
|
|
783 |
#value: #cvsAddAndCommit
|
|
784 |
#enabled: #canCvsAddAndCommit
|
|
785 |
)
|
|
786 |
#(#MenuItem
|
|
787 |
#label: '-'
|
|
788 |
)
|
|
789 |
#(#MenuItem
|
|
790 |
#label: 'Remove File && CVS Container...'
|
|
791 |
#translateLabel: true
|
|
792 |
#value: #cvsRemoveFileAndCVSContainer
|
|
793 |
#enabled: #canRemoveCVSContainer
|
|
794 |
)
|
|
795 |
)
|
|
796 |
nil
|
|
797 |
nil
|
|
798 |
)
|
|
799 |
)
|
|
800 |
#(#MenuItem
|
|
801 |
#label: 'Help'
|
|
802 |
#translateLabel: true
|
|
803 |
#startGroup: #right
|
|
804 |
#submenu:
|
|
805 |
#(#Menu
|
|
806 |
#(
|
|
807 |
#(#MenuItem
|
|
808 |
#label: 'FileBrowser Documentation'
|
|
809 |
#translateLabel: true
|
|
810 |
)
|
|
811 |
#(#MenuItem
|
|
812 |
#label: '-'
|
|
813 |
)
|
|
814 |
#(#MenuItem
|
|
815 |
#label: 'About FileBrowser...'
|
|
816 |
#translateLabel: true
|
|
817 |
)
|
|
818 |
)
|
|
819 |
nil
|
|
820 |
nil
|
|
821 |
)
|
|
822 |
)
|
|
823 |
)
|
|
824 |
nil
|
|
825 |
nil
|
|
826 |
)
|
|
827 |
!
|
|
828 |
|
|
829 |
toolBarMainMenu
|
|
830 |
"This resource specification was automatically generated
|
|
831 |
by the MenuEditor of ST/X."
|
|
832 |
|
|
833 |
"Do not manually edit this!! If it is corrupted,
|
|
834 |
the MenuEditor may not be able to read the specification."
|
|
835 |
|
|
836 |
"
|
|
837 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu
|
|
838 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu)) startUp
|
|
839 |
"
|
|
840 |
|
|
841 |
<resource: #menu>
|
|
842 |
|
|
843 |
^
|
|
844 |
#(#Menu
|
|
845 |
#(
|
|
846 |
#(#MenuItem
|
|
847 |
#label: 'DirectoryUp'
|
|
848 |
#translateLabel: true
|
|
849 |
#isButton: true
|
|
850 |
#value: #doGoDirectoryUp
|
|
851 |
#activeHelpKey: #directoryUp
|
|
852 |
#enabled: #enableDirectoryUp
|
|
853 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #upArrow20x20Icon)
|
|
854 |
)
|
|
855 |
#(#MenuItem
|
|
856 |
#label: ''
|
|
857 |
)
|
|
858 |
#(#MenuItem
|
|
859 |
#label: 'Back'
|
|
860 |
#translateLabel: true
|
|
861 |
#isButton: true
|
|
862 |
#value: #doBack
|
|
863 |
#activeHelpKey: #directoryBack
|
|
864 |
#enabled: #enableBack
|
3903
|
865 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #leftArrow20x20Icon)
|
3892
|
866 |
#submenuChannel: #menuDirHistoryBack
|
|
867 |
)
|
|
868 |
#(#MenuItem
|
|
869 |
#label: ''
|
|
870 |
)
|
|
871 |
#(#MenuItem
|
|
872 |
#label: 'Forward'
|
|
873 |
#translateLabel: true
|
|
874 |
#isButton: true
|
|
875 |
#value: #doForward
|
|
876 |
#activeHelpKey: #directoryForward
|
|
877 |
#enabled: #enableForward
|
3903
|
878 |
#labelImage: #(#ResourceRetriever #AbstractFileBrowser #rightArrow20x20Icon)
|
3953
|
879 |
#submenuChannel: #menuDirHistoryForward
|
3892
|
880 |
)
|
|
881 |
#(#MenuItem
|
|
882 |
#label: ''
|
|
883 |
)
|
|
884 |
#(#MenuItem
|
|
885 |
#label: 'Home'
|
|
886 |
#translateLabel: true
|
|
887 |
#isButton: true
|
|
888 |
#value: #doGotoHomeDirectory
|
|
889 |
#activeHelpKey: #fileHome
|
|
890 |
#enabled: #enableHome
|
|
891 |
#labelImage: #(#ResourceRetriever nil #goHomeIcon)
|
|
892 |
)
|
|
893 |
#(#MenuItem
|
|
894 |
#label: ''
|
|
895 |
)
|
|
896 |
#(#MenuItem
|
|
897 |
#label: 'File History'
|
|
898 |
#translateLabel: true
|
|
899 |
#isButton: true
|
|
900 |
#activeHelpKey: #fileHistory
|
|
901 |
#enabled: #enableFileHistory
|
|
902 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #history20x20Icon)
|
|
903 |
#submenuChannel: #menuFileHistory
|
|
904 |
)
|
|
905 |
#(#MenuItem
|
|
906 |
#label: ''
|
|
907 |
)
|
|
908 |
#(#MenuItem
|
|
909 |
#label: 'Copy'
|
|
910 |
#translateLabel: true
|
|
911 |
#isButton: true
|
|
912 |
#value: #copyInDirContentsBrowser
|
|
913 |
#activeHelpKey: #copyFile
|
|
914 |
#enabled: #hasSelection
|
|
915 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #copy20x20Icon)
|
|
916 |
)
|
|
917 |
#(#MenuItem
|
|
918 |
#label: 'Cut'
|
|
919 |
#translateLabel: true
|
|
920 |
#isButton: true
|
|
921 |
#value: #cutInDirContentsBrowser
|
|
922 |
#activeHelpKey: #cutFile
|
|
923 |
#enabled: #hasSelection
|
|
924 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #cut20x20Icon2)
|
|
925 |
)
|
|
926 |
#(#MenuItem
|
|
927 |
#label: 'Paste'
|
|
928 |
#translateLabel: true
|
|
929 |
#isButton: true
|
|
930 |
#value: #pasteFiles
|
|
931 |
#activeHelpKey: #pasteFile
|
|
932 |
#enabled: #canPaste
|
|
933 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #paste20x20Icon)
|
|
934 |
)
|
|
935 |
#(#MenuItem
|
|
936 |
#label: 'Delete'
|
|
937 |
#translateLabel: true
|
|
938 |
#isButton: true
|
|
939 |
#value: #deleteInDirContentsBrowser
|
|
940 |
#activeHelpKey: #deleteFile
|
|
941 |
#enabled: #hasSelection
|
|
942 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #erase20x20Icon)
|
|
943 |
)
|
|
944 |
#(#MenuItem
|
|
945 |
#label: ''
|
|
946 |
)
|
|
947 |
#(#MenuItem
|
|
948 |
#label: 'File In'
|
|
949 |
#translateLabel: true
|
|
950 |
#isButton: true
|
|
951 |
#value: #fileFileIn
|
|
952 |
#activeHelpKey: #fileIn
|
|
953 |
#enabled: #hasSelection
|
|
954 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #fileIn20x20Icon3)
|
|
955 |
)
|
|
956 |
#(#MenuItem
|
|
957 |
#label: ''
|
|
958 |
)
|
|
959 |
#(#MenuItem
|
|
960 |
#label: 'Search File'
|
|
961 |
#translateLabel: true
|
|
962 |
#isButton: true
|
|
963 |
#value: #doOpenSearchFile
|
|
964 |
#activeHelpKey: #searchFile
|
|
965 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #search20x20Icon)
|
|
966 |
)
|
|
967 |
#(#MenuItem
|
|
968 |
#label: 'VT100'
|
|
969 |
#translateLabel: true
|
|
970 |
#isButton: true
|
|
971 |
#value: #doAddTerminal
|
|
972 |
#activeHelpKey: #addTerminal
|
|
973 |
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #shell20x20WithoutTextIcon)
|
|
974 |
)
|
|
975 |
)
|
|
976 |
nil
|
|
977 |
nil
|
|
978 |
)
|
|
979 |
!
|
|
980 |
|
|
981 |
toolsMenuSpec
|
|
982 |
"This resource specification was automatically generated
|
|
983 |
by the MenuEditor of ST/X."
|
|
984 |
|
|
985 |
"Do not manually edit this!! If it is corrupted,
|
|
986 |
the MenuEditor may not be able to read the specification."
|
|
987 |
|
|
988 |
"
|
|
989 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolsMenuSpec
|
|
990 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolsMenuSpec)) startUp
|
|
991 |
"
|
|
992 |
|
|
993 |
<resource: #menu>
|
|
994 |
|
|
995 |
^
|
|
996 |
#(#Menu
|
|
997 |
#(
|
|
998 |
#(#MenuItem
|
|
999 |
#label: 'Execute Command...'
|
|
1000 |
#translateLabel: true
|
|
1001 |
#value: #doExecuteCommand
|
|
1002 |
)
|
|
1003 |
#(#MenuItem
|
|
1004 |
#label: 'Shell Terminal'
|
|
1005 |
#translateLabel: true
|
|
1006 |
#isVisible: #canDoTerminalAndSystemIsUnix
|
|
1007 |
#value: #openTerminal
|
|
1008 |
#enabled: #canDoTerminal
|
|
1009 |
)
|
|
1010 |
#(#MenuItem
|
|
1011 |
#label: 'DOS Terminal'
|
|
1012 |
#translateLabel: true
|
|
1013 |
#isVisible: #canDoTerminalAndSystemIsDOS
|
|
1014 |
#value: #openTerminal
|
|
1015 |
#enabled: #canDoTerminal
|
|
1016 |
)
|
|
1017 |
#(#MenuItem
|
|
1018 |
#label: '-'
|
|
1019 |
)
|
|
1020 |
#(#MenuItem
|
|
1021 |
#label: 'Changes Browser'
|
|
1022 |
#translateLabel: true
|
|
1023 |
#value: #openChangesBrowser
|
|
1024 |
#enabled: #hasSelection
|
|
1025 |
)
|
|
1026 |
#(#MenuItem
|
|
1027 |
#label: 'Snapshot Image Browser'
|
|
1028 |
#translateLabel: true
|
|
1029 |
#value: #openSnapshotImageBrowser
|
|
1030 |
#enabled: #hasSnapshotSelection
|
|
1031 |
)
|
|
1032 |
#(#MenuItem
|
|
1033 |
#label: 'Create Smalltalk Project'
|
|
1034 |
#translateLabel: true
|
|
1035 |
#value: #createProjectAndOpenProjectBrowser
|
|
1036 |
#enabled: #canCreateNewProject
|
|
1037 |
)
|
|
1038 |
#(#MenuItem
|
|
1039 |
#label: 'Install Autoloaded'
|
|
1040 |
#translateLabel: true
|
|
1041 |
#value: #readAbbrevFile
|
|
1042 |
#enabled: #canReadAbbrevFile
|
|
1043 |
)
|
|
1044 |
#(#MenuItem
|
|
1045 |
#label: 'Install all as Autoloaded'
|
|
1046 |
#translateLabel: true
|
|
1047 |
#value: #installAllAsAutoloaded
|
|
1048 |
#enabled: #anySTFilesPresent
|
|
1049 |
)
|
|
1050 |
#(#MenuItem
|
|
1051 |
#label: 'Editor'
|
|
1052 |
#translateLabel: true
|
|
1053 |
#value: #openEditor
|
|
1054 |
#enabled: #hasSelection
|
|
1055 |
)
|
|
1056 |
#(#MenuItem
|
|
1057 |
#label: 'HTML Reader'
|
|
1058 |
#translateLabel: true
|
|
1059 |
#value: #openHTMLReader
|
|
1060 |
#enabled: #hasSelection
|
|
1061 |
)
|
|
1062 |
#(#MenuItem
|
|
1063 |
#label: 'ASN1 Browser'
|
|
1064 |
#translateLabel: true
|
|
1065 |
#isVisible: #hasASN1
|
|
1066 |
#value: #openASN1Browser
|
|
1067 |
#enabled: #hasASN1AndSelection
|
|
1068 |
)
|
|
1069 |
#(#MenuItem
|
|
1070 |
#label: 'C Browser'
|
|
1071 |
#translateLabel: true
|
|
1072 |
#isVisible: #hasCBrowser
|
|
1073 |
#value: #openCBrowser
|
|
1074 |
#enabled: #hasCBrowser
|
|
1075 |
)
|
|
1076 |
#(#MenuItem
|
|
1077 |
#label: 'Applet Viewer'
|
|
1078 |
#translateLabel: true
|
|
1079 |
#isVisible: #hasJava
|
|
1080 |
#value: #openAppletViewer
|
|
1081 |
#enabled: #hasJavaAndSelection
|
|
1082 |
)
|
|
1083 |
#(#MenuItem
|
|
1084 |
#label: 'Image Inspector'
|
|
1085 |
#translateLabel: true
|
|
1086 |
#value: #openImageInspector
|
|
1087 |
#enabled: #hasSelection
|
|
1088 |
)
|
|
1089 |
#(#MenuItem
|
|
1090 |
#label: 'Image Preview'
|
|
1091 |
#translateLabel: true
|
|
1092 |
#value: #openImagePreview
|
|
1093 |
#enabled: #hasSelection
|
|
1094 |
)
|
|
1095 |
#(#MenuItem
|
|
1096 |
#label: 'Image Editor'
|
|
1097 |
#translateLabel: true
|
|
1098 |
#value: #openImageEditor
|
|
1099 |
#enabled: #hasSelection
|
|
1100 |
)
|
|
1101 |
#(#MenuItem
|
|
1102 |
#label: 'MP3 Player'
|
|
1103 |
#translateLabel: true
|
|
1104 |
#isVisible: #hasMP3Player
|
|
1105 |
#value: #openMP3Player
|
|
1106 |
#enabled: #hasMP3PlayerAndSelection
|
|
1107 |
)
|
|
1108 |
#(#MenuItem
|
|
1109 |
#label: 'ZipFile Tool'
|
|
1110 |
#translateLabel: true
|
|
1111 |
#value: #openZipTool
|
|
1112 |
#enabled: #hasZipFileSelected
|
|
1113 |
)
|
|
1114 |
#(#MenuItem
|
|
1115 |
#label: 'Slide Show'
|
|
1116 |
#translateLabel: true
|
|
1117 |
#isVisible: #hasSlideShow
|
|
1118 |
#value: #openSlideShow
|
|
1119 |
#enabled: #currentFilesAreInSameDirectory
|
|
1120 |
)
|
|
1121 |
#(#MenuItem
|
|
1122 |
#label: 'File Differences...'
|
|
1123 |
#translateLabel: true
|
|
1124 |
#value: #openDiffView
|
|
1125 |
#enabled: #hasSelection
|
|
1126 |
)
|
|
1127 |
#(#MenuItem
|
|
1128 |
#label: 'Find Duplicate Files'
|
|
1129 |
#translateLabel: true
|
|
1130 |
#value: #fileFindDuplicates
|
|
1131 |
)
|
|
1132 |
#(#MenuItem
|
|
1133 |
#label: 'Find All Duplicate Files (Recursive)'
|
|
1134 |
#translateLabel: true
|
|
1135 |
#value: #fileFindAllDuplicates
|
|
1136 |
#enabled: #hasSelection
|
|
1137 |
)
|
|
1138 |
#(#MenuItem
|
|
1139 |
#label: 'Find a File...'
|
|
1140 |
#translateLabel: true
|
|
1141 |
#value: #fileFindFile
|
|
1142 |
)
|
|
1143 |
#(#MenuItem
|
|
1144 |
#label: 'Hex Dump'
|
|
1145 |
#translateLabel: true
|
|
1146 |
#value: #fileHexDump
|
|
1147 |
#enabled: #hasSelection
|
|
1148 |
)
|
|
1149 |
)
|
|
1150 |
nil
|
|
1151 |
nil
|
|
1152 |
)
|
|
1153 |
! !
|
|
1154 |
|
|
1155 |
!FileBrowserV2 methodsFor:'actions'!
|
|
1156 |
|
|
1157 |
changeFileBrowserTitleTo:aString
|
|
1158 |
|
|
1159 |
|string|
|
|
1160 |
|
|
1161 |
string := 'FileBrowser ', aString.
|
|
1162 |
self window label:string.
|
|
1163 |
!
|
|
1164 |
|
|
1165 |
doSpawn
|
|
1166 |
|
|
1167 |
self saveRuntimeAspectValues.
|
|
1168 |
self class openWithAspects:aspects withExtent:self builder window extent.
|
|
1169 |
!
|
|
1170 |
|
|
1171 |
hideFilenameEntryField
|
|
1172 |
self filenameEntryFieldVisibleHolder value:false.
|
|
1173 |
!
|
|
1174 |
|
|
1175 |
hideToolbar
|
|
1176 |
self toolBarVisibleHolder value:false.
|
|
1177 |
! !
|
|
1178 |
|
|
1179 |
!FileBrowserV2 methodsFor:'aspects'!
|
|
1180 |
|
|
1181 |
fileEntryFieldHolder
|
|
1182 |
|
|
1183 |
fileEntryFieldHolder isNil ifTrue:[
|
|
1184 |
fileEntryFieldHolder := ValueHolder new.
|
|
1185 |
fileEntryFieldHolder addDependent:self.
|
|
1186 |
].
|
|
1187 |
^ fileEntryFieldHolder.
|
|
1188 |
! !
|
|
1189 |
|
|
1190 |
!FileBrowserV2 methodsFor:'change & update'!
|
|
1191 |
|
|
1192 |
update:something with:aParameter from:changedObject
|
|
1193 |
|
|
1194 |
|
|
1195 |
changedObject == self fileEntryFieldHolder ifTrue:[
|
|
1196 |
(fileEntryFieldHolder value asFilename exists) ifFalse:[^ self].
|
|
1197 |
self currentFileNameHolder value:(OrderedCollection with:(fileEntryFieldHolder value asFilename)) withoutNotifying:self.
|
|
1198 |
].
|
|
1199 |
changedObject == self currentFileNameHolder ifTrue:[
|
|
1200 |
| files newDir|
|
|
1201 |
files := self currentFileNameHolder value.
|
|
1202 |
|
|
1203 |
(files isEmpty) ifTrue:[
|
|
1204 |
self fileEntryFieldHolder value:nil withoutNotifying:self.
|
|
1205 |
] ifFalse:[
|
|
1206 |
files size == 1 ifTrue:[
|
|
1207 |
self fileEntryFieldHolder value:(files first) withoutNotifying:self.
|
|
1208 |
] ifFalse:[
|
|
1209 |
self fileEntryFieldHolder value:self getBestFile withoutNotifying:self.
|
|
1210 |
].
|
|
1211 |
].
|
|
1212 |
" do not return here because the AbstractFileBrowserComponent have to do something
|
|
1213 |
for every application "
|
|
1214 |
"/ ^ self.
|
|
1215 |
].
|
|
1216 |
(changedObject == self toolBarVisibleHolder
|
|
1217 |
or:[changedObject == self filenameEntryFieldVisibleHolder]) ifTrue:[
|
|
1218 |
self updateToolVisibility.
|
|
1219 |
^ self.
|
|
1220 |
].
|
|
1221 |
|
|
1222 |
^ super update:something with:aParameter from:changedObject.
|
|
1223 |
!
|
|
1224 |
|
|
1225 |
updateToolVisibility
|
|
1226 |
|builder toolBar filenameEntryField vPanel topOffset visible d|
|
|
1227 |
|
|
1228 |
builder := self builder.
|
|
1229 |
|
|
1230 |
topOffset := 0.
|
|
1231 |
visible := self toolBarVisibleHolder value.
|
|
1232 |
visible ifTrue:[
|
|
1233 |
toolBar := builder componentAt:#ToolbarBox.
|
|
1234 |
topOffset := topOffset + toolBar height.
|
|
1235 |
].
|
|
1236 |
|
|
1237 |
visible := self filenameEntryFieldVisibleHolder value.
|
|
1238 |
visible ifTrue:[
|
|
1239 |
filenameEntryField := builder componentAt:#FilenameEntryFieldBox.
|
|
1240 |
d := filenameEntryField layout bottomOffset - filenameEntryField layout topOffset.
|
|
1241 |
filenameEntryField layout topOffset:topOffset bottomOffset:topOffset + d.
|
|
1242 |
topOffset := topOffset + filenameEntryField height.
|
|
1243 |
filenameEntryField container notNil ifTrue:[
|
|
1244 |
filenameEntryField containerChangedSize.
|
|
1245 |
].
|
|
1246 |
].
|
|
1247 |
|
|
1248 |
vPanel := builder componentAt:#BrowserBox.
|
|
1249 |
vPanel layout topOffset:topOffset+1.
|
|
1250 |
vPanel container notNil ifTrue:[
|
|
1251 |
vPanel containerChangedSize.
|
|
1252 |
].
|
|
1253 |
! !
|
|
1254 |
|
|
1255 |
!FileBrowserV2 methodsFor:'startup & release'!
|
|
1256 |
|
|
1257 |
hideFilenameEntryFieldButtonCreated:aButton
|
|
1258 |
|
|
1259 |
aButton passiveLevel:(MenuPanel defaultLevel).
|
|
1260 |
aButton activeLevel:-1.
|
|
1261 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor).
|
|
1262 |
!
|
|
1263 |
|
|
1264 |
hideToolBarButtonCreated:aButton
|
|
1265 |
|
|
1266 |
aButton passiveLevel:(MenuPanel defaultLevel).
|
|
1267 |
aButton activeLevel:-1.
|
|
1268 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor).
|
|
1269 |
!
|
|
1270 |
|
|
1271 |
initialize
|
|
1272 |
|
|
1273 |
self masterApplication:nil.
|
|
1274 |
!
|
|
1275 |
|
|
1276 |
makeDependent
|
|
1277 |
|
|
1278 |
self currentFileNameHolder addDependent:self.
|
|
1279 |
self notifyChannel addDependent:self.
|
|
1280 |
self viewNoteBookApplicationHolder addDependent:self.
|
|
1281 |
self filenameEntryFieldVisibleHolder addDependent:self.
|
|
1282 |
self toolBarVisibleHolder addDependent:self.
|
|
1283 |
!
|
|
1284 |
|
|
1285 |
postBuildPathField:aWidget
|
|
1286 |
"
|
|
1287 |
set the pramters that not can be changed in the window spec
|
|
1288 |
"
|
|
1289 |
|
|
1290 |
|sClr lClr|
|
|
1291 |
|
|
1292 |
aWidget level:-1.
|
|
1293 |
|
|
1294 |
"/ sClr := aWidget shadowColor.
|
|
1295 |
"/ lClr := aWidget lightColor.
|
|
1296 |
"/ sClr := (self builder componentAt:#ToolBar) shadowColor.
|
|
1297 |
"/ lClr := (self builder componentAt:#ToolBar) lightColor.
|
|
1298 |
|
|
1299 |
"/ aWidget backgroundColor:(aWidget superView viewBackground).
|
|
1300 |
"/ aWidget shadowColor:sClr.
|
|
1301 |
!
|
|
1302 |
|
|
1303 |
postBuildPathViewBox:aWidget
|
|
1304 |
|
|
1305 |
aWidget backgroundColor:(MenuPanel defaultBackgroundColor).
|
|
1306 |
!
|
|
1307 |
|
|
1308 |
postBuildWith:aBuilder
|
|
1309 |
|
|
1310 |
super postBuildWith:aBuilder.
|
|
1311 |
self updateToolVisibility
|
|
1312 |
!
|
|
1313 |
|
|
1314 |
postOpenWith:aBuilder
|
|
1315 |
|
|
1316 |
self currentFileNameHolder changed.
|
|
1317 |
self showDirectoryTreeHolder changed.
|
|
1318 |
self viewNoteBookApplicationHolder changed.
|
|
1319 |
^ super postOpenWith:aBuilder
|
|
1320 |
!
|
|
1321 |
|
|
1322 |
release
|
|
1323 |
|
|
1324 |
self saveRuntimeAspectValues.
|
3953
|
1325 |
self dirHistory reset.
|
3892
|
1326 |
^ super release
|
|
1327 |
! !
|
|
1328 |
|
|
1329 |
!FileBrowserV2 class methodsFor:'documentation'!
|
|
1330 |
|
|
1331 |
version
|
3953
|
1332 |
^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.10 2002-10-08 08:20:15 penk Exp $'
|
3892
|
1333 |
! !
|
|
1334 |
|
|
1335 |
FileBrowserV2 initialize!
|