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