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