author | Claus Gittinger <cg@exept.de> |
Mon, 16 Oct 2006 13:15:23 +0200 | |
changeset 7413 | 842b1274968f |
parent 7314 | 94436fc26dc2 |
child 7462 | bfd448c95557 |
permissions | -rw-r--r-- |
3892 | 1 |
" |
5140 | 2 |
COPYRIGHT (c) 2002 by eXept Software AG |
3892 | 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 |
"{ Package: 'stx:libtool' }" |
|
13 |
||
14 |
AbstractFileBrowser subclass:#FileBrowserV2 |
|
4651 | 15 |
instanceVariableNames:'fileEntryFieldHolder pathEntryField previewProcess |
5477 | 16 |
listOfDeviceDrives selectedDeviceDrive imgView' |
4651 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-Tools-File' |
|
3892 | 20 |
! |
21 |
||
22 |
!FileBrowserV2 class methodsFor:'documentation'! |
|
23 |
||
24 |
copyright |
|
25 |
" |
|
5140 | 26 |
COPYRIGHT (c) 2002 by eXept Software AG |
3892 | 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 |
" |
|
5967 | 40 |
FileBrowserV2 is based on Filebrowser |
3892 | 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 |
" |
|
5354 | 68 |
! |
69 |
||
70 |
toDo |
|
71 |
" |
|
6478 | 72 |
- the tab for the directory description text editor is not changed if the |
73 |
directory description changes to a normal text editor |
|
5354 | 74 |
- FileDialog should get a file history |
6478 | 75 |
- directorycontentsItem isDirectory fails if it is a symbolic link |
5354 | 76 |
- on sort order change in directory contents browser the columnspec shouldnt not reloaded |
77 |
- check all windowspecs with different font types |
|
5472 | 78 |
- multiple select with mouse moving is flickering (see bestFilename in FilenameEditField) |
79 |
- too many system calls on update cycle |
|
5532 | 80 |
- stop monitoring task for DirectoryTreebrowser and DirectoryContentsBrowser |
5354 | 81 |
" |
3892 | 82 |
! ! |
83 |
||
84 |
!FileBrowserV2 class methodsFor:'instance creation'! |
|
85 |
||
86 |
on:aDirectoryPath |
|
87 |
"return a new FileBrowserV2 in a pathname" |
|
88 |
||
4015 | 89 |
|instance files| |
90 |
instance := self new createBuilder. |
|
4172 | 91 |
aDirectoryPath isCollection ifTrue:[ |
92 |
files := aDirectoryPath |
|
93 |
] ifFalse:[ |
|
94 |
files := Array with:aDirectoryPath. |
|
95 |
]. |
|
3907 | 96 |
instance currentFileNameHolder value:files. |
3892 | 97 |
^ instance |
98 |
! |
|
99 |
||
100 |
open |
|
101 |
"start a new FileBrowserV2" |
|
102 |
||
103 |
| instance | |
|
104 |
instance := self new. |
|
105 |
instance open. |
|
106 |
^ instance |
|
5123 | 107 |
|
3892 | 108 |
" |
4626 | 109 |
FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) withExtent:800@600 |
3892 | 110 |
" |
111 |
! |
|
112 |
||
113 |
openOn:aDirectoryPath |
|
114 |
"start a new FileBrowserV2 in a pathname" |
|
115 |
||
116 |
| instance| |
|
117 |
instance := self on:aDirectoryPath asFilename. |
|
5123 | 118 |
instance open. |
119 |
^ instance. |
|
120 |
||
3892 | 121 |
" |
4626 | 122 |
FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) |
3892 | 123 |
" |
124 |
! |
|
125 |
||
126 |
openOn:aDirectoryPath withExtent:extent |
|
127 |
"start a new FileBrowserV2 in a pathname" |
|
128 |
||
129 |
| instance builder| |
|
130 |
instance := self on:aDirectoryPath. |
|
131 |
builder := instance open. |
|
132 |
builder window extent:extent. |
|
133 |
^ instance |
|
5123 | 134 |
|
3892 | 135 |
" |
4626 | 136 |
FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) withExtent:800@600 |
3892 | 137 |
" |
138 |
! |
|
139 |
||
5123 | 140 |
openOnFileNamed:aFilename |
5162 | 141 |
"start a new FileBrowserV2 on a aFilename. |
142 |
The browser looks for an appropriate viewer and uses that if one is found; |
|
143 |
otherwise, the file is opened for text editing." |
|
144 |
||
145 |
^ self openOnFileNamed:aFilename editing:true |
|
146 |
||
147 |
" |
|
148 |
FileBrowserV2 openOnFileNamed:'Makefile' |
|
149 |
" |
|
150 |
! |
|
151 |
||
152 |
openOnFileNamed:aFilename editing:editing |
|
153 |
"start a new FileBrowserV2 on a aFilename; |
|
154 |
If editing is true, the browser opens the document as text to be edited; |
|
155 |
if false, it looks for an appropriate viewer and uses that if one is found." |
|
5123 | 156 |
|
157 |
|f browser| |
|
158 |
||
159 |
f := aFilename asFilename asAbsoluteFilename. |
|
160 |
f isDirectory ifTrue:[ |
|
161 |
^ self openOn:aFilename |
|
162 |
]. |
|
163 |
||
164 |
browser := self on:(f directory). |
|
165 |
browser currentFileNameHolder setValue:(Array with:f). |
|
166 |
browser open. |
|
5162 | 167 |
editing ifTrue:[ |
168 |
browser openTextEditorForFile:f. |
|
169 |
] ifFalse:[ |
|
170 |
browser openApplForFile:f. |
|
171 |
]. |
|
5123 | 172 |
|
173 |
" |
|
174 |
FileBrowserV2 openOnFileNamed:'Makefile' |
|
175 |
" |
|
176 |
! |
|
177 |
||
3892 | 178 |
openWithAspects:someAspects withExtent:extent |
179 |
"start a new FileBrowserV2 in a pathname" |
|
180 |
||
181 |
|dir clone| |
|
182 |
||
183 |
dir := someAspects at:#currentFileNameHolder ifAbsent:nil. |
|
184 |
clone := self openOn:(dir value) withExtent:extent. |
|
185 |
! ! |
|
186 |
||
187 |
!FileBrowserV2 class methodsFor:'class initialization'! |
|
188 |
||
4027 | 189 |
applicationIcon |
6503 | 190 |
^ ToolbarIconLibrary startNewFileBrowserIcon |
4027 | 191 |
! |
192 |
||
3892 | 193 |
initialize |
6078 | 194 |
"/ self installInLauncher. - now done in phase 2 |
195 |
ObjectMemory addDependent:self. |
|
3892 | 196 |
! |
197 |
||
198 |
installInLauncher |
|
199 |
"add myself to the launcher menu and toolBar" |
|
200 |
||
3914 | 201 |
|menuItem icon action currentLauncher| |
3892 | 202 |
|
203 |
FileBrowserV2 isNil ifTrue:[^ self]. |
|
204 |
||
205 |
action := [FileBrowserV2 open]. |
|
206 |
||
6112 | 207 |
icon := [self applicationIcon]. "/ self defaultIcon magnifiedTo:28@28. |
3892 | 208 |
|
209 |
menuItem := MenuItem new |
|
4037 | 210 |
translateLabel: true; |
3892 | 211 |
value: action; |
212 |
isButton: false; |
|
6237 | 213 |
label:'File Browser' icon:icon; |
3892 | 214 |
nameKey: #fileBrowserV2; |
215 |
activeHelpKey: #fileBrowserV2; |
|
216 |
submenuChannel: #menuFileHistory; |
|
217 |
showBusyCursorWhilePerforming:true. |
|
218 |
||
5630
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
219 |
NewLauncher |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
220 |
addMenuItem:menuItem |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
221 |
from:self |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
222 |
in:'menu.file' |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
223 |
position:#( #before #fileBrowser) |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
224 |
space:true. |
3892 | 225 |
|
226 |
menuItem := MenuItem new |
|
4037 | 227 |
translateLabel: true; |
3892 | 228 |
value: action; |
229 |
isButton: true; |
|
6237 | 230 |
"label:'File Browser'" icon:icon; |
3892 | 231 |
nameKey: #fileBrowserV2; |
232 |
activeHelpKey: #fileBrowserV2; |
|
233 |
submenuChannel: #menuFileHistory; |
|
234 |
showBusyCursorWhilePerforming:true. |
|
235 |
||
5630
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
236 |
NewLauncher |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
237 |
addMenuItem:menuItem |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
238 |
from:self |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
239 |
in:'toolbar' |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
240 |
position:#( #before #fileBrowser) |
167c807f720a
pass mySelf when defining a userAddedItem to allow for re-translation.
Claus Gittinger <cg@exept.de>
parents:
5532
diff
changeset
|
241 |
space:false. |
3892 | 242 |
|
3918 | 243 |
currentLauncher := NewLauncher current. |
3914 | 244 |
currentLauncher notNil ifTrue:[ |
245 |
currentLauncher fileBrowserItemVisible value:false |
|
246 |
]. |
|
4380
0987d10ae2ba
install and remove from Launcher install in settings application changed
penk
parents:
4377
diff
changeset
|
247 |
NewLauncher addSettingsApplicationByClass:#'FileBrowserV2SettingsAppl' |
0987d10ae2ba
install and remove from Launcher install in settings application changed
penk
parents:
4377
diff
changeset
|
248 |
withName:'Tools/FileBrowserV2' |
0987d10ae2ba
install and remove from Launcher install in settings application changed
penk
parents:
4377
diff
changeset
|
249 |
icon:nil. |
3908 | 250 |
|
3892 | 251 |
" |
252 |
self installInLauncher |
|
253 |
self removeFromLauncher |
|
254 |
" |
|
255 |
! |
|
256 |
||
257 |
removeFromLauncher |
|
258 |
"/ |
|
259 |
"/ remove myself from the launcher menu |
|
260 |
"/ |
|
261 |
||
3914 | 262 |
|currentLauncher| |
263 |
||
3892 | 264 |
NewLauncher isNil ifTrue:[^ self]. |
3908 | 265 |
NewLauncher removeUserTool:#fileBrowserV2. |
3918 | 266 |
currentLauncher := NewLauncher current. |
3914 | 267 |
currentLauncher notNil ifTrue:[ |
268 |
currentLauncher fileBrowserItemVisible value:false |
|
269 |
]. |
|
4380
0987d10ae2ba
install and remove from Launcher install in settings application changed
penk
parents:
4377
diff
changeset
|
270 |
NewLauncher removeSettingsApplicationByClass:#'FileBrowserV2SettingsAppl'. |
3892 | 271 |
|
272 |
" |
|
273 |
self removeFromLauncher |
|
274 |
" |
|
6078 | 275 |
! |
276 |
||
277 |
update:something with:aParameter from:changedObject |
|
278 |
something == #initialized ifTrue:[ |
|
279 |
changedObject == ObjectMemory ifTrue:[ |
|
280 |
self installInLauncher. |
|
281 |
ObjectMemory removeDependent:self. |
|
282 |
] |
|
283 |
]. |
|
3892 | 284 |
! ! |
285 |
||
286 |
!FileBrowserV2 class methodsFor:'defaults'! |
|
287 |
||
288 |
entryFieldEndStringForMultipleSelection |
|
289 |
||
290 |
^ ('[*]') |
|
291 |
! ! |
|
292 |
||
293 |
!FileBrowserV2 class methodsFor:'help specs'! |
|
294 |
||
6334 | 295 |
flyByHelpSpec |
296 |
"This resource specification was automatically generated |
|
297 |
by the UIHelpTool of ST/X." |
|
298 |
||
299 |
"Do not manually edit this!! If it is corrupted, |
|
300 |
the UIHelpTool may not be able to read the specification." |
|
301 |
||
302 |
" |
|
303 |
UIHelpTool openOnClass:FileBrowserV2 |
|
304 |
" |
|
305 |
||
306 |
<resource: #help> |
|
307 |
||
308 |
^ super flyByHelpSpec addPairsFrom:#( |
|
309 |
||
310 |
#columnLabel |
|
311 |
'The text-cursor''s column number' |
|
312 |
||
313 |
#encodingLabel |
|
314 |
'The file''s encoding (Menu to change)' |
|
315 |
||
316 |
#encodingLockedLabel |
|
317 |
'Lock the file-encoding (do not try to guess from the file''s contents)' |
|
318 |
||
319 |
#lineLabel |
|
320 |
'The text-cursor''s line number' |
|
321 |
||
322 |
#modeLabel |
|
323 |
'The editing mode (insert vs. overwrite)' |
|
324 |
||
325 |
#numberOfFiles |
|
326 |
'Number of files shown (Total number of files in directory)' |
|
327 |
||
328 |
) |
|
329 |
! |
|
330 |
||
4688 | 331 |
helpSpec |
332 |
"This resource specification was automatically generated |
|
333 |
by the UIHelpTool of ST/X." |
|
334 |
||
335 |
"Do not manually edit this!! If it is corrupted, |
|
336 |
the UIHelpTool may not be able to read the specification." |
|
337 |
||
338 |
" |
|
339 |
UIHelpTool openOnClass:FileBrowserV2 |
|
340 |
" |
|
341 |
||
342 |
<resource: #help> |
|
343 |
||
344 |
^ super helpSpec addPairsFrom:#( |
|
345 |
||
6334 | 346 |
#columnLabel |
347 |
'The text-cursor''s column number.' |
|
5398 | 348 |
|
6334 | 349 |
#encodingLabel |
350 |
'The files encoding.' |
|
5398 | 351 |
|
6334 | 352 |
#encodingLockedLabel |
353 |
'Lock the file-encoding (do not try to guess from the file''s contents).' |
|
5398 | 354 |
|
6334 | 355 |
#lineLabel |
356 |
'The text-cursor''s line number.' |
|
357 |
||
358 |
#modeLabel |
|
359 |
'The editing mode (insert vs. overwrite).' |
|
4688 | 360 |
|
361 |
) |
|
3892 | 362 |
! ! |
363 |
||
6338 | 364 |
!FileBrowserV2 class methodsFor:'image specs'! |
3892 | 365 |
|
6525 | 366 |
closePreviewButtonImage |
367 |
^ ToolbarIconLibrary removeTabIcon |
|
368 |
! |
|
369 |
||
3892 | 370 |
defaultIcon |
371 |
"This resource specification was automatically generated |
|
372 |
by the ImageEditor of ST/X." |
|
373 |
||
374 |
"Do not manually edit this!! If it is corrupted, |
|
375 |
the ImageEditor may not be able to read the specification." |
|
376 |
||
377 |
" |
|
378 |
self defaultIcon inspect |
|
379 |
ImageEditor openOnClass:self andSelector:#defaultIcon |
|
380 |
" |
|
381 |
||
382 |
<resource: #image> |
|
383 |
||
384 |
^Icon |
|
385 |
constantNamed:#'FileBrowserV2 class defaultIcon' |
|
386 |
ifAbsentPut:[(Depth4Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
387 |
@@@@@@@@@@@@@@@@@@@@CLA&Y&Y&Y&X@@ADP@@@L0F@@@@@@A @ADAD@@@3@XN;.;.8F@ADPDQ@@CLA ;.@@@@@@D@@@D@@L0FC.8O[6=/@QDADP@@3@X@; |
|
388 |
[6=/[0DPDP@@CLA DNC6<@@F<ADP@@@L0F@A@F= [0= @@@@@@3@X@@P=/[6=/@@@@@@CLA @@A/[6=/X@@@@@@L0FC0@O[6=/[0@@@@@@3@XF<@@@@@@@@@ |
|
389 |
@@@@CLA = @@@@@@@@@@@@@L0FA/[6=/A @@@@@@@@3@XO[6=/XF@@@@@@@@CLA @@@@@@X@@@@@@@@L0FY&Y&Y&Y @@@@@@@@C@Y&Y&Y&Y&@@@@@@@@@@@@ |
|
390 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@N@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
391 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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:' |
|
392 |
O??# C??9<@??>? O???<C????@????0O???8C???<@???>@O??<@C???@@???0@O??<@C??8@@??>@@O?? @C??8@@??>@@G?? @@??8@@@@@@@G.P=0AAD |
|
393 |
HP@PQBD@GDP8 AADHD@PQBA@DN^=0@@a') ; yourself); yourself] |
|
394 |
! |
|
395 |
||
6339 | 396 |
encodingLockIcon |
397 |
<resource: #programImage> |
|
398 |
||
399 |
^ ToolbarIconLibrary encodingLockIcon |
|
400 |
! |
|
401 |
||
3892 | 402 |
hideFilenameEntryFieldIcon |
403 |
<resource: #programImage> |
|
404 |
||
405 |
^ ToolbarIconLibrary hideToolbarIconH14 |
|
406 |
! |
|
407 |
||
408 |
hideToolBarIcon |
|
409 |
<resource: #programImage> |
|
410 |
||
411 |
^ ToolbarIconLibrary hideToolbarIconH26 |
|
412 |
! ! |
|
413 |
||
414 |
!FileBrowserV2 class methodsFor:'interface specs'! |
|
415 |
||
416 |
windowSpec |
|
417 |
"This resource specification was automatically generated |
|
418 |
by the UIPainter of ST/X." |
|
419 |
||
420 |
"Do not manually edit this!! If it is corrupted, |
|
421 |
the UIPainter may not be able to read the specification." |
|
422 |
||
423 |
" |
|
424 |
UIPainter new openOnClass:FileBrowserV2 andSelector:#windowSpec |
|
425 |
FileBrowserV2 new openInterface:#windowSpec |
|
426 |
FileBrowserV2 open |
|
427 |
" |
|
428 |
||
429 |
<resource: #canvas> |
|
430 |
||
431 |
^ |
|
5331 | 432 |
#(FullSpec |
433 |
name: windowSpec |
|
434 |
window: |
|
435 |
(WindowSpec |
|
436 |
label: FileBrowser |
|
437 |
name: FileBrowser |
|
438 |
min: (Point 10 10) |
|
5680 | 439 |
bounds: (Rectangle 0 0 800 600) |
5331 | 440 |
menu: mainMenu |
441 |
icon: applicationIcon |
|
3892 | 442 |
) |
5331 | 443 |
component: |
444 |
(SpecCollection |
|
445 |
collection: ( |
|
446 |
(ViewSpec |
|
6079 | 447 |
name: 'ToolbarBox' |
448 |
layout: (LayoutFrame 0 0 0 0 0 1 30 0) |
|
449 |
level: 0 |
|
450 |
visibilityChannel: toolBarVisibleHolder |
|
451 |
component: |
|
452 |
(SpecCollection |
|
453 |
collection: ( |
|
454 |
(ActionButtonSpec |
|
455 |
label: 'hideToolBarIcon' |
|
456 |
name: 'HideToolBarButton' |
|
457 |
layout: (LayoutFrame 0 0 0 0 13 0 30 0) |
|
458 |
activeHelpKey: hideToolBar |
|
459 |
hasCharacterOrientedLabel: false |
|
460 |
translateLabel: true |
|
461 |
model: hideToolbar |
|
462 |
postBuildCallback: hideToolBarButtonCreated: |
|
463 |
) |
|
464 |
(MenuPanelSpec |
|
465 |
name: 'ToolBar' |
|
466 |
layout: (LayoutFrame 13 0 0 0 0 1 32 0) |
|
467 |
menu: toolBarMainMenu |
|
468 |
textDefault: true |
|
469 |
) |
|
470 |
) |
|
471 |
||
472 |
) |
|
473 |
) |
|
474 |
(ViewSpec |
|
5331 | 475 |
name: 'FilenameEntryFieldBox' |
6079 | 476 |
layout: (LayoutFrame 0 0 32 0 0 1 57 0) |
5331 | 477 |
level: 0 |
478 |
visibilityChannel: filenameEntryFieldVisibleHolder |
|
479 |
component: |
|
480 |
(SpecCollection |
|
481 |
collection: ( |
|
482 |
(ActionButtonSpec |
|
483 |
label: 'hideFilenameEntryFieldIcon' |
|
484 |
name: 'HideFilenameEntryFieldButton' |
|
485 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
486 |
activeHelpKey: hideFilenameEntryField |
|
487 |
hasCharacterOrientedLabel: false |
|
488 |
translateLabel: true |
|
489 |
model: hideFilenameEntryField |
|
490 |
postBuildCallback: hideFilenameEntryFieldButtonCreated: |
|
3892 | 491 |
) |
5331 | 492 |
(HorizontalPanelViewSpec |
493 |
name: 'HorizontalPanel1' |
|
494 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
495 |
level: 1 |
|
496 |
horizontalLayout: leftFit |
|
497 |
verticalLayout: fit |
|
498 |
horizontalSpace: 3 |
|
499 |
verticalSpace: 3 |
|
500 |
component: |
|
501 |
(SpecCollection |
|
502 |
collection: ( |
|
503 |
(ComboListSpec |
|
504 |
name: 'ComboList1' |
|
505 |
visibilityChannel: driveSelectorVisible |
|
506 |
model: selectedDeviceDrive |
|
507 |
comboList: listOfDeviceDrives |
|
508 |
useIndex: false |
|
6079 | 509 |
hidePullDownMenuButton: false |
5331 | 510 |
extent: (Point 53 23) |
5120 | 511 |
) |
5331 | 512 |
(VariableHorizontalPanelSpec |
513 |
name: 'VariableHorizontalPanel1' |
|
514 |
level: 0 |
|
515 |
showHandle: true |
|
516 |
component: |
|
517 |
(SpecCollection |
|
518 |
collection: ( |
|
519 |
(NonScrollableArbitraryComponentSpec |
|
520 |
name: 'NonScrollableArbitraryComponent1' |
|
521 |
component: FilenameEditFieldV2 |
|
522 |
postBuildCallback: postBuildEditField: |
|
3892 | 523 |
) |
5331 | 524 |
(ViewSpec |
525 |
name: 'FilterBox' |
|
526 |
component: |
|
527 |
(SpecCollection |
|
528 |
collection: ( |
|
529 |
(LabelSpec |
|
530 |
label: 'Filter:' |
|
531 |
name: 'Filter' |
|
532 |
layout: (LayoutFrame 0 0 0 0 40 0 0 1) |
|
533 |
translateLabel: true |
|
534 |
adjust: left |
|
535 |
postBuildCallback: postBuildPathViewBox: |
|
3892 | 536 |
) |
5331 | 537 |
(ComboBoxSpec |
538 |
name: 'FilterSelectionBox' |
|
539 |
layout: (LayoutFrame 40 0 0 0 0 1 0 1) |
|
540 |
model: filterModel |
|
541 |
immediateAccept: true |
|
542 |
acceptOnPointerLeave: false |
|
543 |
comboList: filterListModel |
|
3892 | 544 |
) |
545 |
) |
|
546 |
||
547 |
) |
|
5331 | 548 |
postBuildCallback: postBuildPathViewBox: |
3892 | 549 |
) |
550 |
) |
|
551 |
||
552 |
) |
|
5331 | 553 |
handles: (Any 0.774936 1.0) |
554 |
postBuildCallback: postBuildPathViewBox: |
|
555 |
useDefaultExtent: true |
|
3892 | 556 |
) |
557 |
) |
|
558 |
||
559 |
) |
|
5331 | 560 |
postBuildCallback: postBuildPathViewBox: |
3892 | 561 |
) |
562 |
) |
|
563 |
||
564 |
) |
|
565 |
) |
|
5331 | 566 |
(#'FileBrowserV2UISpecifications::PanelSpec' |
567 |
name: 'BrowserBox' |
|
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
568 |
layout: (LayoutFrame 0 0.0 57 0.0 0 1.0 -26 1.0) |
5331 | 569 |
level: 0 |
570 |
showHandle: true |
|
571 |
snapMode: both |
|
572 |
whichView: last |
|
573 |
orientation: vertical |
|
574 |
visibility: viewNoteBookApplicationHolder |
|
575 |
component: |
|
576 |
(SpecCollection |
|
577 |
collection: ( |
|
578 |
(#'FileBrowserV2UISpecifications::PanelSpec' |
|
579 |
name: 'HorizontalPanel' |
|
580 |
level: 0 |
|
581 |
snapMode: both |
|
582 |
whichView: first |
|
583 |
orientation: horizontal |
|
584 |
visibility: showDirectoryTree |
|
585 |
component: |
|
586 |
(SpecCollection |
|
587 |
collection: ( |
|
588 |
(SubCanvasSpec |
|
589 |
name: 'DirectoryTreeBrowser' |
|
590 |
hasHorizontalScrollBar: false |
|
591 |
hasVerticalScrollBar: false |
|
592 |
majorKey: DirectoryTreeBrowser |
|
593 |
createNewApplication: true |
|
594 |
createNewBuilder: true |
|
595 |
postBuildCallback: postBuildDirectoryTree: |
|
3892 | 596 |
) |
5331 | 597 |
(SubCanvasSpec |
598 |
name: 'DirectoryContentsBrowser' |
|
599 |
hasHorizontalScrollBar: false |
|
600 |
hasVerticalScrollBar: false |
|
601 |
majorKey: DirectoryContentsBrowser |
|
602 |
createNewApplication: true |
|
603 |
createNewBuilder: true |
|
3892 | 604 |
) |
605 |
) |
|
606 |
||
607 |
) |
|
5331 | 608 |
handles: (Any 0.225 1.0) |
4595
09c632988dad
Add handles to resize VerticalPanel
Stefan Vogel <sv@exept.de>
parents:
4593
diff
changeset
|
609 |
) |
5331 | 610 |
(SubCanvasSpec |
611 |
name: 'FileApplicationNoteBook' |
|
612 |
tabable: false |
|
613 |
hasHorizontalScrollBar: false |
|
614 |
hasVerticalScrollBar: false |
|
615 |
majorKey: FileApplicationNoteBook |
|
616 |
createNewApplication: true |
|
617 |
createNewBuilder: true |
|
3892 | 618 |
) |
619 |
) |
|
620 |
||
621 |
) |
|
5331 | 622 |
handles: (Any 0.5 1.0) |
3892 | 623 |
) |
5331 | 624 |
(ViewSpec |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
625 |
name: 'InfoBox' |
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
626 |
layout: (LayoutFrame 0 0 -26 1 0 1 0 1) |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
627 |
level: 0 |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
628 |
visibilityChannel: infoBarVisibleHolder |
5331 | 629 |
component: |
630 |
(SpecCollection |
|
631 |
collection: ( |
|
632 |
(LabelSpec |
|
633 |
label: 'NotifyLabel' |
|
634 |
name: 'NotifyLabel' |
|
635 |
layout: (LayoutFrame 0 0 1 0.0 -220 1 1 1.0) |
|
636 |
level: -1 |
|
637 |
translateLabel: true |
|
638 |
labelChannel: notifyChannel |
|
639 |
adjust: left |
|
4018 | 640 |
) |
5528 | 641 |
(LabelSpec |
642 |
label: 'encoding' |
|
643 |
name: 'EncodingLabel' |
|
6339 | 644 |
layout: (LayoutFrame -318 1 2 0.0 -235 1 0 1.0) |
6334 | 645 |
activeHelpKey: encodingLabel |
5528 | 646 |
level: 0 |
647 |
labelChannel: fileEncodingHolder |
|
648 |
adjust: right |
|
649 |
menu: encodingMenu |
|
650 |
) |
|
5331 | 651 |
(LabelSpec |
6334 | 652 |
name: 'FileEncodingLockedLabel' |
6339 | 653 |
layout: (LayoutFrame -235 1 2 0.0 -220 1 20 0.0) |
6334 | 654 |
activeHelpKey: encodingLockedLabel |
655 |
level: 0 |
|
656 |
labelChannel: fileEncodingLockImageHolder |
|
657 |
adjust: right |
|
658 |
menu: encodingMenu |
|
659 |
) |
|
660 |
(LabelSpec |
|
5331 | 661 |
label: 'Shown Files' |
662 |
name: 'ShownFilesLabel' |
|
663 |
layout: (LayoutFrame -220 1 1 0.0 -60 1 1 1.0) |
|
6334 | 664 |
activeHelpKey: numberOfFiles |
5331 | 665 |
level: -1 |
666 |
translateLabel: true |
|
667 |
labelChannel: shownFiles |
|
668 |
adjust: right |
|
5120 | 669 |
) |
6119 | 670 |
(ViewSpec |
671 |
name: 'ProgressIndicatorBox' |
|
672 |
layout: (LayoutFrame -220 1 1 0.0 -60 1 1 1.0) |
|
673 |
level: -1 |
|
674 |
visibilityChannel: activityVisibilityChannel |
|
675 |
component: |
|
676 |
(SpecCollection |
|
677 |
collection: ( |
|
678 |
(ProgressIndicatorSpec |
|
679 |
name: 'ProgressIndicator1' |
|
680 |
layout: (LayoutFrame 5 0.0 -7 0.5 -5 1.0 7 0.5) |
|
681 |
backgroundColor: (Color 0.0 66.666666666667 66.666666666667) |
|
682 |
isActivityIndicator: true |
|
683 |
) |
|
684 |
) |
|
685 |
||
686 |
) |
|
687 |
) |
|
5331 | 688 |
(LabelSpec |
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
689 |
name: 'BusyLabel' |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
690 |
layout: (LayoutFrame -220 1 1 0.0 -60 1 1 1.0) |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
691 |
activeHelpKey: modeLabel |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
692 |
level: -1 |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
693 |
visibilityChannel: busyLabelVisibleHolder |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
694 |
translateLabel: true |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
695 |
labelChannel: busyLabelHolder |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
696 |
adjust: right |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
697 |
) |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
698 |
(LabelSpec |
5331 | 699 |
label: 'M' |
700 |
name: 'ModeLabel' |
|
701 |
layout: (LayoutFrame -60 1 1 0.0 -50 1 1 1.0) |
|
6334 | 702 |
activeHelpKey: modeLabel |
5331 | 703 |
level: -1 |
704 |
translateLabel: true |
|
705 |
labelChannel: modeLabelHolder |
|
7102 | 706 |
postBuildCallback: postBuildEditModeInfoLabel: |
5331 | 707 |
adjust: right |
4647 | 708 |
) |
5331 | 709 |
(LabelSpec |
710 |
label: 'L' |
|
711 |
name: 'LineLabel' |
|
712 |
layout: (LayoutFrame -50 1 1 0.0 -20 1 1 1.0) |
|
6334 | 713 |
activeHelpKey: lineLabel |
5331 | 714 |
level: -1 |
715 |
translateLabel: true |
|
716 |
labelChannel: cursorLineLabelHolder |
|
717 |
adjust: right |
|
5120 | 718 |
) |
5331 | 719 |
(LabelSpec |
720 |
label: 'C' |
|
721 |
name: 'ColLabel' |
|
722 |
layout: (LayoutFrame -20 1 1 0.0 0 1 1 1.0) |
|
6334 | 723 |
activeHelpKey: columnLabel |
5331 | 724 |
level: -1 |
725 |
translateLabel: true |
|
726 |
labelChannel: cursorColLabelHolder |
|
727 |
adjust: right |
|
4647 | 728 |
) |
729 |
) |
|
730 |
||
731 |
) |
|
732 |
) |
|
5331 | 733 |
(LabelSpec |
734 |
label: 'Preview' |
|
735 |
name: 'PreviewLabel' |
|
736 |
layout: (LayoutFrame 0 0.5 39 0 100 0.5 61 0) |
|
737 |
level: 0 |
|
738 |
borderWidth: 1 |
|
739 |
visibilityChannel: previewVisibleHolder |
|
6079 | 740 |
backgroundColor: (Color 86.999313344015 86.999313344015 86.999313344015) |
5331 | 741 |
translateLabel: true |
4647 | 742 |
) |
5331 | 743 |
(ArbitraryComponentSpec |
744 |
name: 'Preview' |
|
745 |
layout: (LayoutFrame 0 0.5 63 0 -147 1 -319 1) |
|
746 |
level: 1 |
|
747 |
visibilityChannel: previewVisibleHolder |
|
748 |
hasBorder: false |
|
749 |
component: ImageView |
|
4647 | 750 |
) |
6524 | 751 |
(ActionButtonSpec |
752 |
label: 'closePreviewButtonImage' |
|
753 |
name: 'ClosePreviewButton' |
|
754 |
layout: (LayoutFrame -169 1 39 0 -147 1 61 0) |
|
755 |
visibilityChannel: previewVisibleHolder |
|
756 |
hasCharacterOrientedLabel: false |
|
757 |
translateLabel: true |
|
758 |
) |
|
4647 | 759 |
) |
760 |
||
761 |
) |
|
762 |
) |
|
7102 | 763 |
|
764 |
"Modified: / 11-09-2006 / 12:24:32 / cg" |
|
3892 | 765 |
! ! |
766 |
||
767 |
!FileBrowserV2 class methodsFor:'menu specs'! |
|
768 |
||
7102 | 769 |
editModeInfoLabelMenu |
770 |
"This resource specification was automatically generated |
|
771 |
by the MenuEditor of ST/X." |
|
772 |
||
773 |
"Do not manually edit this!! If it is corrupted, |
|
774 |
the MenuEditor may not be able to read the specification." |
|
775 |
||
776 |
" |
|
777 |
MenuEditor new openOnClass:Tools::NewSystemBrowser andSelector:#editModeInfoLabelMenu |
|
778 |
(Menu new fromLiteralArrayEncoding:(Tools::NewSystemBrowser editModeInfoLabelMenu)) startUp |
|
779 |
" |
|
780 |
||
781 |
<resource: #menu> |
|
782 |
||
783 |
^ |
|
784 |
#(Menu |
|
785 |
( |
|
786 |
(MenuItem |
|
787 |
label: 'Insert' |
|
788 |
itemValue: editModeInsert |
|
789 |
translateLabel: true |
|
790 |
) |
|
791 |
(MenuItem |
|
792 |
label: 'Overwrite' |
|
793 |
itemValue: editModeOverwrite |
|
794 |
translateLabel: true |
|
795 |
) |
|
796 |
(MenuItem |
|
797 |
label: 'Insert Selecting' |
|
798 |
itemValue: editModeInsertAndSelect |
|
799 |
translateLabel: true |
|
800 |
) |
|
801 |
) |
|
802 |
nil |
|
803 |
nil |
|
804 |
) |
|
805 |
||
806 |
"Created: / 11-09-2006 / 12:23:59 / cg" |
|
807 |
! |
|
808 |
||
5528 | 809 |
encodingMenu |
810 |
"This resource specification was automatically generated |
|
811 |
by the MenuEditor of ST/X." |
|
812 |
||
813 |
"Do not manually edit this!! If it is corrupted, |
|
814 |
the MenuEditor may not be able to read the specification." |
|
815 |
||
816 |
" |
|
817 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#encodingMenu |
|
818 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 encodingMenu)) startUp |
|
819 |
" |
|
820 |
||
821 |
<resource: #menu> |
|
822 |
||
823 |
^ |
|
824 |
#(Menu |
|
825 |
( |
|
826 |
(MenuItem |
|
827 |
label: 'Encoding...' |
|
828 |
itemValue: fileEncodingDialog |
|
829 |
translateLabel: true |
|
830 |
) |
|
6334 | 831 |
(MenuItem |
832 |
label: '-' |
|
833 |
) |
|
834 |
(MenuItem |
|
835 |
label: 'Locked' |
|
836 |
translateLabel: true |
|
837 |
indication: lockFileEncodingHolder |
|
838 |
) |
|
5528 | 839 |
) |
840 |
nil |
|
841 |
nil |
|
842 |
) |
|
843 |
! |
|
844 |
||
3892 | 845 |
mainMenu |
846 |
"This resource specification was automatically generated |
|
847 |
by the MenuEditor of ST/X." |
|
848 |
||
849 |
"Do not manually edit this!! If it is corrupted, |
|
850 |
the MenuEditor may not be able to read the specification." |
|
851 |
||
852 |
" |
|
853 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#mainMenu |
|
854 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 mainMenu)) startUp |
|
855 |
" |
|
856 |
||
857 |
<resource: #menu> |
|
858 |
||
859 |
^ |
|
5424 | 860 |
#(Menu |
861 |
( |
|
862 |
(MenuItem |
|
863 |
label: 'Browser' |
|
864 |
translateLabel: true |
|
865 |
submenuChannel: browserMenu |
|
866 |
keepLinkedMenu: true |
|
3892 | 867 |
) |
5424 | 868 |
(MenuItem |
869 |
label: 'Directory' |
|
870 |
translateLabel: true |
|
871 |
submenuChannel: directoryMenu |
|
872 |
keepLinkedMenu: true |
|
3892 | 873 |
) |
5424 | 874 |
(MenuItem |
875 |
label: 'File' |
|
876 |
translateLabel: true |
|
877 |
submenuChannel: fileMenu |
|
878 |
keepLinkedMenu: true |
|
3892 | 879 |
) |
5424 | 880 |
(MenuItem |
881 |
label: 'Edit' |
|
882 |
translateLabel: true |
|
883 |
submenuChannel: editMenu |
|
884 |
keepLinkedMenu: true |
|
885 |
) |
|
886 |
(MenuItem |
|
887 |
label: 'View' |
|
888 |
translateLabel: true |
|
889 |
submenu: |
|
890 |
(Menu |
|
891 |
( |
|
892 |
(MenuItem |
|
893 |
label: 'Details' |
|
894 |
translateLabel: true |
|
895 |
submenuChannel: viewInContentsBrowserMenu |
|
3892 | 896 |
) |
5424 | 897 |
(MenuItem |
898 |
label: 'Sort' |
|
899 |
translateLabel: true |
|
900 |
submenuChannel: sortMenu |
|
3892 | 901 |
) |
5424 | 902 |
(MenuItem |
903 |
label: 'Show' |
|
904 |
translateLabel: true |
|
905 |
submenuChannel: showMenuSpec |
|
3892 | 906 |
) |
5424 | 907 |
(MenuItem |
908 |
label: '-' |
|
3892 | 909 |
) |
5424 | 910 |
(MenuItem |
911 |
label: 'Toolbar' |
|
912 |
translateLabel: true |
|
913 |
hideMenuOnActivated: false |
|
914 |
indication: toolBarVisibleHolder |
|
3892 | 915 |
) |
5424 | 916 |
(MenuItem |
917 |
label: 'Path Entry && Filter' |
|
918 |
translateLabel: true |
|
919 |
hideMenuOnActivated: false |
|
920 |
indication: filenameEntryFieldVisibleHolder |
|
3892 | 921 |
) |
5424 | 922 |
(MenuItem |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
923 |
label: 'Info' |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
924 |
translateLabel: true |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
925 |
hideMenuOnActivated: false |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
926 |
indication: infoBarVisibleHolder |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
927 |
) |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
928 |
(MenuItem |
5424 | 929 |
label: 'Preview' |
930 |
translateLabel: true |
|
931 |
hideMenuOnActivated: false |
|
932 |
indication: previewVisibleHolder |
|
4252 | 933 |
) |
5424 | 934 |
(MenuItem |
935 |
label: '-' |
|
3892 | 936 |
) |
5424 | 937 |
(MenuItem |
938 |
label: 'Update' |
|
939 |
itemValue: updateCurrentDirectory |
|
940 |
translateLabel: true |
|
3892 | 941 |
) |
942 |
) |
|
943 |
nil |
|
944 |
nil |
|
945 |
) |
|
946 |
) |
|
5424 | 947 |
(MenuItem |
948 |
label: 'Tools' |
|
949 |
translateLabel: true |
|
950 |
submenuChannel: toolsMenuSpec |
|
951 |
keepLinkedMenu: true |
|
3892 | 952 |
) |
5424 | 953 |
(MenuItem |
954 |
label: 'CVS' |
|
955 |
translateLabel: true |
|
956 |
submenuChannel: cvsMenu |
|
957 |
keepLinkedMenu: true |
|
3892 | 958 |
) |
5424 | 959 |
(MenuItem |
960 |
label: 'Help' |
|
961 |
translateLabel: true |
|
7413
842b1274968f
new startGroup value: #conditionalRight
Claus Gittinger <cg@exept.de>
parents:
7314
diff
changeset
|
962 |
startGroup: conditionalRight |
5424 | 963 |
submenu: |
964 |
(Menu |
|
965 |
( |
|
966 |
(MenuItem |
|
967 |
label: 'FileBrowser Documentation' |
|
968 |
itemValue: openHTMLDocument: |
|
969 |
translateLabel: true |
|
5750 | 970 |
argument: 'tools/fbrowserV2/TOP.html' |
3892 | 971 |
) |
5424 | 972 |
(MenuItem |
973 |
label: '-' |
|
3892 | 974 |
) |
5424 | 975 |
(MenuItem |
976 |
label: 'About FileBrowser...' |
|
977 |
itemValue: openAboutThisApplication |
|
978 |
translateLabel: true |
|
3892 | 979 |
) |
980 |
) |
|
981 |
nil |
|
982 |
nil |
|
983 |
) |
|
984 |
) |
|
985 |
) |
|
986 |
nil |
|
987 |
nil |
|
988 |
) |
|
989 |
! |
|
990 |
||
4257 | 991 |
previewLabelMenu |
992 |
"This resource specification was automatically generated |
|
993 |
by the MenuEditor of ST/X." |
|
994 |
||
995 |
"Do not manually edit this!! If it is corrupted, |
|
996 |
the MenuEditor may not be able to read the specification." |
|
997 |
||
998 |
" |
|
999 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#previewLabelMenu |
|
1000 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 previewLabelMenu)) startUp |
|
1001 |
" |
|
1002 |
||
1003 |
<resource: #menu> |
|
1004 |
||
1005 |
^ |
|
1006 |
#(#Menu |
|
1007 |
#( |
|
1008 |
#(#MenuItem |
|
1009 |
#label: 'Close Preview' |
|
1010 |
#itemValue: #closePreview |
|
1011 |
#translateLabel: true |
|
1012 |
) |
|
1013 |
) |
|
1014 |
nil |
|
1015 |
nil |
|
1016 |
) |
|
1017 |
! |
|
1018 |
||
3892 | 1019 |
toolBarMainMenu |
1020 |
"This resource specification was automatically generated |
|
1021 |
by the MenuEditor of ST/X." |
|
1022 |
||
1023 |
"Do not manually edit this!! If it is corrupted, |
|
1024 |
the MenuEditor may not be able to read the specification." |
|
1025 |
||
1026 |
" |
|
1027 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu |
|
1028 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu)) startUp |
|
1029 |
" |
|
1030 |
||
1031 |
<resource: #menu> |
|
1032 |
||
1033 |
^ |
|
5398 | 1034 |
#(Menu |
1035 |
( |
|
1036 |
(MenuItem |
|
1037 |
activeHelpKey: directoryBack |
|
1038 |
enabled: enableBack |
|
1039 |
label: 'Back' |
|
1040 |
itemValue: doBack |
|
1041 |
translateLabel: true |
|
1042 |
isButton: true |
|
1043 |
submenuChannel: menuDirHistoryBack |
|
6093 | 1044 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyBackIcon) |
3892 | 1045 |
) |
5398 | 1046 |
(MenuItem |
1047 |
label: '' |
|
3892 | 1048 |
) |
5398 | 1049 |
(MenuItem |
1050 |
activeHelpKey: directoryForward |
|
1051 |
enabled: enableForward |
|
1052 |
label: 'Forward' |
|
1053 |
itemValue: doForward |
|
1054 |
translateLabel: true |
|
1055 |
isButton: true |
|
1056 |
submenuChannel: menuDirHistoryForward |
|
6093 | 1057 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyForwardIcon) |
3892 | 1058 |
) |
5398 | 1059 |
(MenuItem |
6460 | 1060 |
label: '-' |
1061 |
) |
|
1062 |
(MenuItem |
|
1063 |
activeHelpKey: directoryUp |
|
1064 |
enabled: enableDirectoryUp |
|
1065 |
label: 'DirectoryUp' |
|
1066 |
itemValue: doGoDirectoryUp |
|
1067 |
translateLabel: true |
|
1068 |
isButton: true |
|
1069 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryUpIcon) |
|
3892 | 1070 |
) |
5398 | 1071 |
(MenuItem |
1072 |
activeHelpKey: fileHome |
|
1073 |
enabled: enableHome |
|
1074 |
label: 'Home' |
|
1075 |
itemValue: doGotoHomeDirectory |
|
1076 |
translateLabel: true |
|
1077 |
isButton: true |
|
6096 | 1078 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon) |
3892 | 1079 |
) |
5398 | 1080 |
(MenuItem |
6456 | 1081 |
activeHelpKey: fileGotoDefaultDirectory |
1082 |
enabled: enableGotoDefaultDirectory |
|
1083 |
label: 'Current' |
|
1084 |
itemValue: doGotoDefaultDirectory |
|
1085 |
translateLabel: true |
|
1086 |
isButton: true |
|
1087 |
isVisible: false |
|
1088 |
labelImage: (ResourceRetriever ToolbarIconLibrary currentDirectoryIcon) |
|
1089 |
) |
|
1090 |
(MenuItem |
|
6454 | 1091 |
activeHelpKey: fileGotoSmalltalkDirectory |
1092 |
enabled: enableGotoSmalltalkDirectory |
|
5398 | 1093 |
label: 'ST/X Default' |
6454 | 1094 |
itemValue: doGotoSmalltalkDirectory |
5398 | 1095 |
translateLabel: true |
1096 |
isButton: true |
|
6096 | 1097 |
labelImage: (ResourceRetriever ToolbarIconLibrary stxHomeIcon) |
4593 | 1098 |
) |
5398 | 1099 |
(MenuItem |
6099 | 1100 |
activeHelpKey: fileGotoBookmark |
1101 |
label: 'Bookmarks' |
|
1102 |
translateLabel: true |
|
1103 |
isButton: true |
|
1104 |
submenuChannel: gotoBookmarksMenuSpec |
|
1105 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryBookmarksIcon) |
|
1106 |
) |
|
1107 |
(MenuItem |
|
5398 | 1108 |
activeHelpKey: fileHistory |
1109 |
enabled: enableFileHistory |
|
1110 |
label: 'File History' |
|
1111 |
translateLabel: true |
|
1112 |
isButton: true |
|
1113 |
submenuChannel: menuFileHistory |
|
6093 | 1114 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyIcon) |
5398 | 1115 |
) |
1116 |
(MenuItem |
|
6827 | 1117 |
label: '-' |
1118 |
) |
|
1119 |
(MenuItem |
|
6460 | 1120 |
activeHelpKey: searchFile |
1121 |
label: 'Search File' |
|
1122 |
itemValue: doOpenSearchFile |
|
1123 |
translateLabel: true |
|
1124 |
isButton: true |
|
1125 |
labelImage: (ResourceRetriever ToolbarIconLibrary searchFileIcon) |
|
1126 |
) |
|
1127 |
(MenuItem |
|
5398 | 1128 |
label: '-' |
3892 | 1129 |
) |
5398 | 1130 |
(MenuItem |
1131 |
activeHelpKey: cutFile |
|
1132 |
enabled: hasSelection |
|
1133 |
label: 'Cut' |
|
1134 |
itemValue: cutFiles |
|
1135 |
translateLabel: true |
|
1136 |
isButton: true |
|
6093 | 1137 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutFileIcon) |
3892 | 1138 |
) |
5398 | 1139 |
(MenuItem |
1140 |
activeHelpKey: copyFile |
|
1141 |
enabled: hasSelection |
|
1142 |
label: 'Copy' |
|
1143 |
itemValue: copyFiles |
|
1144 |
translateLabel: true |
|
1145 |
isButton: true |
|
6093 | 1146 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyFileIcon) |
4730 | 1147 |
) |
5398 | 1148 |
(MenuItem |
1149 |
activeHelpKey: pasteFile |
|
1150 |
enabled: canPaste |
|
1151 |
label: 'Paste' |
|
1152 |
itemValue: pasteFiles |
|
1153 |
translateLabel: true |
|
1154 |
isButton: true |
|
6093 | 1155 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteFileIcon) |
3892 | 1156 |
) |
5398 | 1157 |
(MenuItem |
1158 |
activeHelpKey: deleteFile |
|
1159 |
enabled: hasSelection |
|
1160 |
label: 'Delete' |
|
1161 |
itemValue: deleteFiles |
|
1162 |
translateLabel: true |
|
1163 |
isButton: true |
|
6093 | 1164 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteFileIcon) |
3892 | 1165 |
) |
5398 | 1166 |
(MenuItem |
1167 |
label: '-' |
|
1168 |
) |
|
1169 |
(MenuItem |
|
6367 | 1170 |
activeHelpKey: editFile |
1171 |
label: 'Edit File' |
|
1172 |
itemValue: doShowFileContents |
|
1173 |
translateLabel: true |
|
1174 |
isButton: true |
|
1175 |
labelImage: (ResourceRetriever ToolbarIconLibrary editFileIcon) |
|
1176 |
) |
|
1177 |
(MenuItem |
|
6460 | 1178 |
label: '-' |
1179 |
) |
|
1180 |
(MenuItem |
|
6116 | 1181 |
activeHelpKey: fileIn |
1182 |
label: 'File In' |
|
1183 |
itemValue: fileFileIn |
|
1184 |
translateLabel: true |
|
1185 |
isButton: true |
|
1186 |
labelImage: (ResourceRetriever ToolbarIconLibrary fileInIcon) |
|
1187 |
) |
|
1188 |
(MenuItem |
|
1189 |
activeHelpKey: openChangeBrowser |
|
1190 |
enabled: hasFileSelection |
|
1191 |
label: 'Changes Browser' |
|
1192 |
itemValue: openChangesBrowser |
|
1193 |
translateLabel: true |
|
1194 |
isButton: true |
|
6307 | 1195 |
labelImage: (ResourceRetriever ToolbarIconLibrary startChangesBrowserIcon) |
6116 | 1196 |
) |
1197 |
(MenuItem |
|
1198 |
label: '-' |
|
1199 |
) |
|
1200 |
(MenuItem |
|
5398 | 1201 |
activeHelpKey: addTerminal |
1202 |
label: 'VT100' |
|
1203 |
itemValue: doAddTerminal |
|
1204 |
translateLabel: true |
|
1205 |
isButton: true |
|
6094 | 1206 |
labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon) |
3892 | 1207 |
) |
5398 | 1208 |
(MenuItem |
1209 |
activeHelpKey: make |
|
1210 |
enabled: canMake |
|
1211 |
label: 'Make' |
|
1212 |
itemValue: doMake |
|
1213 |
translateLabel: true |
|
1214 |
isButton: true |
|
6095 | 1215 |
labelImage: (ResourceRetriever ToolbarIconLibrary makeIcon) |
4236 | 1216 |
) |
5398 | 1217 |
(MenuItem |
6116 | 1218 |
activeHelpKey: viewDetails |
5398 | 1219 |
label: 'viewDetails' |
1220 |
translateLabel: true |
|
1221 |
isButton: true |
|
1222 |
startGroup: right |
|
1223 |
hideMenuOnActivated: false |
|
1224 |
indication: viewDetails |
|
6096 | 1225 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
4688 | 1226 |
) |
5398 | 1227 |
(MenuItem |
6096 | 1228 |
activeHelpKey: viewDetails |
5398 | 1229 |
label: 'viewDetails' |
1230 |
translateLabel: true |
|
1231 |
isButton: true |
|
1232 |
startGroup: right |
|
1233 |
isVisible: false |
|
1234 |
indication: viewDetails |
|
1235 |
submenuChannel: viewDetailsMenuSpec |
|
6096 | 1236 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
3980 | 1237 |
) |
5398 | 1238 |
(MenuItem |
5686 | 1239 |
activeHelpKey: selectDetails |
5398 | 1240 |
label: '' |
1241 |
isButton: true |
|
1242 |
startGroup: right |
|
1243 |
submenuChannel: viewDetailsMenuSpec |
|
1244 |
labelImage: (ResourceRetriever ToolbarIconLibrary empty1x20Icon) |
|
4688 | 1245 |
) |
3892 | 1246 |
) |
1247 |
nil |
|
1248 |
nil |
|
1249 |
) |
|
1250 |
! ! |
|
1251 |
||
1252 |
!FileBrowserV2 methodsFor:'actions'! |
|
1253 |
||
1254 |
changeFileBrowserTitleTo:aString |
|
1255 |
||
1256 |
|string| |
|
1257 |
||
1258 |
string := 'FileBrowser ', aString. |
|
1259 |
self window label:string. |
|
1260 |
! |
|
1261 |
||
1262 |
doSpawn |
|
1263 |
||
1264 |
self saveRuntimeAspectValues. |
|
6864 | 1265 |
self class openWithAspects:aspects withExtent:(self builder window extent). |
3892 | 1266 |
! |
1267 |
||
1268 |
hideFilenameEntryField |
|
1269 |
self filenameEntryFieldVisibleHolder value:false. |
|
1270 |
! |
|
1271 |
||
1272 |
hideToolbar |
|
1273 |
self toolBarVisibleHolder value:false. |
|
3980 | 1274 |
! |
1275 |
||
1276 |
toggleFileDetailsFor:anItem |
|
1277 |
|viewDetails| |
|
1278 |
||
1279 |
viewDetails := self viewDetails value not. |
|
1280 |
self viewDetails value:viewDetails. |
|
1281 |
||
1282 |
viewDetails ifTrue:[ |
|
1283 |
anItem activeHelpKey:#hideFileDetails. |
|
6096 | 1284 |
anItem label:(ToolbarIconLibrary viewNoDetailsIcon). |
3980 | 1285 |
] ifFalse:[ |
1286 |
anItem activeHelpKey:#showFileDetails. |
|
6096 | 1287 |
anItem label:(ToolbarIconLibrary viewDetailsIcon). |
3980 | 1288 |
]. |
3892 | 1289 |
! ! |
1290 |
||
1291 |
!FileBrowserV2 methodsFor:'aspects'! |
|
1292 |
||
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1293 |
busyLabelHolder |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1294 |
^ self |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1295 |
aspectFor:#busyLabelHolder |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1296 |
ifAbsent:[ ' ' asValue ]. |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1297 |
|
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1298 |
"Created: / 25-07-2006 / 09:06:00 / cg" |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1299 |
! |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1300 |
|
5120 | 1301 |
cursorColLabelHolder |
1302 |
^ self |
|
1303 |
aspectFor:#cursorColLabelHolder |
|
1304 |
ifAbsent:[ |
|
1305 |
self |
|
1306 |
applicationNamed:#FileApplicationNoteBook |
|
1307 |
ifPresentDo:[:appl | appl cursorColLabelHolder]. |
|
1308 |
] |
|
1309 |
! |
|
1310 |
||
1311 |
cursorLineLabelHolder |
|
1312 |
^ self |
|
1313 |
aspectFor:#cursorLineLabelHolder |
|
1314 |
ifAbsent:[ |
|
1315 |
self |
|
1316 |
applicationNamed:#FileApplicationNoteBook |
|
1317 |
ifPresentDo:[:appl | appl cursorLineLabelHolder]. |
|
1318 |
] |
|
1319 |
! |
|
1320 |
||
6334 | 1321 |
fileEncodingLockImageHolder |
1322 |
^ self |
|
1323 |
aspectFor:#fileEncodingLockImageHolder |
|
1324 |
ifAbsent:[ |
|
1325 |
BlockValue |
|
7284
6a059ef93dc8
oops - encoding lock was turned on occasionally
Claus Gittinger <cg@exept.de>
parents:
7102
diff
changeset
|
1326 |
with:[:m | m value == true ifTrue:[self class encodingLockIcon] ifFalse:[nil] ] |
6334 | 1327 |
argument:(self lockFileEncodingHolder) |
1328 |
] |
|
1329 |
! |
|
1330 |
||
3892 | 1331 |
fileEntryFieldHolder |
1332 |
||
1333 |
fileEntryFieldHolder isNil ifTrue:[ |
|
1334 |
fileEntryFieldHolder := ValueHolder new. |
|
1335 |
fileEntryFieldHolder addDependent:self. |
|
1336 |
]. |
|
1337 |
^ fileEntryFieldHolder. |
|
4647 | 1338 |
! |
1339 |
||
1340 |
listOfDeviceDrives |
|
1341 |
||
1342 |
listOfDeviceDrives isNil ifTrue:[ |
|
1343 |
listOfDeviceDrives := Filename volumes. |
|
1344 |
]. |
|
1345 |
^ listOfDeviceDrives |
|
1346 |
! |
|
1347 |
||
5120 | 1348 |
modeLabelHolder |
1349 |
^ self |
|
1350 |
aspectFor:#modeLabelHolder |
|
1351 |
ifAbsent:[ |
|
1352 |
self |
|
1353 |
applicationNamed:#FileApplicationNoteBook |
|
1354 |
ifPresentDo:[:appl | appl modeLabelHolder]. |
|
1355 |
] |
|
1356 |
! |
|
1357 |
||
7102 | 1358 |
modeLabelMenuHolder |
1359 |
^ self |
|
1360 |
applicationNamed:#FileApplicationNoteBook |
|
1361 |
ifPresentDo:[:appl | appl modeLabelMenu]. |
|
1362 |
||
1363 |
"Created: / 11-09-2006 / 12:26:44 / cg" |
|
1364 |
! |
|
1365 |
||
4647 | 1366 |
selectedDeviceDrive |
1367 |
||
1368 |
selectedDeviceDrive isNil ifTrue:[ |
|
1369 |
selectedDeviceDrive := self listOfDeviceDrives first asValue. |
|
1370 |
selectedDeviceDrive addDependent:self. |
|
1371 |
]. |
|
1372 |
^ selectedDeviceDrive |
|
3892 | 1373 |
! ! |
1374 |
||
4252 | 1375 |
!FileBrowserV2 methodsFor:'aspects-visibility'! |
1376 |
||
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1377 |
busyLabelVisibleHolder |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1378 |
^ self aspectFor:#busyLabelVisibleHolder ifAbsent:[false asValue] |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1379 |
|
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1380 |
"Created: / 25-07-2006 / 09:06:22 / cg" |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1381 |
! |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1382 |
|
5120 | 1383 |
driveSelectorVisible |
1384 |
^ self systemIsDOS |
|
1385 |
! |
|
1386 |
||
4252 | 1387 |
filenameEntryFieldVisibleHolder |
1388 |
" aspect for show FileEntryField " |
|
1389 |
||
1390 |
^ self aspectFor:#filenameEntryFieldVisibleHolder ifAbsent:[true asValue] |
|
1391 |
! |
|
1392 |
||
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1393 |
infoBarVisibleHolder |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1394 |
" aspect for show infoBar " |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1395 |
|
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1396 |
^ self aspectFor:#infoBarVisibleHolder ifAbsent:[true asValue] |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1397 |
! |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1398 |
|
4252 | 1399 |
previewVisibleHolder |
1400 |
" aspect for show preview" |
|
1401 |
||
1402 |
^ self aspectFor:#previewVisibleHolder ifAbsent:[false asValue] |
|
1403 |
! |
|
1404 |
||
1405 |
toolBarVisibleHolder |
|
1406 |
" aspect for show toolbar" |
|
1407 |
||
1408 |
^ self aspectFor:#toolBarVisibleHolder ifAbsent:[true asValue] |
|
1409 |
! ! |
|
1410 |
||
3892 | 1411 |
!FileBrowserV2 methodsFor:'change & update'! |
1412 |
||
4011 | 1413 |
currentFileNameHolderChanged |
4775 | 1414 |
|newEntryValue nSelected files volume| |
4011 | 1415 |
|
1416 |
files := self currentFileNameHolder value. |
|
4252 | 1417 |
nSelected := files size. |
4011 | 1418 |
|
4252 | 1419 |
nSelected == 0 ifTrue:[ |
4454
c85336c15975
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4451
diff
changeset
|
1420 |
newEntryValue := ''. |
4011 | 1421 |
] ifFalse:[ |
4252 | 1422 |
nSelected == 1 ifTrue:[ |
4775 | 1423 |
newEntryValue := files first. |
4011 | 1424 |
] ifFalse:[ |
4771
9290fdb65a5d
#getCommonForCurrentFiles renamed to #commonPrefixOfSelectedFiles
Claus Gittinger <cg@exept.de>
parents:
4750
diff
changeset
|
1425 |
newEntryValue := self commonPrefixOfSelectedFiles. |
4011 | 1426 |
]. |
1427 |
]. |
|
4390
e9e2343d5569
no expand on change filename holder for entry field anymore
penk
parents:
4380
diff
changeset
|
1428 |
self fileEntryFieldHolder value:(newEntryValue asString) withoutNotifying:self. |
4775 | 1429 |
|
5187
ce7e3132b012
supportsVolumes instead of OperatingSystem isWindowsLike for volume widget
james
parents:
5185
diff
changeset
|
1430 |
OperatingSystem supportsVolumes ifTrue:[ |
5185
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1431 |
volume := (nSelected >= 1) |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1432 |
ifTrue:[files first volume] |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1433 |
ifFalse:nil. |
4775 | 1434 |
self selectedDeviceDrive value:volume. |
5187
ce7e3132b012
supportsVolumes instead of OperatingSystem isWindowsLike for volume widget
james
parents:
5185
diff
changeset
|
1435 |
]. |
4252 | 1436 |
self updatePreview. |
4011 | 1437 |
! |
1438 |
||
1439 |
fileEntryFieldHolderChanged |
|
5185
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1440 |
|fileName fileNameString answer dir| |
4011 | 1441 |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1442 |
fileNameString := fileEntryFieldHolder value withoutSeparators. |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1443 |
fileName := fileNameString asFilename. |
5281 | 1444 |
fileNameString isEmpty ifTrue:[ |
1445 |
pathEntryField flash. |
|
1446 |
^ self |
|
1447 |
]. |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1448 |
|
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1449 |
(fileName exists) ifFalse:[ |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1450 |
pathEntryField flash. |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1451 |
|
5185
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1452 |
dir := fileName directory. |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1453 |
dir exists ifTrue:[ |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1454 |
self currentFileNameHolder |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1455 |
value:(OrderedCollection with:dir) |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1456 |
withoutNotifying:self. |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1457 |
]. |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1458 |
fileName baseName includesMatchCharacters ifTrue:[ |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1459 |
self fileEntryFieldHolder value:(fileName directoryName) withoutNotifying:self. |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1460 |
self filterModel value:fileName baseName. |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1461 |
]. |
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1462 |
|
4531 | 1463 |
"/ answer := OptionBox |
1464 |
"/ request:(resources string:'No file or directory named "%1" exists.\\Create ?' with:fileNameString allBold) withCRs |
|
1465 |
"/ buttonLabels:#('Create as File' 'Create as Directory' 'Cancel') |
|
1466 |
"/ values:#(createFile createDirectory nil) |
|
1467 |
"/ default:nil. |
|
1468 |
"/ |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1469 |
answer isNil ifTrue:[ |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1470 |
^ self. |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1471 |
]. |
5185
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
1472 |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1473 |
[ |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1474 |
answer == #createFile ifTrue:[ |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1475 |
fileName directory recursiveMakeDirectory. |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1476 |
fileName createAsEmptyFile. |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1477 |
] ifFalse:[ |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1478 |
answer == #createDirectory ifTrue:[ |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1479 |
fileName recursiveMakeDirectory. |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1480 |
] |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1481 |
]. |
4819 | 1482 |
] on:OperatingSystem accessDeniedErrorSignal do:[:ex | |
1483 |
Dialog warn:'Error: ' , ex description. |
|
1484 |
]. |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1485 |
^ self |
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
1486 |
]. |
5959 | 1487 |
self setCurrentFileName:fileName. |
4011 | 1488 |
! |
1489 |
||
4647 | 1490 |
selectedDeviceDriveChanged |
1491 |
||
1492 |
| newDrive curSel newFile| |
|
1493 |
||
1494 |
newDrive := self selectedDeviceDrive value. |
|
1495 |
curSel := self currentFileNameHolder value. |
|
1496 |
curSel notEmpty ifTrue:[ |
|
1497 |
curSel first volume = newDrive ifTrue:[ ^self]. |
|
1498 |
]. |
|
6591 | 1499 |
|
5411
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
1500 |
newDrive notNil ifTrue:[ |
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
1501 |
newFile := newDrive asFilename. |
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
1502 |
|
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
1503 |
newFile isReadable ifTrue:[ |
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
1504 |
self gotoFile:newFile. |
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
1505 |
^self. |
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
1506 |
]. |
4651 | 1507 |
]. |
1508 |
curSel notEmpty ifTrue:[ |
|
1509 |
self selectedDeviceDrive value:(curSel first volume). |
|
1510 |
] ifFalse:[ |
|
1511 |
self selectedDeviceDrive value:'C:'. |
|
1512 |
]. |
|
4647 | 1513 |
! |
1514 |
||
4252 | 1515 |
selectedImage |
1516 |
|files selectedFile mime img| |
|
1517 |
||
4451
6f06f760a64b
only open preview for selected files not for directories
penk
parents:
4390
diff
changeset
|
1518 |
files := self currentSelectedFiles. |
4259 | 1519 |
files size >= 1 ifFalse:[ |
4252 | 1520 |
^ nil |
1521 |
]. |
|
4259 | 1522 |
selectedFile := files last. |
4252 | 1523 |
|
1524 |
mime := MIMETypes mimeTypeForFilename:selectedFile. |
|
1525 |
(mime notNil and:[mime startsWith:'image/']) ifTrue:[ |
|
1526 |
img := Image fromFile:selectedFile. |
|
1527 |
^ img |
|
1528 |
]. |
|
1529 |
||
1530 |
^ nil. |
|
1531 |
! |
|
1532 |
||
4262 | 1533 |
showImagePreview:image |
4252 | 1534 |
|imgView| |
1535 |
||
4262 | 1536 |
imgView := builder componentAt:#Preview. |
4252 | 1537 |
|
1538 |
imgView adjust:#fitBig. |
|
1539 |
imgView image:image. |
|
1540 |
! |
|
1541 |
||
4262 | 1542 |
showPreview |
1543 |
|shownImage lbl previewLabel| |
|
1544 |
||
1545 |
shownImage := self selectedImage. |
|
4300 | 1546 |
lbl := shownImage isNil ifTrue:'Preview' ifFalse:[ shownImage fileName asFilename baseName ]. |
4262 | 1547 |
|
1548 |
previewLabel := builder componentAt:#PreviewLabel. |
|
1549 |
previewLabel label:lbl; forceResizeHorizontally. |
|
1550 |
self enqueueMessage:#'showImagePreview:' for:self arguments:(Array with:shownImage). |
|
1551 |
! |
|
1552 |
||
3892 | 1553 |
update:something with:aParameter from:changedObject |
1554 |
||
1555 |
||
4647 | 1556 |
changedObject == self selectedDeviceDrive ifTrue:[ |
1557 |
self selectedDeviceDriveChanged. |
|
1558 |
^ self. |
|
1559 |
]. |
|
3892 | 1560 |
changedObject == self fileEntryFieldHolder ifTrue:[ |
4011 | 1561 |
self fileEntryFieldHolderChanged. |
1562 |
^ self. |
|
3892 | 1563 |
]. |
1564 |
changedObject == self currentFileNameHolder ifTrue:[ |
|
4011 | 1565 |
super update:something with:aParameter from:changedObject. |
1566 |
self currentFileNameHolderChanged. |
|
1567 |
^ self. |
|
3892 | 1568 |
]. |
4252 | 1569 |
(changedObject == self previewVisibleHolder) ifTrue:[ |
1570 |
self updatePreview. |
|
1571 |
^ self. |
|
1572 |
]. |
|
3892 | 1573 |
(changedObject == self toolBarVisibleHolder |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1574 |
or:[changedObject == self filenameEntryFieldVisibleHolder |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1575 |
or:[changedObject == self infoBarVisibleHolder]]) ifTrue:[ |
3892 | 1576 |
self updateToolVisibility. |
1577 |
^ self. |
|
1578 |
]. |
|
4085
9e58ddfa6969
sort will be triggered from the FileBrowserV2 instance not from AbstractFileBrowser anymore
penk
parents:
4084
diff
changeset
|
1579 |
(changedObject == self sortBlockProperty or:[changedObject == self sortDirectoriesBeforeFiles]) ifTrue:[ |
9e58ddfa6969
sort will be triggered from the FileBrowserV2 instance not from AbstractFileBrowser anymore
penk
parents:
4084
diff
changeset
|
1580 |
self sortFileListsBy:(self sortBlockProperty value) withReverse:false. |
9e58ddfa6969
sort will be triggered from the FileBrowserV2 instance not from AbstractFileBrowser anymore
penk
parents:
4084
diff
changeset
|
1581 |
^ self. |
9e58ddfa6969
sort will be triggered from the FileBrowserV2 instance not from AbstractFileBrowser anymore
penk
parents:
4084
diff
changeset
|
1582 |
]. |
3892 | 1583 |
|
1584 |
^ super update:something with:aParameter from:changedObject. |
|
1585 |
! |
|
1586 |
||
4252 | 1587 |
updatePreview |
6524 | 1588 |
|previewLabel shownImage plug closePreviewButton| |
4252 | 1589 |
|
1590 |
self previewVisibleHolder value ifTrue:[ |
|
5477 | 1591 |
shownImage := nil. |
1592 |
imgView := builder componentAt:#Preview. |
|
1593 |
previewLabel := builder componentAt:#PreviewLabel. |
|
6524 | 1594 |
closePreviewButton := builder componentAt:#ClosePreviewButton. |
1595 |
||
4257 | 1596 |
plug := Plug new. |
1597 |
plug respondTo:#closePreview with:[ self previewVisibleHolder value:false ]. |
|
1598 |
||
1599 |
previewLabel menuHolder:(self class previewLabelMenu decodeAsLiteralArray). |
|
1600 |
previewLabel menuPerformer:plug asValue. |
|
1601 |
||
6524 | 1602 |
closePreviewButton action:[ self previewVisibleHolder value:false ]. |
1603 |
||
4252 | 1604 |
previewProcess notNil ifTrue:[ |
1605 |
previewProcess terminate |
|
1606 |
]. |
|
1607 |
previewProcess := [ |
|
1608 |
|imgView oldBg shownImage lbl| |
|
1609 |
||
1610 |
oldBg := previewLabel backgroundColor. |
|
1611 |
previewLabel backgroundColor:(Color red lightened lightened). |
|
1612 |
[ |
|
4262 | 1613 |
self showPreview. |
4252 | 1614 |
previewProcess := nil. |
1615 |
] ensure:[ |
|
1616 |
previewLabel backgroundColor:oldBg. |
|
1617 |
]. |
|
1618 |
] forkAt:7. |
|
1619 |
] ifFalse:[ |
|
4254 | 1620 |
imgView notNil ifTrue:[ |
1621 |
imgView image:nil. |
|
1622 |
] |
|
4252 | 1623 |
]. |
1624 |
! |
|
1625 |
||
3892 | 1626 |
updateToolVisibility |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1627 |
|builder toolBar infoBar filenameEntryField vPanel topOffset bottomOffset |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1628 |
toolBarVisible filenameEntryFieldVisible infoBarVisible d| |
3892 | 1629 |
|
1630 |
builder := self builder. |
|
1631 |
||
1632 |
topOffset := 0. |
|
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1633 |
bottomOffset := 0. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1634 |
|
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1635 |
toolBarVisible := self toolBarVisibleHolder value. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1636 |
toolBarVisible ifTrue:[ |
3892 | 1637 |
toolBar := builder componentAt:#ToolbarBox. |
1638 |
topOffset := topOffset + toolBar height. |
|
1639 |
]. |
|
1640 |
||
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1641 |
filenameEntryFieldVisible := self filenameEntryFieldVisibleHolder value. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1642 |
filenameEntryFieldVisible ifTrue:[ |
3892 | 1643 |
filenameEntryField := builder componentAt:#FilenameEntryFieldBox. |
1644 |
d := filenameEntryField layout bottomOffset - filenameEntryField layout topOffset. |
|
1645 |
filenameEntryField layout topOffset:topOffset bottomOffset:topOffset + d. |
|
1646 |
topOffset := topOffset + filenameEntryField height. |
|
1647 |
filenameEntryField container notNil ifTrue:[ |
|
1648 |
filenameEntryField containerChangedSize. |
|
1649 |
]. |
|
1650 |
]. |
|
1651 |
||
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1652 |
infoBarVisible := self infoBarVisibleHolder value. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1653 |
infoBarVisible ifTrue:[ |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1654 |
infoBar := builder componentAt:#InfoBox. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1655 |
bottomOffset := bottomOffset - infoBar height. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1656 |
]. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1657 |
|
3892 | 1658 |
vPanel := builder componentAt:#BrowserBox. |
1659 |
vPanel layout topOffset:topOffset+1. |
|
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1660 |
vPanel layout bottomOffset:bottomOffset-1. |
3892 | 1661 |
vPanel container notNil ifTrue:[ |
1662 |
vPanel containerChangedSize. |
|
1663 |
]. |
|
1664 |
! ! |
|
1665 |
||
3957 | 1666 |
!FileBrowserV2 methodsFor:'event handling'! |
1667 |
||
4904 | 1668 |
crPressedInPathField |
1669 |
|path fn| |
|
1670 |
||
1671 |
path := fileEntryFieldHolder value. |
|
1672 |
fn := path asFilename. |
|
1673 |
(fn exists and:[ fn isDirectory not ]) ifTrue:[ |
|
1674 |
self openApplForFile:path. |
|
1675 |
] |
|
1676 |
! |
|
1677 |
||
3957 | 1678 |
processEvent:anEvent |
1679 |
"filter keyboard events. |
|
1680 |
Return true, if I have eaten the event" |
|
1681 |
||
1682 |
|focusView key rawKey fileName| |
|
1683 |
||
1684 |
anEvent isKeyPressEvent ifTrue:[ |
|
1685 |
focusView := anEvent targetView. |
|
1686 |
key := anEvent key. |
|
1687 |
rawKey := anEvent rawKey. |
|
1688 |
||
1689 |
(focusView isSameOrComponentOf:self window) ifTrue:[ |
|
1690 |
||
6145 | 1691 |
(focusView == pathEntryField) ifFalse:[ ^ false]. |
3957 | 1692 |
|
1693 |
(key == #Return) ifTrue:[ |
|
1694 |
fileName := pathEntryField list first asFilename. |
|
1695 |
(fileName exists and:[fileName isDirectory not]) ifTrue:[ |
|
4101 | 1696 |
self openApplForFile:fileName |
3957 | 1697 |
]. |
1698 |
]. |
|
1699 |
] |
|
1700 |
]. |
|
1701 |
^ false |
|
1702 |
! ! |
|
1703 |
||
6131 | 1704 |
!FileBrowserV2 methodsFor:'menu accessing'! |
1705 |
||
1706 |
menuFileHistory |
|
1707 |
"initialize the file history menu |
|
1708 |
" |
|
1709 |
<resource: #programMenu > |
|
1710 |
||
1711 |
|menu hist text removeItem removeCol| |
|
1712 |
||
1713 |
menu := Menu new. |
|
1714 |
menu findGuiResourcesIn:self. |
|
1715 |
menu receiver:self. |
|
1716 |
||
1717 |
hist := self fileHistory. |
|
1718 |
hist isEmpty ifTrue:[^ nil]. |
|
1719 |
||
1720 |
removeCol := OrderedCollection new. |
|
1721 |
hist do:[:aFileItem| |
|
1722 |
"aFileItem fileName exists" true ifTrue:[ |
|
1723 |
menu addItem:(MenuItem label: aFileItem fileName asString value:[ |
|
1724 |
self setCurrentFileName:(aFileItem fileName). |
|
1725 |
self openApplByFileItem:aFileItem |
|
1726 |
]). |
|
1727 |
] ifFalse:[ |
|
1728 |
removeCol add:aFileItem. |
|
1729 |
] |
|
1730 |
]. |
|
1731 |
"/ remove all not existing history entries |
|
1732 |
removeCol do:[ : el | |
|
1733 |
hist remove:el. |
|
1734 |
]. |
|
1735 |
removeItem := MenuItem new. |
|
1736 |
removeItem translateLabel:true. |
|
1737 |
text := resources string:'Clear History'. |
|
1738 |
"/ text := LabelAndIcon icon:(self class clearHistoryIcon) string:text. |
|
1739 |
removeItem label:text. |
|
1740 |
removeItem value:[ |
|
1741 |
self fileHistory removeAll. |
|
1742 |
self enableFileHistory value:false. |
|
1743 |
]. |
|
1744 |
menu addSeparator. |
|
1745 |
menu addItem:removeItem. |
|
1746 |
^ menu |
|
1747 |
! ! |
|
1748 |
||
6460 | 1749 |
!FileBrowserV2 methodsFor:'queries'! |
1750 |
||
1751 |
getAllFilesAsStrings |
|
1752 |
^ self directoryContentsBrowser getAllFilesAsStrings |
|
1753 |
! ! |
|
1754 |
||
3892 | 1755 |
!FileBrowserV2 methodsFor:'startup & release'! |
1756 |
||
3954 | 1757 |
closeRequest |
6631 | 1758 |
"asks for permission before closing" |
1759 |
||
5010 | 1760 |
self |
1761 |
applicationNamed:#FileApplicationNoteBook |
|
1762 |
ifPresentDo:[:appl | appl tryCloseApplications ifFalse:[^ self] ]. |
|
1763 |
||
6631 | 1764 |
super closeRequest. |
3954 | 1765 |
! |
1766 |
||
3892 | 1767 |
hideFilenameEntryFieldButtonCreated:aButton |
1768 |
||
1769 |
aButton passiveLevel:(MenuPanel defaultLevel). |
|
1770 |
aButton activeLevel:-1. |
|
1771 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor). |
|
1772 |
! |
|
1773 |
||
1774 |
hideToolBarButtonCreated:aButton |
|
1775 |
||
1776 |
aButton passiveLevel:(MenuPanel defaultLevel). |
|
1777 |
aButton activeLevel:-1. |
|
1778 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor). |
|
1779 |
! |
|
1780 |
||
1781 |
initialize |
|
1782 |
||
1783 |
self masterApplication:nil. |
|
6370 | 1784 |
self directoryHistory resetForwardBackward. |
3892 | 1785 |
! |
1786 |
||
1787 |
makeDependent |
|
4008 | 1788 |
|
4004 | 1789 |
super makeDependent. |
4085
9e58ddfa6969
sort will be triggered from the FileBrowserV2 instance not from AbstractFileBrowser anymore
penk
parents:
4084
diff
changeset
|
1790 |
self sortBlockProperty addDependent:self. |
3892 | 1791 |
self filenameEntryFieldVisibleHolder addDependent:self. |
1792 |
self toolBarVisibleHolder addDependent:self. |
|
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1793 |
self infoBarVisibleHolder addDependent:self. |
4255 | 1794 |
self previewVisibleHolder addDependent:self. |
3892 | 1795 |
! |
1796 |
||
4884 | 1797 |
postBuildDirectoryTree:aWidget |
1798 |
aWidget application multipleSelect:true. |
|
1799 |
! |
|
1800 |
||
4365 | 1801 |
postBuildEditField:aWidget |
1802 |
||
1803 |
pathEntryField := aWidget. |
|
1804 |
aWidget model:self fileEntryFieldHolder. |
|
6370 | 1805 |
aWidget listHolder:self directoryHistory. |
4365 | 1806 |
aWidget level:-1. |
4904 | 1807 |
aWidget acceptIfUnchanged:true. |
1808 |
aWidget crAction:[ self crPressedInPathField ]. |
|
4365 | 1809 |
! |
1810 |
||
7102 | 1811 |
postBuildEditModeInfoLabel:aLabel |
1812 |
aLabel menuHolder:self; menuMessage:#modeLabelMenuHolder. |
|
1813 |
||
1814 |
"Created: / 11-09-2006 / 12:24:54 / cg" |
|
1815 |
! |
|
1816 |
||
4018 | 1817 |
postBuildFilterBox:aWidget |
1818 |
||
1819 |
self filterValueBox value:aWidget. |
|
1820 |
self filterBackgroundColor value:aWidget backgroundColor. |
|
1821 |
! |
|
1822 |
||
3892 | 1823 |
postBuildPathViewBox:aWidget |
1824 |
||
1825 |
aWidget backgroundColor:(MenuPanel defaultBackgroundColor). |
|
1826 |
! |
|
1827 |
||
1828 |
postBuildWith:aBuilder |
|
1829 |
||
1830 |
super postBuildWith:aBuilder. |
|
3980 | 1831 |
self updateToolVisibility. |
3892 | 1832 |
! |
1833 |
||
1834 |
postOpenWith:aBuilder |
|
1835 |
||
4071 | 1836 |
super postOpenWith:aBuilder. |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1837 |
|
4577 | 1838 |
self currentFileNameHolderChangedForCommon. |
4071 | 1839 |
self currentFileNameHolderChanged. |
4027 | 1840 |
|
3957 | 1841 |
self windowGroup addPreEventHook:self. |
3892 | 1842 |
! |
1843 |
||
1844 |
release |
|
1845 |
||
1846 |
self saveRuntimeAspectValues. |
|
1847 |
^ super release |
|
1848 |
! ! |
|
1849 |
||
1850 |
!FileBrowserV2 class methodsFor:'documentation'! |
|
1851 |
||
1852 |
version |
|
7413
842b1274968f
new startGroup value: #conditionalRight
Claus Gittinger <cg@exept.de>
parents:
7314
diff
changeset
|
1853 |
^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.158 2006-10-16 11:15:23 cg Exp $' |
3892 | 1854 |
! ! |
1855 |
||
1856 |
FileBrowserV2 initialize! |