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