author | Claus Gittinger <cg@exept.de> |
Tue, 08 Jul 2014 15:28:27 +0200 | |
changeset 14603 | c61a2e6f640f |
parent 14589 | 47def2145d9d |
child 14605 | fbba9502f05c |
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 |
13854 | 16 |
listOfDeviceDrives selectedDeviceDrive imgView lineLabel |
17 |
bookmarkBarVisibleHolder bookmarkHolder' |
|
7670 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Tools-File' |
|
3892 | 21 |
! |
22 |
||
23 |
!FileBrowserV2 class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
5140 | 27 |
COPYRIGHT (c) 2002 by eXept Software AG |
12336 | 28 |
All Rights Reserved |
3892 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
5967 | 41 |
FileBrowserV2 is based on Filebrowser |
3892 | 42 |
|
43 |
WARNING: files edited with FileBrowser will have leading spaces (multiple-8) |
|
12336 | 44 |
being replaced by tabs. If tabs are to be preserved at other |
45 |
positions (for example, sendmail-config files) they will be |
|
46 |
corrupt after being written. |
|
3892 | 47 |
|
48 |
[instance variables]: |
|
49 |
||
12336 | 50 |
checkDelta <Integer> number of seconds of check interval |
51 |
(looks ever so often if shown directory |
|
52 |
has changed). You may make this number |
|
53 |
higher, if your network-times are |
|
54 |
incorrect and thus, the filebrowser |
|
55 |
checks too often. |
|
3892 | 56 |
|
12336 | 57 |
compressTabs <Boolean> if true, leading spaces will be |
58 |
replaced by tabs when saving text |
|
3892 | 59 |
|
60 |
some of the defaults (long/short list etc.) can be set by the resource file; |
|
61 |
see FileBrowser>>initialize for more details.. |
|
62 |
||
63 |
[author:] |
|
12336 | 64 |
Christian Penk |
3892 | 65 |
|
66 |
[start with:] |
|
12336 | 67 |
FileBrowserV2 open |
3892 | 68 |
" |
5354 | 69 |
! |
70 |
||
71 |
toDo |
|
72 |
" |
|
12336 | 73 |
- the tab for the directory description text editor is not changed if the |
6478 | 74 |
directory description changes to a normal text editor |
5354 | 75 |
- FileDialog should get a file history |
6478 | 76 |
- directorycontentsItem isDirectory fails if it is a symbolic link |
5354 | 77 |
- on sort order change in directory contents browser the columnspec shouldnt not reloaded |
78 |
- check all windowspecs with different font types |
|
5472 | 79 |
- multiple select with mouse moving is flickering (see bestFilename in FilenameEditField) |
80 |
- too many system calls on update cycle |
|
5532 | 81 |
- stop monitoring task for DirectoryTreebrowser and DirectoryContentsBrowser |
5354 | 82 |
" |
3892 | 83 |
! ! |
84 |
||
85 |
!FileBrowserV2 class methodsFor:'instance creation'! |
|
86 |
||
87 |
on:aDirectoryPath |
|
88 |
"return a new FileBrowserV2 in a pathname" |
|
89 |
||
8188 | 90 |
|instance| |
91 |
||
92 |
instance := self new. |
|
93 |
instance onDirectory:aDirectoryPath. |
|
3892 | 94 |
^ instance |
95 |
! |
|
96 |
||
97 |
open |
|
98 |
"start a new FileBrowserV2" |
|
99 |
||
100 |
| instance | |
|
101 |
instance := self new. |
|
102 |
instance open. |
|
103 |
^ instance |
|
5123 | 104 |
|
3892 | 105 |
" |
4626 | 106 |
FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) withExtent:800@600 |
3892 | 107 |
" |
108 |
! |
|
109 |
||
12336 | 110 |
openIn:aDirectoryPath |
9134 | 111 |
"backward compatibility" |
112 |
||
113 |
^ self openOn:aDirectoryPath |
|
114 |
! |
|
115 |
||
12336 | 116 |
openOn:aFileOrDirectoryPath |
3892 | 117 |
"start a new FileBrowserV2 in a pathname" |
118 |
||
11779 | 119 |
|fn| |
8265 | 120 |
|
11779 | 121 |
fn := aFileOrDirectoryPath asFilename. |
122 |
fn isDirectory ifFalse:[ |
|
12336 | 123 |
^ self openOnFileNamed:aFileOrDirectoryPath |
11779 | 124 |
] ifTrue:[ |
12336 | 125 |
^ self openOn:fn withExtent:nil |
8380 | 126 |
]. |
127 |
||
3892 | 128 |
" |
11779 | 129 |
FileBrowserV2 openOn:(Filename currentDirectory asAbsoluteFilename) |
130 |
FileBrowserV2 openOn:'Makefile' |
|
3892 | 131 |
" |
11779 | 132 |
|
133 |
"Modified (comment): / 06-09-2012 / 14:46:54 / cg" |
|
3892 | 134 |
! |
135 |
||
8531 | 136 |
openOn:aDirectoryPath withExtent:extentOrNil |
3892 | 137 |
"start a new FileBrowserV2 in a pathname" |
138 |
||
8265 | 139 |
|instance builder| |
140 |
||
3892 | 141 |
instance := self on:aDirectoryPath. |
142 |
builder := instance open. |
|
8531 | 143 |
extentOrNil notNil ifTrue:[ |
12336 | 144 |
builder window extent:extentOrNil. |
8531 | 145 |
]. |
3892 | 146 |
^ instance |
5123 | 147 |
|
3892 | 148 |
" |
4626 | 149 |
FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) withExtent:800@600 |
3892 | 150 |
" |
151 |
! |
|
152 |
||
12336 | 153 |
openOnDirectory:aDirectoryPath |
8531 | 154 |
"start a new FileBrowserV2 in a pathname" |
155 |
||
156 |
^ self openOn:aDirectoryPath withExtent:nil |
|
157 |
||
158 |
" |
|
159 |
FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) withExtent:800@600 |
|
160 |
" |
|
161 |
! |
|
162 |
||
5123 | 163 |
openOnFileNamed:aFilename |
5162 | 164 |
"start a new FileBrowserV2 on a aFilename. |
165 |
The browser looks for an appropriate viewer and uses that if one is found; |
|
166 |
otherwise, the file is opened for text editing." |
|
167 |
||
168 |
^ self openOnFileNamed:aFilename editing:true |
|
169 |
||
170 |
" |
|
171 |
FileBrowserV2 openOnFileNamed:'Makefile' |
|
172 |
" |
|
173 |
! |
|
174 |
||
175 |
openOnFileNamed:aFilename editing:editing |
|
176 |
"start a new FileBrowserV2 on a aFilename; |
|
177 |
If editing is true, the browser opens the document as text to be edited; |
|
178 |
if false, it looks for an appropriate viewer and uses that if one is found." |
|
5123 | 179 |
|
8188 | 180 |
|browser| |
5123 | 181 |
|
8188 | 182 |
browser := self new. |
183 |
browser openOnFileNamed:aFilename editing:editing. |
|
184 |
^ browser |
|
5123 | 185 |
|
186 |
" |
|
187 |
FileBrowserV2 openOnFileNamed:'Makefile' |
|
188 |
" |
|
189 |
! |
|
190 |
||
3892 | 191 |
openWithAspects:someAspects withExtent:extent |
192 |
"start a new FileBrowserV2 in a pathname" |
|
193 |
||
194 |
|dir clone| |
|
195 |
||
196 |
dir := someAspects at:#currentFileNameHolder ifAbsent:nil. |
|
197 |
clone := self openOn:(dir value) withExtent:extent. |
|
8188 | 198 |
^ clone |
3892 | 199 |
! ! |
200 |
||
201 |
!FileBrowserV2 class methodsFor:'class initialization'! |
|
202 |
||
203 |
initialize |
|
6078 | 204 |
"/ self installInLauncher. - now done in phase 2 |
205 |
ObjectMemory addDependent:self. |
|
3892 | 206 |
! |
207 |
||
208 |
installInLauncher |
|
209 |
"add myself to the launcher menu and toolBar" |
|
210 |
||
3914 | 211 |
|menuItem icon action currentLauncher| |
3892 | 212 |
|
213 |
FileBrowserV2 isNil ifTrue:[^ self]. |
|
214 |
||
13854 | 215 |
"JV@2012-04-03: Changed to reflect UserPreferences" |
216 |
"/action := (MessageSend receiver:(Smalltalk at:self name) selector:#open). |
|
217 |
action := [ UserPreferences current fileBrowserClass open]. |
|
3892 | 218 |
|
7642
7a736bd24cbd
masked pixels must be clear AND color at 0 must be black for
Claus Gittinger <cg@exept.de>
parents:
7630
diff
changeset
|
219 |
icon := [self defaultIcon]. "/ self defaultIcon magnifiedTo:28@28. |
3892 | 220 |
|
13276 | 221 |
"/ already there |
222 |
"/ menuItem := MenuItem new |
|
223 |
"/ translateLabel: true; |
|
224 |
"/ value: action; |
|
225 |
"/ isButton: false; |
|
226 |
"/ label:'File Browser' icon:icon; |
|
227 |
"/ nameKey: #fileBrowserV2; |
|
228 |
"/ activeHelpKey: #fileBrowserV2; |
|
229 |
"/ submenuChannel: #menuFileHistory; |
|
230 |
"/ showBusyCursorWhilePerforming:true. |
|
231 |
"/ |
|
232 |
"/ NewLauncher |
|
233 |
"/ addMenuItem:menuItem |
|
234 |
"/ from:self |
|
235 |
"/ in:'menu.file' |
|
236 |
"/ position:#( #before #fileBrowser) |
|
237 |
"/ space:true. |
|
238 |
||
12336 | 239 |
menuItem := MenuItem new |
13276 | 240 |
value: action; |
241 |
isButton: true; |
|
242 |
"label:'File Browser'" icon:icon; |
|
243 |
nameKey: #fileBrowserV2; |
|
244 |
activeHelpKey: #fileBrowserV2; |
|
245 |
submenuChannel: #menuFileHistory; |
|
246 |
showBusyCursorWhilePerforming:true. |
|
3892 | 247 |
|
12336 | 248 |
NewLauncher |
13276 | 249 |
addMenuItem:menuItem |
250 |
from:self |
|
251 |
in:'toolbar' |
|
252 |
position:#( #before #fileBrowser) |
|
253 |
space:false. |
|
3892 | 254 |
|
3918 | 255 |
currentLauncher := NewLauncher current. |
3914 | 256 |
currentLauncher notNil ifTrue:[ |
13276 | 257 |
currentLauncher fileBrowserItemVisible value:false |
3914 | 258 |
]. |
12336 | 259 |
NewLauncher addSettingsApplicationByClass:#'FileBrowserV2SettingsAppl' |
13276 | 260 |
withName:'Tools/FileBrowserV2' |
261 |
icon:nil. |
|
3908 | 262 |
|
3892 | 263 |
" |
264 |
self installInLauncher |
|
265 |
self removeFromLauncher |
|
266 |
" |
|
13854 | 267 |
|
268 |
"Modified: / 03-04-2012 / 11:06:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3892 | 269 |
! |
270 |
||
271 |
removeFromLauncher |
|
272 |
"/ |
|
273 |
"/ remove myself from the launcher menu |
|
274 |
"/ |
|
275 |
||
3914 | 276 |
|currentLauncher| |
277 |
||
3892 | 278 |
NewLauncher isNil ifTrue:[^ self]. |
3908 | 279 |
NewLauncher removeUserTool:#fileBrowserV2. |
3918 | 280 |
currentLauncher := NewLauncher current. |
3914 | 281 |
currentLauncher notNil ifTrue:[ |
12336 | 282 |
currentLauncher fileBrowserItemVisible value:false |
3914 | 283 |
]. |
4380
0987d10ae2ba
install and remove from Launcher install in settings application changed
penk
parents:
4377
diff
changeset
|
284 |
NewLauncher removeSettingsApplicationByClass:#'FileBrowserV2SettingsAppl'. |
3892 | 285 |
|
286 |
" |
|
287 |
self removeFromLauncher |
|
288 |
" |
|
6078 | 289 |
! |
290 |
||
291 |
update:something with:aParameter from:changedObject |
|
292 |
something == #initialized ifTrue:[ |
|
12336 | 293 |
changedObject == ObjectMemory ifTrue:[ |
294 |
self installInLauncher. |
|
295 |
ObjectMemory removeDependent:self. |
|
296 |
] |
|
6078 | 297 |
]. |
3892 | 298 |
! ! |
299 |
||
300 |
!FileBrowserV2 class methodsFor:'defaults'! |
|
301 |
||
302 |
entryFieldEndStringForMultipleSelection |
|
303 |
||
304 |
^ ('[*]') |
|
305 |
! ! |
|
306 |
||
307 |
!FileBrowserV2 class methodsFor:'help specs'! |
|
308 |
||
6334 | 309 |
flyByHelpSpec |
310 |
"This resource specification was automatically generated |
|
311 |
by the UIHelpTool of ST/X." |
|
312 |
||
313 |
"Do not manually edit this!! If it is corrupted, |
|
314 |
the UIHelpTool may not be able to read the specification." |
|
315 |
||
316 |
" |
|
12336 | 317 |
UIHelpTool openOnClass:FileBrowserV2 |
6334 | 318 |
" |
319 |
||
320 |
<resource: #help> |
|
321 |
||
322 |
^ super flyByHelpSpec addPairsFrom:#( |
|
323 |
||
324 |
#columnLabel |
|
325 |
'The text-cursor''s column number' |
|
326 |
||
327 |
#encodingLabel |
|
13005 | 328 |
'The file''s encoding (Right-click to change)' |
6334 | 329 |
|
330 |
#encodingLockedLabel |
|
331 |
'Lock the file-encoding (do not try to guess from the file''s contents)' |
|
332 |
||
12761 | 333 |
#fileFilter |
334 |
'Only show files matching the pattern.\Separate multiple patterns by ";".\Patterns starting with "~" are excluding.' |
|
335 |
||
6334 | 336 |
#lineLabel |
13005 | 337 |
'The text-cursor''s line number. Double-click to change' |
6334 | 338 |
|
339 |
#modeLabel |
|
13005 | 340 |
'The editing mode (Insert vs. overwrite)' |
6334 | 341 |
|
342 |
#numberOfFiles |
|
343 |
'Number of files shown (Total number of files in directory)' |
|
344 |
||
4688 | 345 |
) |
10770 | 346 |
|
347 |
"Modified: / 06-10-2011 / 14:37:12 / cg" |
|
3892 | 348 |
! ! |
349 |
||
6338 | 350 |
!FileBrowserV2 class methodsFor:'image specs'! |
3892 | 351 |
|
8762 | 352 |
applicationIcon |
353 |
||
354 |
^ self defaultIcon |
|
355 |
! |
|
356 |
||
6525 | 357 |
closePreviewButtonImage |
358 |
^ ToolbarIconLibrary removeTabIcon |
|
359 |
! |
|
360 |
||
3892 | 361 |
defaultIcon |
7630 | 362 |
<resource: #programImage> |
3892 | 363 |
|
7630 | 364 |
^ ToolbarIconLibrary startNewFileBrowserIcon |
3892 | 365 |
! |
366 |
||
6339 | 367 |
encodingLockIcon |
368 |
<resource: #programImage> |
|
369 |
||
370 |
^ ToolbarIconLibrary encodingLockIcon |
|
371 |
! |
|
372 |
||
3892 | 373 |
hideFilenameEntryFieldIcon |
374 |
<resource: #programImage> |
|
375 |
||
376 |
^ ToolbarIconLibrary hideToolbarIconH14 |
|
377 |
! |
|
378 |
||
379 |
hideToolBarIcon |
|
380 |
<resource: #programImage> |
|
381 |
||
382 |
^ ToolbarIconLibrary hideToolbarIconH26 |
|
383 |
! ! |
|
384 |
||
385 |
!FileBrowserV2 class methodsFor:'interface specs'! |
|
386 |
||
387 |
windowSpec |
|
388 |
"This resource specification was automatically generated |
|
389 |
by the UIPainter of ST/X." |
|
390 |
||
391 |
"Do not manually edit this!! If it is corrupted, |
|
392 |
the UIPainter may not be able to read the specification." |
|
393 |
||
394 |
" |
|
14589 | 395 |
UIPainter new openOnClass:FileBrowserV2 andSelector:#windowSpec |
396 |
FileBrowserV2 new openInterface:#windowSpec |
|
397 |
FileBrowserV2 open |
|
3892 | 398 |
" |
399 |
||
400 |
<resource: #canvas> |
|
401 |
||
12670 | 402 |
^ |
14589 | 403 |
#(FullSpec |
404 |
name: windowSpec |
|
405 |
window: |
|
406 |
(WindowSpec |
|
407 |
label: FileBrowser |
|
408 |
name: FileBrowser |
|
409 |
min: (Point 10 10) |
|
410 |
bounds: (Rectangle 0 0 800 600) |
|
411 |
menu: mainMenu |
|
412 |
icon: defaultIcon |
|
413 |
) |
|
414 |
component: |
|
415 |
(SpecCollection |
|
416 |
collection: ( |
|
417 |
(ViewSpec |
|
418 |
name: 'ToolbarBox' |
|
419 |
layout: (LayoutFrame 0 0 0 0 0 1 40 0) |
|
420 |
level: 0 |
|
421 |
visibilityChannel: toolBarVisibleHolder |
|
422 |
component: |
|
423 |
(SpecCollection |
|
424 |
collection: ( |
|
425 |
(ActionButtonSpec |
|
426 |
label: 'hideToolBarIcon' |
|
427 |
name: 'HideToolBarButton' |
|
428 |
layout: (LayoutFrame 0 0 0 0 13 0 40 0) |
|
429 |
activeHelpKey: hideToolBar |
|
430 |
hasCharacterOrientedLabel: false |
|
431 |
translateLabel: true |
|
432 |
model: hideToolbar |
|
433 |
postBuildCallback: hideToolBarButtonCreated: |
|
434 |
) |
|
435 |
(MenuPanelSpec |
|
436 |
name: 'ToolBar' |
|
437 |
layout: (LayoutFrame 13 0 0 0 0 1 40 0) |
|
438 |
menu: toolBarMainMenu |
|
439 |
textDefault: true |
|
12670 | 440 |
) |
14589 | 441 |
) |
442 |
||
443 |
) |
|
444 |
) |
|
445 |
(ViewSpec |
|
446 |
name: 'BookmarkBar' |
|
447 |
layout: (LayoutFrame 0 0 40 0 0 1 66 0) |
|
448 |
visibilityChannel: bookmarkBarVisibleHolder |
|
449 |
component: |
|
450 |
(SpecCollection |
|
451 |
collection: ( |
|
452 |
(ActionButtonSpec |
|
453 |
label: 'hideToolBarIcon' |
|
454 |
name: 'Button1' |
|
455 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
456 |
activeHelpKey: hideBookmarks |
|
457 |
hasCharacterOrientedLabel: false |
|
458 |
translateLabel: true |
|
459 |
model: hideBookmarkBar |
|
460 |
postBuildCallback: hideToolBarButtonCreated: |
|
461 |
) |
|
462 |
(SubCanvasSpec |
|
463 |
name: 'Bookmarks' |
|
464 |
layout: (LayoutFrame 13 0 0 0 0 1 0 1) |
|
465 |
level: 1 |
|
466 |
hasHorizontalScrollBar: false |
|
467 |
hasVerticalScrollBar: false |
|
468 |
miniScrollerHorizontal: false |
|
469 |
majorKey: BookmarkBar |
|
470 |
subAspectHolders: |
|
471 |
(Array |
|
472 |
||
473 |
(SubChannelInfoSpec |
|
474 |
subAspect: bookmarkHolder |
|
475 |
aspect: bookmarkHolder |
|
476 |
) |
|
477 |
(SubChannelInfoSpec |
|
478 |
subAspect: bookmarksHolder |
|
479 |
aspect: bookmarkListHolder |
|
480 |
) |
|
481 |
) |
|
482 |
createNewApplication: true |
|
483 |
createNewBuilder: true |
|
13854 | 484 |
) |
14589 | 485 |
) |
486 |
||
487 |
) |
|
488 |
) |
|
489 |
(ViewSpec |
|
490 |
name: 'FilenameEntryFieldBox' |
|
491 |
layout: (LayoutFrame 0 0 67 0 0 1 92 0) |
|
492 |
visibilityChannel: filenameEntryFieldVisibleHolder |
|
493 |
component: |
|
494 |
(SpecCollection |
|
495 |
collection: ( |
|
496 |
(ActionButtonSpec |
|
497 |
label: 'hideFilenameEntryFieldIcon' |
|
498 |
name: 'HideFilenameEntryFieldButton' |
|
499 |
layout: (LayoutFrame 0 0 0 0 13 0 0 1) |
|
500 |
activeHelpKey: hideFilenameEntryField |
|
501 |
hasCharacterOrientedLabel: false |
|
502 |
translateLabel: true |
|
503 |
model: hideFilenameEntryField |
|
504 |
postBuildCallback: hideFilenameEntryFieldButtonCreated: |
|
505 |
) |
|
506 |
(HorizontalPanelViewSpec |
|
507 |
name: 'HorizontalPanel1' |
|
508 |
layout: (LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0) |
|
509 |
level: 1 |
|
510 |
horizontalLayout: leftFit |
|
511 |
verticalLayout: fit |
|
512 |
horizontalSpace: 3 |
|
513 |
verticalSpace: 3 |
|
514 |
component: |
|
515 |
(SpecCollection |
|
516 |
collection: ( |
|
517 |
(ComboListSpec |
|
518 |
name: 'ComboList1' |
|
519 |
visibilityChannel: driveSelectorVisible |
|
520 |
model: selectedDeviceDrive |
|
521 |
comboList: listOfDeviceDrives |
|
522 |
useIndex: false |
|
523 |
hidePullDownMenuButton: false |
|
524 |
extent: (Point 53 23) |
|
525 |
) |
|
526 |
(VariableHorizontalPanelSpec |
|
527 |
name: 'VariableHorizontalPanel1' |
|
528 |
level: 0 |
|
529 |
showHandle: true |
|
530 |
component: |
|
531 |
(SpecCollection |
|
532 |
collection: ( |
|
533 |
(NonScrollableArbitraryComponentSpec |
|
534 |
name: 'NonScrollableArbitraryComponent1' |
|
535 |
component: FilenameEditFieldV2 |
|
536 |
postBuildCallback: postBuildEditField: |
|
537 |
) |
|
538 |
(ViewSpec |
|
539 |
name: 'FilterBox' |
|
540 |
component: |
|
541 |
(SpecCollection |
|
542 |
collection: ( |
|
543 |
(LabelSpec |
|
544 |
label: 'Filter:' |
|
545 |
name: 'Filter' |
|
546 |
layout: (LayoutFrame 0 0 0 0 40 0 0 1) |
|
547 |
translateLabel: true |
|
548 |
adjust: left |
|
549 |
postBuildCallback: postBuildPathViewBox: |
|
12670 | 550 |
) |
14589 | 551 |
(ComboBoxSpec |
552 |
name: 'FilterSelectionBox' |
|
553 |
layout: (LayoutFrame 40 0 0 0 0 1 0 1) |
|
554 |
model: filterModel |
|
555 |
immediateAccept: true |
|
556 |
acceptOnPointerLeave: false |
|
557 |
comboList: filterListModel |
|
558 |
) |
|
559 |
) |
|
560 |
||
561 |
) |
|
562 |
postBuildCallback: postBuildPathViewBox: |
|
12670 | 563 |
) |
14589 | 564 |
) |
565 |
||
566 |
) |
|
567 |
handles: (Any 0.77493599999999996 1.0) |
|
568 |
postBuildCallback: postBuildPathViewBox: |
|
569 |
useDefaultExtent: true |
|
12670 | 570 |
) |
14589 | 571 |
) |
572 |
||
573 |
) |
|
574 |
postBuildCallback: postBuildPathViewBox: |
|
12670 | 575 |
) |
14589 | 576 |
) |
577 |
||
578 |
) |
|
579 |
) |
|
580 |
(#'FileBrowserV2UISpecifications::PanelSpec' |
|
581 |
name: 'BrowserBox' |
|
582 |
layout: (LayoutFrame 0 0.0 92 0.0 0 1.0 -26 1.0) |
|
583 |
level: 0 |
|
584 |
showHandle: true |
|
585 |
snapMode: both |
|
586 |
whichView: last |
|
587 |
orientation: vertical |
|
588 |
visibility: viewNoteBookApplicationHolder |
|
589 |
component: |
|
590 |
(SpecCollection |
|
591 |
collection: ( |
|
592 |
(#'FileBrowserV2UISpecifications::PanelSpec' |
|
593 |
name: 'HorizontalPanel' |
|
594 |
level: 0 |
|
595 |
snapMode: both |
|
596 |
whichView: first |
|
597 |
orientation: horizontal |
|
598 |
visibility: showDirectoryTree |
|
599 |
component: |
|
600 |
(SpecCollection |
|
601 |
collection: ( |
|
602 |
(SubCanvasSpec |
|
603 |
name: 'DirectoryTreeBrowser' |
|
604 |
hasHorizontalScrollBar: false |
|
605 |
hasVerticalScrollBar: false |
|
606 |
majorKey: DirectoryTreeBrowser |
|
607 |
createNewApplication: true |
|
608 |
createNewBuilder: true |
|
609 |
postBuildCallback: postBuildDirectoryTree: |
|
610 |
) |
|
611 |
(SubCanvasSpec |
|
612 |
name: 'DirectoryContentsBrowser' |
|
613 |
hasHorizontalScrollBar: false |
|
614 |
hasVerticalScrollBar: false |
|
615 |
majorKey: DirectoryContentsBrowser |
|
616 |
createNewApplication: true |
|
617 |
createNewBuilder: true |
|
12670 | 618 |
) |
14589 | 619 |
) |
620 |
||
621 |
) |
|
622 |
handles: (Any 0.22500000000000001 1.0) |
|
623 |
) |
|
624 |
(SubCanvasSpec |
|
625 |
name: 'FileApplicationNoteBook' |
|
626 |
tabable: false |
|
627 |
hasHorizontalScrollBar: false |
|
628 |
hasVerticalScrollBar: false |
|
629 |
majorKey: FileApplicationNoteBook |
|
630 |
createNewApplication: true |
|
631 |
createNewBuilder: true |
|
632 |
) |
|
633 |
) |
|
634 |
||
635 |
) |
|
636 |
handles: (Any 0.5 1.0) |
|
637 |
) |
|
638 |
(ViewSpec |
|
639 |
name: 'InfoBox' |
|
640 |
layout: (LayoutFrame 0 0 -26 1 0 1 0 1) |
|
641 |
level: 0 |
|
642 |
visibilityChannel: infoBarVisibleHolder |
|
643 |
component: |
|
644 |
(SpecCollection |
|
645 |
collection: ( |
|
646 |
(LabelSpec |
|
647 |
label: 'NotifyLabel' |
|
648 |
name: 'NotifyLabel' |
|
649 |
layout: (LayoutFrame 0 0 1 0.0 -220 1 1 1.0) |
|
650 |
level: -1 |
|
651 |
translateLabel: true |
|
652 |
labelChannel: notifyChannel |
|
653 |
adjust: left |
|
654 |
) |
|
655 |
(LabelSpec |
|
656 |
label: 'encoding' |
|
657 |
name: 'EncodingLabel' |
|
658 |
layout: (LayoutFrame -318 1 2 0.0 -235 1 0 1.0) |
|
659 |
activeHelpKey: encodingLabel |
|
660 |
level: 0 |
|
661 |
labelChannel: fileEncodingHolder |
|
662 |
adjust: right |
|
663 |
menu: encodingMenu |
|
664 |
) |
|
665 |
(LabelSpec |
|
666 |
name: 'FileEncodingLockedLabel' |
|
667 |
layout: (LayoutFrame -235 1 2 0.0 -220 1 20 0.0) |
|
668 |
activeHelpKey: encodingLockedLabel |
|
669 |
level: 0 |
|
670 |
labelChannel: fileEncodingLockImageHolder |
|
671 |
adjust: right |
|
672 |
menu: encodingMenu |
|
12670 | 673 |
) |
14589 | 674 |
(LabelSpec |
675 |
label: 'Shown Files' |
|
676 |
name: 'ShownFilesLabel' |
|
677 |
layout: (LayoutFrame -220 1 1 0.0 -65 1 1 1.0) |
|
678 |
activeHelpKey: numberOfFiles |
|
679 |
level: -1 |
|
680 |
translateLabel: true |
|
681 |
labelChannel: shownFiles |
|
682 |
adjust: right |
|
683 |
) |
|
684 |
(ViewSpec |
|
685 |
name: 'ProgressIndicatorBox' |
|
686 |
layout: (LayoutFrame -220 1 1 0.0 -65 1 1 1.0) |
|
687 |
level: -1 |
|
688 |
visibilityChannel: activityVisibilityChannel |
|
689 |
component: |
|
690 |
(SpecCollection |
|
691 |
collection: ( |
|
692 |
(ProgressIndicatorSpec |
|
693 |
name: 'ProgressIndicator1' |
|
694 |
layout: (LayoutFrame 5 0.0 -7 0.5 -5 1.0 7 0.5) |
|
695 |
backgroundColor: (Color 0.0 66.666666666666671 66.666666666666671) |
|
696 |
isActivityIndicator: true |
|
12670 | 697 |
) |
14589 | 698 |
) |
699 |
||
700 |
) |
|
701 |
) |
|
702 |
(LabelSpec |
|
703 |
name: 'BusyLabel' |
|
704 |
layout: (LayoutFrame -220 1 1 0.0 -65 1 1 1.0) |
|
705 |
activeHelpKey: modeLabel |
|
706 |
level: -1 |
|
707 |
visibilityChannel: busyLabelVisibleHolder |
|
708 |
translateLabel: true |
|
709 |
labelChannel: busyLabelHolder |
|
710 |
adjust: right |
|
711 |
) |
|
712 |
(LabelSpec |
|
713 |
label: 'M' |
|
714 |
name: 'ModeLabel' |
|
715 |
layout: (LayoutFrame -65 1 1 0.0 -55 1 1 1.0) |
|
716 |
activeHelpKey: modeLabel |
|
717 |
level: -1 |
|
718 |
translateLabel: true |
|
719 |
labelChannel: modeLabelHolder |
|
720 |
adjust: right |
|
721 |
postBuildCallback: postBuildEditModeInfoLabel: |
|
722 |
) |
|
723 |
(LabelSpec |
|
724 |
label: 'L' |
|
725 |
name: 'LineLabel' |
|
726 |
layout: (LayoutFrame -55 1 1 0.0 -20 1 1 1.0) |
|
727 |
activeHelpKey: lineLabel |
|
728 |
level: -1 |
|
729 |
translateLabel: true |
|
730 |
labelChannel: cursorLineLabelHolder |
|
731 |
adjust: right |
|
12670 | 732 |
) |
14589 | 733 |
(LabelSpec |
734 |
label: 'C' |
|
735 |
name: 'ColLabel' |
|
736 |
layout: (LayoutFrame -20 1 1 0.0 0 1 1 1.0) |
|
737 |
activeHelpKey: columnLabel |
|
738 |
level: -1 |
|
739 |
translateLabel: true |
|
740 |
labelChannel: cursorColLabelHolder |
|
741 |
adjust: right |
|
742 |
) |
|
743 |
) |
|
744 |
||
745 |
) |
|
746 |
keepSpaceForOSXResizeHandleH: true |
|
12670 | 747 |
) |
14589 | 748 |
(LabelSpec |
749 |
label: 'Preview' |
|
750 |
name: 'PreviewLabel' |
|
751 |
layout: (LayoutFrame 0 0.5 93 0 100 0.5 115 0) |
|
752 |
level: 0 |
|
753 |
borderWidth: 1 |
|
754 |
visibilityChannel: previewVisibleHolder |
|
755 |
backgroundColor: (Color 86.999313344014652 86.999313344014652 86.999313344014652) |
|
756 |
translateLabel: true |
|
757 |
) |
|
758 |
(ArbitraryComponentSpec |
|
759 |
name: 'Preview' |
|
760 |
layout: (LayoutFrame 0 0.5 116 0 -147 1 -266 1) |
|
761 |
level: 1 |
|
762 |
visibilityChannel: previewVisibleHolder |
|
763 |
hasBorder: false |
|
764 |
component: ImageView |
|
765 |
) |
|
766 |
(ActionButtonSpec |
|
767 |
label: 'closePreviewButtonImage' |
|
768 |
name: 'ClosePreviewButton' |
|
769 |
layout: (LayoutFrame -169 1 94 0 -147 1 116 0) |
|
770 |
visibilityChannel: previewVisibleHolder |
|
771 |
hasCharacterOrientedLabel: false |
|
772 |
translateLabel: true |
|
773 |
) |
|
774 |
) |
|
775 |
||
776 |
) |
|
777 |
) |
|
3892 | 778 |
! ! |
779 |
||
780 |
!FileBrowserV2 class methodsFor:'menu specs'! |
|
781 |
||
7102 | 782 |
editModeInfoLabelMenu |
783 |
"This resource specification was automatically generated |
|
784 |
by the MenuEditor of ST/X." |
|
785 |
||
786 |
"Do not manually edit this!! If it is corrupted, |
|
787 |
the MenuEditor may not be able to read the specification." |
|
788 |
||
789 |
" |
|
790 |
MenuEditor new openOnClass:Tools::NewSystemBrowser andSelector:#editModeInfoLabelMenu |
|
791 |
(Menu new fromLiteralArrayEncoding:(Tools::NewSystemBrowser editModeInfoLabelMenu)) startUp |
|
792 |
" |
|
793 |
||
794 |
<resource: #menu> |
|
795 |
||
12336 | 796 |
^ |
7102 | 797 |
#(Menu |
12336 | 798 |
( |
799 |
(MenuItem |
|
800 |
label: 'Insert' |
|
801 |
itemValue: editModeInsert |
|
802 |
translateLabel: true |
|
803 |
) |
|
804 |
(MenuItem |
|
805 |
label: 'Overwrite' |
|
806 |
itemValue: editModeOverwrite |
|
807 |
translateLabel: true |
|
808 |
) |
|
809 |
(MenuItem |
|
810 |
label: 'Insert Selecting' |
|
811 |
itemValue: editModeInsertAndSelect |
|
812 |
translateLabel: true |
|
813 |
) |
|
814 |
) |
|
815 |
nil |
|
816 |
nil |
|
7102 | 817 |
) |
818 |
||
819 |
"Created: / 11-09-2006 / 12:23:59 / cg" |
|
820 |
! |
|
821 |
||
5528 | 822 |
encodingMenu |
823 |
"This resource specification was automatically generated |
|
824 |
by the MenuEditor of ST/X." |
|
825 |
||
826 |
"Do not manually edit this!! If it is corrupted, |
|
827 |
the MenuEditor may not be able to read the specification." |
|
828 |
||
829 |
" |
|
830 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#encodingMenu |
|
831 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 encodingMenu)) startUp |
|
832 |
" |
|
833 |
||
834 |
<resource: #menu> |
|
835 |
||
12336 | 836 |
^ |
5528 | 837 |
#(Menu |
12336 | 838 |
( |
839 |
(MenuItem |
|
840 |
label: 'Encoding...' |
|
841 |
itemValue: fileEncodingDialog |
|
842 |
translateLabel: true |
|
843 |
) |
|
844 |
(MenuItem |
|
845 |
label: '-' |
|
846 |
) |
|
847 |
(MenuItem |
|
848 |
label: 'Locked' |
|
849 |
translateLabel: true |
|
850 |
indication: lockFileEncodingHolder |
|
851 |
) |
|
852 |
) |
|
853 |
nil |
|
854 |
nil |
|
5528 | 855 |
) |
856 |
! |
|
857 |
||
3892 | 858 |
mainMenu |
859 |
"This resource specification was automatically generated |
|
860 |
by the MenuEditor of ST/X." |
|
861 |
||
862 |
"Do not manually edit this!! If it is corrupted, |
|
863 |
the MenuEditor may not be able to read the specification." |
|
864 |
||
11136 | 865 |
|
3892 | 866 |
" |
867 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#mainMenu |
|
868 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 mainMenu)) startUp |
|
869 |
" |
|
870 |
||
871 |
<resource: #menu> |
|
872 |
||
13854 | 873 |
^ |
5424 | 874 |
#(Menu |
13854 | 875 |
( |
876 |
(MenuItem |
|
877 |
label: 'Browser' |
|
878 |
submenuChannel: browserMenu |
|
879 |
) |
|
880 |
(MenuItem |
|
881 |
label: 'Directory' |
|
882 |
submenuChannel: directoryMenu |
|
883 |
) |
|
884 |
(MenuItem |
|
885 |
label: 'File' |
|
886 |
submenuChannel: fileMenu |
|
887 |
) |
|
888 |
(MenuItem |
|
889 |
label: 'Edit' |
|
890 |
submenuChannel: editMenu |
|
891 |
) |
|
892 |
(MenuItem |
|
893 |
label: 'View' |
|
894 |
submenu: |
|
895 |
(Menu |
|
896 |
( |
|
897 |
(MenuItem |
|
898 |
label: 'Details' |
|
899 |
submenuChannel: viewInContentsBrowserMenu |
|
900 |
) |
|
901 |
(MenuItem |
|
902 |
label: 'Sort' |
|
903 |
submenuChannel: sortMenu |
|
904 |
) |
|
905 |
(MenuItem |
|
906 |
label: 'Show' |
|
907 |
submenuChannel: showMenuSpec |
|
908 |
) |
|
909 |
(MenuItem |
|
910 |
label: '-' |
|
911 |
) |
|
912 |
(MenuItem |
|
913 |
label: 'Toolbar' |
|
914 |
hideMenuOnActivated: false |
|
915 |
indication: toolBarVisibleHolder |
|
916 |
) |
|
917 |
(MenuItem |
|
13908 | 918 |
label: 'Bookmarks' |
919 |
hideMenuOnActivated: false |
|
920 |
indication: bookmarkBarVisibleHolder |
|
921 |
) |
|
922 |
(MenuItem |
|
13854 | 923 |
label: 'Path Entry && Filter' |
924 |
hideMenuOnActivated: false |
|
925 |
indication: filenameEntryFieldVisibleHolder |
|
926 |
) |
|
927 |
(MenuItem |
|
928 |
label: 'Info' |
|
929 |
hideMenuOnActivated: false |
|
930 |
indication: infoBarVisibleHolder |
|
931 |
) |
|
932 |
(MenuItem |
|
933 |
label: 'Tags' |
|
13908 | 934 |
hideMenuOnActivated: false |
13854 | 935 |
indication: tagsBrowserVisibleHolder |
936 |
) |
|
937 |
(MenuItem |
|
938 |
label: 'Preview' |
|
939 |
hideMenuOnActivated: false |
|
940 |
indication: previewVisibleHolder |
|
941 |
) |
|
942 |
(MenuItem |
|
943 |
label: '-' |
|
944 |
) |
|
945 |
(MenuItem |
|
946 |
label: 'Update' |
|
947 |
itemValue: updateCurrentDirectory |
|
948 |
) |
|
949 |
) |
|
950 |
nil |
|
951 |
nil |
|
952 |
) |
|
953 |
) |
|
954 |
(MenuItem |
|
955 |
label: 'Tools' |
|
956 |
submenuChannel: toolsMenuSpec |
|
957 |
) |
|
958 |
(MenuItem |
|
959 |
label: 'Source Code Management' |
|
960 |
submenuChannel: scmMenuSlice |
|
961 |
isMenuSlice: true |
|
962 |
) |
|
963 |
(MenuItem |
|
964 |
label: 'Extras' |
|
965 |
submenuChannel: extraMenu |
|
966 |
) |
|
967 |
(MenuItem |
|
968 |
label: 'MENU_Help' |
|
969 |
startGroup: conditionalRight |
|
970 |
submenu: |
|
971 |
(Menu |
|
972 |
( |
|
973 |
(MenuItem |
|
974 |
label: 'FileBrowser Documentation' |
|
975 |
itemValue: openHTMLDocument: |
|
976 |
argument: 'tools/fbrowserV2/TOP.html' |
|
977 |
) |
|
978 |
(MenuItem |
|
979 |
label: '-' |
|
980 |
) |
|
981 |
(MenuItem |
|
982 |
label: 'About FileBrowser...' |
|
983 |
itemValue: openAboutThisApplication |
|
984 |
) |
|
985 |
) |
|
986 |
nil |
|
987 |
nil |
|
988 |
) |
|
989 |
) |
|
990 |
) |
|
991 |
nil |
|
992 |
nil |
|
3892 | 993 |
) |
994 |
! |
|
995 |
||
4257 | 996 |
previewLabelMenu |
997 |
"This resource specification was automatically generated |
|
998 |
by the MenuEditor of ST/X." |
|
999 |
||
1000 |
"Do not manually edit this!! If it is corrupted, |
|
1001 |
the MenuEditor may not be able to read the specification." |
|
1002 |
||
1003 |
" |
|
1004 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#previewLabelMenu |
|
1005 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 previewLabelMenu)) startUp |
|
1006 |
" |
|
1007 |
||
1008 |
<resource: #menu> |
|
1009 |
||
12336 | 1010 |
^ |
4257 | 1011 |
#(#Menu |
12336 | 1012 |
#( |
1013 |
#(#MenuItem |
|
1014 |
#label: 'Close Preview' |
|
1015 |
#itemValue: #closePreview |
|
1016 |
#translateLabel: true |
|
1017 |
) |
|
1018 |
) |
|
1019 |
nil |
|
1020 |
nil |
|
4257 | 1021 |
) |
1022 |
! |
|
1023 |
||
3892 | 1024 |
toolBarMainMenu |
14304 | 1025 |
"This resource specification was automatically generated |
1026 |
by the MenuEditor of ST/X." |
|
1027 |
||
1028 |
"Do not manually edit this!! If it is corrupted, |
|
1029 |
the MenuEditor may not be able to read the specification." |
|
1030 |
||
1031 |
||
1032 |
" |
|
1033 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu |
|
1034 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu)) startUp |
|
1035 |
" |
|
1036 |
||
13854 | 1037 |
<resource: #menu> |
1038 |
||
14304 | 1039 |
^ |
1040 |
#(Menu |
|
1041 |
( |
|
1042 |
(MenuItem |
|
1043 |
activeHelpKey: directoryBack |
|
1044 |
enabled: enableBack |
|
1045 |
label: 'Back' |
|
1046 |
itemValue: doBack |
|
1047 |
isButton: true |
|
1048 |
submenuChannel: menuDirHistoryBack |
|
1049 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyBackIcon) |
|
1050 |
) |
|
1051 |
(MenuItem |
|
1052 |
label: '' |
|
1053 |
) |
|
1054 |
(MenuItem |
|
1055 |
activeHelpKey: directoryForward |
|
1056 |
enabled: enableForward |
|
1057 |
label: 'Forward' |
|
1058 |
itemValue: doForward |
|
1059 |
isButton: true |
|
1060 |
submenuChannel: menuDirHistoryForward |
|
1061 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyForwardIcon) |
|
1062 |
) |
|
1063 |
(MenuItem |
|
1064 |
label: '-' |
|
1065 |
) |
|
1066 |
(MenuItem |
|
1067 |
activeHelpKey: directoryUp |
|
1068 |
enabled: enableDirectoryUp |
|
1069 |
label: 'DirectoryUp' |
|
1070 |
itemValue: doGoDirectoryUp |
|
1071 |
isButton: true |
|
1072 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryUpIcon) |
|
1073 |
) |
|
1074 |
(MenuItem |
|
1075 |
activeHelpKey: fileDesktop |
|
14309 | 1076 |
enabled: enableGotoDesktopDirectory |
14304 | 1077 |
label: 'Desktop' |
1078 |
itemValue: doGotoDesktopDirectory |
|
1079 |
isButton: true |
|
14570 | 1080 |
labelImage: (ResourceRetriever ToolbarIconLibrary desktopIcon) |
14304 | 1081 |
) |
1082 |
(MenuItem |
|
1083 |
activeHelpKey: fileHome |
|
1084 |
enabled: enableHome |
|
1085 |
label: 'Home' |
|
1086 |
itemValue: doGotoHomeDirectory |
|
1087 |
isButton: true |
|
1088 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon) |
|
1089 |
) |
|
1090 |
(MenuItem |
|
1091 |
activeHelpKey: fileGotoDefaultDirectory |
|
1092 |
enabled: enableGotoDefaultDirectory |
|
1093 |
label: 'Current' |
|
1094 |
itemValue: doGotoDefaultDirectory |
|
1095 |
isButton: true |
|
1096 |
isVisible: false |
|
1097 |
labelImage: (ResourceRetriever ToolbarIconLibrary currentDirectoryIcon) |
|
1098 |
) |
|
1099 |
(MenuItem |
|
1100 |
activeHelpKey: fileGotoSmalltalkDirectory |
|
1101 |
enabled: enableGotoSmalltalkDirectory |
|
1102 |
label: 'ST/X Default' |
|
1103 |
itemValue: doGotoSmalltalkDirectory |
|
1104 |
isButton: true |
|
1105 |
labelImage: (ResourceRetriever ToolbarIconLibrary stxHomeIcon) |
|
1106 |
) |
|
1107 |
(MenuItem |
|
1108 |
activeHelpKey: fileGotoBookmark |
|
1109 |
label: 'Bookmarks' |
|
1110 |
isButton: true |
|
1111 |
isVisible: false |
|
1112 |
submenuChannel: gotoBookmarksMenu |
|
1113 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryBookmarksIcon) |
|
1114 |
) |
|
1115 |
(MenuItem |
|
1116 |
activeHelpKey: fileHistory |
|
1117 |
enabled: enableFileHistory |
|
1118 |
label: 'File History' |
|
1119 |
isButton: true |
|
1120 |
isVisible: false |
|
1121 |
submenuChannel: menuFileHistory |
|
1122 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyIcon) |
|
1123 |
) |
|
1124 |
(MenuItem |
|
1125 |
label: '-' |
|
1126 |
) |
|
1127 |
(MenuItem |
|
1128 |
activeHelpKey: searchFile |
|
1129 |
label: 'Search File' |
|
1130 |
itemValue: doOpenSearchFile |
|
1131 |
isButton: true |
|
1132 |
labelImage: (ResourceRetriever ToolbarIconLibrary searchFileIcon) |
|
1133 |
) |
|
1134 |
(MenuItem |
|
1135 |
label: '-' |
|
1136 |
) |
|
1137 |
(MenuItem |
|
1138 |
activeHelpKey: cutFile |
|
1139 |
enabled: hasSelection |
|
1140 |
label: 'Cut' |
|
1141 |
itemValue: cutFiles |
|
1142 |
isButton: true |
|
1143 |
isVisible: false |
|
1144 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutFileIcon) |
|
1145 |
) |
|
1146 |
(MenuItem |
|
1147 |
activeHelpKey: copyFile |
|
1148 |
enabled: hasSelection |
|
1149 |
label: 'Copy' |
|
1150 |
itemValue: copyFiles |
|
1151 |
isButton: true |
|
1152 |
isVisible: false |
|
1153 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyFileIcon) |
|
1154 |
) |
|
1155 |
(MenuItem |
|
1156 |
activeHelpKey: pasteFile |
|
1157 |
enabled: canPaste |
|
1158 |
label: 'Paste' |
|
1159 |
itemValue: pasteFiles |
|
1160 |
isButton: true |
|
1161 |
isVisible: false |
|
1162 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteFileIcon) |
|
1163 |
) |
|
1164 |
(MenuItem |
|
1165 |
activeHelpKey: deleteFile |
|
1166 |
enabled: hasSelection |
|
1167 |
label: 'Delete' |
|
1168 |
itemValue: deleteFiles |
|
1169 |
isButton: true |
|
1170 |
isVisible: false |
|
1171 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteFileIcon) |
|
1172 |
) |
|
1173 |
(MenuItem |
|
1174 |
label: '-' |
|
1175 |
isVisible: false |
|
1176 |
) |
|
1177 |
(MenuItem |
|
1178 |
activeHelpKey: editFile |
|
1179 |
label: 'Edit File' |
|
1180 |
itemValue: doShowFileContents |
|
1181 |
isButton: true |
|
1182 |
isVisible: false |
|
1183 |
labelImage: (ResourceRetriever ToolbarIconLibrary editFileIcon) |
|
1184 |
) |
|
1185 |
(MenuItem |
|
1186 |
activeHelpKey: fileIn |
|
1187 |
label: 'File In' |
|
1188 |
itemValue: fileFileIn |
|
1189 |
isButton: true |
|
1190 |
isVisible: false |
|
1191 |
labelImage: (ResourceRetriever ToolbarIconLibrary fileInIcon) |
|
1192 |
) |
|
1193 |
(MenuItem |
|
1194 |
activeHelpKey: openChangeBrowser |
|
1195 |
enabled: hasFileSelection |
|
1196 |
label: 'Changes Browser' |
|
1197 |
itemValue: openChangesBrowser |
|
1198 |
isButton: true |
|
1199 |
labelImage: (ResourceRetriever ToolbarIconLibrary startChangesBrowserIcon) |
|
1200 |
) |
|
1201 |
(MenuItem |
|
1202 |
label: '-' |
|
1203 |
isVisible: false |
|
1204 |
) |
|
1205 |
(MenuItem |
|
1206 |
activeHelpKey: addTerminal |
|
1207 |
label: 'VT100' |
|
1208 |
itemValue: doAddTerminal |
|
1209 |
isButton: true |
|
1210 |
labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon) |
|
1211 |
) |
|
1212 |
(MenuItem |
|
1213 |
activeHelpKey: make |
|
1214 |
enabled: canMake |
|
1215 |
label: 'Make' |
|
1216 |
itemValue: doMake |
|
1217 |
isButton: true |
|
1218 |
labelImage: (ResourceRetriever ToolbarIconLibrary make24x24Icon3) |
|
1219 |
) |
|
1220 |
(MenuItem |
|
1221 |
activeHelpKey: viewDetails |
|
1222 |
label: 'viewDetails' |
|
1223 |
isButton: true |
|
1224 |
startGroup: right |
|
1225 |
hideMenuOnActivated: false |
|
1226 |
indication: viewDetails |
|
1227 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
1228 |
) |
|
1229 |
(MenuItem |
|
1230 |
activeHelpKey: viewDetails |
|
1231 |
label: 'viewDetails' |
|
1232 |
isButton: true |
|
1233 |
startGroup: right |
|
1234 |
isVisible: false |
|
1235 |
indication: viewDetails |
|
1236 |
submenuChannel: viewDetailsMenuSpec |
|
1237 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
1238 |
) |
|
1239 |
(MenuItem |
|
1240 |
activeHelpKey: selectDetails |
|
1241 |
label: '' |
|
1242 |
isButton: true |
|
1243 |
startGroup: right |
|
1244 |
submenuChannel: viewDetailsMenuSpec |
|
1245 |
labelImage: (ResourceRetriever ToolbarIconLibrary empty1x20Icon) |
|
1246 |
) |
|
1247 |
) |
|
1248 |
nil |
|
1249 |
nil |
|
1250 |
) |
|
13854 | 1251 |
! |
1252 |
||
1253 |
toolBarMainMenu_new |
|
3892 | 1254 |
"This resource specification was automatically generated |
1255 |
by the MenuEditor of ST/X." |
|
1256 |
||
1257 |
"Do not manually edit this!! If it is corrupted, |
|
1258 |
the MenuEditor may not be able to read the specification." |
|
1259 |
||
13854 | 1260 |
|
1261 |
" |
|
14309 | 1262 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu_new |
1263 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu_new)) startUp |
|
13854 | 1264 |
" |
1265 |
||
1266 |
<resource: #menu> |
|
1267 |
||
1268 |
^ |
|
1269 |
#(Menu |
|
1270 |
( |
|
1271 |
(MenuItem |
|
1272 |
activeHelpKey: directoryBack |
|
1273 |
enabled: enableBack |
|
1274 |
label: 'Back' |
|
1275 |
itemValue: doBack |
|
1276 |
isButton: true |
|
1277 |
submenuChannel: menuDirHistoryBack |
|
1278 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyBackIcon) |
|
1279 |
) |
|
1280 |
(MenuItem |
|
1281 |
label: '' |
|
1282 |
) |
|
1283 |
(MenuItem |
|
1284 |
activeHelpKey: directoryForward |
|
1285 |
enabled: enableForward |
|
1286 |
label: 'Forward' |
|
1287 |
itemValue: doForward |
|
1288 |
isButton: true |
|
1289 |
submenuChannel: menuDirHistoryForward |
|
1290 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyForwardIcon) |
|
1291 |
) |
|
1292 |
(MenuItem |
|
1293 |
label: '-' |
|
1294 |
) |
|
1295 |
(MenuItem |
|
1296 |
activeHelpKey: directoryUp |
|
1297 |
enabled: enableDirectoryUp |
|
1298 |
label: 'DirectoryUp' |
|
1299 |
itemValue: doGoDirectoryUp |
|
1300 |
isButton: true |
|
1301 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryUpIcon) |
|
1302 |
) |
|
1303 |
(MenuItem |
|
1304 |
activeHelpKey: fileHome |
|
14309 | 1305 |
enabled: enableGotoHomeDirectory |
13854 | 1306 |
label: 'Home' |
1307 |
itemValue: doGotoHomeDirectory |
|
1308 |
isButton: true |
|
1309 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon) |
|
1310 |
) |
|
1311 |
(MenuItem |
|
14309 | 1312 |
activeHelpKey: gotoDesktop |
1313 |
enabled: enableGotoDesktopDirectory |
|
1314 |
label: 'Desktop' |
|
1315 |
itemValue: doGotoDesktopDirectory |
|
1316 |
isButton: true |
|
1317 |
labelImage: (ResourceRetriever ToolbarIconLibrary desktopIcon) |
|
1318 |
) |
|
1319 |
(MenuItem |
|
13854 | 1320 |
activeHelpKey: fileGotoDefaultDirectory |
1321 |
enabled: enableGotoDefaultDirectory |
|
1322 |
label: 'Current' |
|
1323 |
itemValue: doGotoDefaultDirectory |
|
1324 |
isButton: true |
|
1325 |
isVisible: false |
|
1326 |
labelImage: (ResourceRetriever ToolbarIconLibrary currentDirectoryIcon) |
|
1327 |
) |
|
1328 |
(MenuItem |
|
1329 |
activeHelpKey: fileGotoSmalltalkDirectory |
|
1330 |
enabled: enableGotoSmalltalkDirectory |
|
1331 |
label: 'ST/X Default' |
|
1332 |
itemValue: doGotoSmalltalkDirectory |
|
1333 |
isButton: true |
|
1334 |
labelImage: (ResourceRetriever ToolbarIconLibrary stxHomeIcon) |
|
1335 |
) |
|
1336 |
(MenuItem |
|
1337 |
activeHelpKey: fileGotoBookmark |
|
1338 |
label: 'Bookmarks' |
|
1339 |
isButton: true |
|
1340 |
isVisible: false |
|
1341 |
submenuChannel: gotoBookmarksMenu |
|
1342 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryBookmarksIcon) |
|
1343 |
) |
|
1344 |
(MenuItem |
|
1345 |
activeHelpKey: fileHistory |
|
1346 |
enabled: enableFileHistory |
|
1347 |
label: 'File History' |
|
1348 |
isButton: true |
|
1349 |
isVisible: false |
|
1350 |
submenuChannel: menuFileHistory |
|
1351 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyIcon) |
|
1352 |
) |
|
1353 |
(MenuItem |
|
1354 |
label: '-' |
|
1355 |
) |
|
1356 |
(MenuItem |
|
1357 |
activeHelpKey: searchFile |
|
1358 |
label: 'Search File' |
|
1359 |
itemValue: doOpenSearchFile |
|
1360 |
isButton: true |
|
1361 |
labelImage: (ResourceRetriever ToolbarIconLibrary searchFileIcon) |
|
1362 |
) |
|
1363 |
(MenuItem |
|
1364 |
label: '-' |
|
1365 |
) |
|
1366 |
(MenuItem |
|
1367 |
activeHelpKey: cutFile |
|
1368 |
enabled: hasSelection |
|
1369 |
label: 'Cut' |
|
1370 |
itemValue: cutFiles |
|
1371 |
isButton: true |
|
1372 |
isVisible: false |
|
1373 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutFileIcon) |
|
1374 |
) |
|
1375 |
(MenuItem |
|
1376 |
activeHelpKey: copyFile |
|
1377 |
enabled: hasSelection |
|
1378 |
label: 'Copy' |
|
1379 |
itemValue: copyFiles |
|
1380 |
isButton: true |
|
1381 |
isVisible: false |
|
1382 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyFileIcon) |
|
1383 |
) |
|
1384 |
(MenuItem |
|
1385 |
activeHelpKey: pasteFile |
|
1386 |
enabled: canPaste |
|
1387 |
label: 'Paste' |
|
1388 |
itemValue: pasteFiles |
|
1389 |
isButton: true |
|
1390 |
isVisible: false |
|
1391 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteFileIcon) |
|
1392 |
) |
|
1393 |
(MenuItem |
|
1394 |
activeHelpKey: deleteFile |
|
1395 |
enabled: hasSelection |
|
1396 |
label: 'Delete' |
|
1397 |
itemValue: deleteFiles |
|
1398 |
isButton: true |
|
1399 |
isVisible: false |
|
1400 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteFileIcon) |
|
1401 |
) |
|
1402 |
(MenuItem |
|
1403 |
label: '-' |
|
1404 |
isVisible: false |
|
1405 |
) |
|
1406 |
(MenuItem |
|
1407 |
activeHelpKey: editFile |
|
1408 |
label: 'Edit File' |
|
1409 |
itemValue: doShowFileContents |
|
1410 |
isButton: true |
|
1411 |
isVisible: false |
|
1412 |
labelImage: (ResourceRetriever ToolbarIconLibrary editFileIcon) |
|
1413 |
) |
|
1414 |
(MenuItem |
|
1415 |
activeHelpKey: fileIn |
|
1416 |
label: 'File In' |
|
1417 |
itemValue: fileFileIn |
|
1418 |
isButton: true |
|
1419 |
isVisible: false |
|
1420 |
labelImage: (ResourceRetriever ToolbarIconLibrary fileInIcon) |
|
1421 |
) |
|
1422 |
(MenuItem |
|
1423 |
activeHelpKey: openChangeBrowser |
|
1424 |
enabled: hasFileSelection |
|
1425 |
label: 'Changes Browser' |
|
1426 |
itemValue: openChangesBrowser |
|
1427 |
isButton: true |
|
1428 |
labelImage: (ResourceRetriever ToolbarIconLibrary startChangesBrowserIcon) |
|
1429 |
) |
|
1430 |
(MenuItem |
|
1431 |
label: '-' |
|
1432 |
isVisible: false |
|
1433 |
) |
|
1434 |
(MenuItem |
|
1435 |
activeHelpKey: addTerminal |
|
1436 |
label: 'VT100' |
|
1437 |
itemValue: doAddTerminal |
|
1438 |
isButton: true |
|
1439 |
labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon) |
|
1440 |
) |
|
1441 |
(MenuItem |
|
1442 |
activeHelpKey: make |
|
1443 |
enabled: canMake |
|
1444 |
label: 'Make' |
|
1445 |
itemValue: doMake |
|
1446 |
isButton: true |
|
1447 |
labelImage: (ResourceRetriever ToolbarIconLibrary make24x24Icon3) |
|
1448 |
) |
|
1449 |
(MenuItem |
|
1450 |
activeHelpKey: viewDetails |
|
1451 |
label: 'viewDetails' |
|
1452 |
isButton: true |
|
1453 |
startGroup: right |
|
1454 |
hideMenuOnActivated: false |
|
1455 |
indication: viewDetails |
|
1456 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
1457 |
) |
|
1458 |
(MenuItem |
|
1459 |
activeHelpKey: viewDetails |
|
1460 |
label: 'viewDetails' |
|
1461 |
isButton: true |
|
1462 |
startGroup: right |
|
1463 |
isVisible: false |
|
1464 |
indication: viewDetails |
|
1465 |
submenuChannel: viewDetailsMenuSpec |
|
1466 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
1467 |
) |
|
1468 |
(MenuItem |
|
1469 |
activeHelpKey: selectDetails |
|
1470 |
label: '' |
|
1471 |
isButton: true |
|
1472 |
startGroup: right |
|
1473 |
submenuChannel: viewDetailsMenuSpec |
|
1474 |
labelImage: (ResourceRetriever ToolbarIconLibrary empty1x20Icon) |
|
1475 |
) |
|
1476 |
) |
|
1477 |
nil |
|
1478 |
nil |
|
1479 |
) |
|
1480 |
! |
|
1481 |
||
1482 |
toolBarMainMenu_old |
|
1483 |
"This resource specification was automatically generated |
|
1484 |
by the MenuEditor of ST/X." |
|
1485 |
||
1486 |
"Do not manually edit this!! If it is corrupted, |
|
1487 |
the MenuEditor may not be able to read the specification." |
|
1488 |
||
1489 |
||
3892 | 1490 |
" |
14309 | 1491 |
MenuEditor new openOnClass:FileBrowserV2 andSelector:#toolBarMainMenu_old |
1492 |
(Menu new fromLiteralArrayEncoding:(FileBrowserV2 toolBarMainMenu_old)) startUp |
|
3892 | 1493 |
" |
1494 |
||
1495 |
<resource: #menu> |
|
1496 |
||
14309 | 1497 |
^ |
5398 | 1498 |
#(Menu |
13854 | 1499 |
( |
1500 |
(MenuItem |
|
1501 |
activeHelpKey: directoryBack |
|
1502 |
enabled: enableBack |
|
1503 |
label: 'Back' |
|
1504 |
itemValue: doBack |
|
1505 |
isButton: true |
|
1506 |
submenuChannel: menuDirHistoryBack |
|
1507 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyBackIcon) |
|
1508 |
) |
|
1509 |
(MenuItem |
|
1510 |
label: '' |
|
1511 |
) |
|
1512 |
(MenuItem |
|
1513 |
activeHelpKey: directoryForward |
|
1514 |
enabled: enableForward |
|
1515 |
label: 'Forward' |
|
1516 |
itemValue: doForward |
|
1517 |
isButton: true |
|
1518 |
submenuChannel: menuDirHistoryForward |
|
1519 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyForwardIcon) |
|
1520 |
) |
|
1521 |
(MenuItem |
|
1522 |
label: '-' |
|
1523 |
) |
|
1524 |
(MenuItem |
|
1525 |
activeHelpKey: directoryUp |
|
1526 |
enabled: enableDirectoryUp |
|
1527 |
label: 'DirectoryUp' |
|
1528 |
itemValue: doGoDirectoryUp |
|
1529 |
isButton: true |
|
1530 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryUpIcon) |
|
1531 |
) |
|
1532 |
(MenuItem |
|
1533 |
activeHelpKey: fileHome |
|
1534 |
enabled: enableHome |
|
1535 |
label: 'Home' |
|
1536 |
itemValue: doGotoHomeDirectory |
|
1537 |
isButton: true |
|
1538 |
labelImage: (ResourceRetriever ToolbarIconLibrary homeIcon) |
|
1539 |
) |
|
1540 |
(MenuItem |
|
14309 | 1541 |
activeHelpKey: gotoDesktop |
1542 |
enabled: enableGotoDesktopDirectory |
|
1543 |
label: 'Desktop' |
|
1544 |
itemValue: doGotoDesktopDirectory |
|
1545 |
isButton: true |
|
1546 |
labelImage: (ResourceRetriever ToolbarIconLibrary desktopIcon) |
|
1547 |
) |
|
1548 |
(MenuItem |
|
13854 | 1549 |
activeHelpKey: fileGotoDefaultDirectory |
1550 |
enabled: enableGotoDefaultDirectory |
|
1551 |
label: 'Current' |
|
1552 |
itemValue: doGotoDefaultDirectory |
|
1553 |
isButton: true |
|
1554 |
isVisible: false |
|
1555 |
labelImage: (ResourceRetriever ToolbarIconLibrary currentDirectoryIcon) |
|
1556 |
) |
|
1557 |
(MenuItem |
|
1558 |
activeHelpKey: fileGotoSmalltalkDirectory |
|
1559 |
enabled: enableGotoSmalltalkDirectory |
|
1560 |
label: 'ST/X Default' |
|
1561 |
itemValue: doGotoSmalltalkDirectory |
|
1562 |
isButton: true |
|
1563 |
labelImage: (ResourceRetriever ToolbarIconLibrary stxHomeIcon) |
|
1564 |
) |
|
1565 |
(MenuItem |
|
1566 |
activeHelpKey: fileGotoBookmark |
|
1567 |
label: 'Bookmarks' |
|
1568 |
isButton: true |
|
1569 |
submenuChannel: gotoBookmarksMenu |
|
1570 |
labelImage: (ResourceRetriever ToolbarIconLibrary directoryBookmarksIcon) |
|
1571 |
) |
|
1572 |
(MenuItem |
|
1573 |
activeHelpKey: fileHistory |
|
1574 |
enabled: enableFileHistory |
|
1575 |
label: 'File History' |
|
1576 |
isButton: true |
|
1577 |
submenuChannel: menuFileHistory |
|
1578 |
labelImage: (ResourceRetriever ToolbarIconLibrary historyIcon) |
|
1579 |
) |
|
1580 |
(MenuItem |
|
1581 |
label: '-' |
|
1582 |
) |
|
1583 |
(MenuItem |
|
1584 |
activeHelpKey: searchFile |
|
1585 |
label: 'Search File' |
|
1586 |
itemValue: doOpenSearchFile |
|
1587 |
isButton: true |
|
1588 |
labelImage: (ResourceRetriever ToolbarIconLibrary searchFileIcon) |
|
1589 |
) |
|
1590 |
(MenuItem |
|
1591 |
label: '-' |
|
1592 |
) |
|
1593 |
(MenuItem |
|
1594 |
activeHelpKey: cutFile |
|
1595 |
enabled: hasSelection |
|
1596 |
label: 'Cut' |
|
1597 |
itemValue: cutFiles |
|
1598 |
isButton: true |
|
1599 |
labelImage: (ResourceRetriever ToolbarIconLibrary cutFileIcon) |
|
1600 |
) |
|
1601 |
(MenuItem |
|
1602 |
activeHelpKey: copyFile |
|
1603 |
enabled: hasSelection |
|
1604 |
label: 'Copy' |
|
1605 |
itemValue: copyFiles |
|
1606 |
isButton: true |
|
1607 |
labelImage: (ResourceRetriever ToolbarIconLibrary copyFileIcon) |
|
1608 |
) |
|
1609 |
(MenuItem |
|
1610 |
activeHelpKey: pasteFile |
|
1611 |
enabled: canPaste |
|
1612 |
label: 'Paste' |
|
1613 |
itemValue: pasteFiles |
|
1614 |
isButton: true |
|
1615 |
labelImage: (ResourceRetriever ToolbarIconLibrary pasteFileIcon) |
|
1616 |
) |
|
1617 |
(MenuItem |
|
1618 |
activeHelpKey: deleteFile |
|
1619 |
enabled: hasSelection |
|
1620 |
label: 'Delete' |
|
1621 |
itemValue: deleteFiles |
|
1622 |
isButton: true |
|
1623 |
labelImage: (ResourceRetriever ToolbarIconLibrary deleteFileIcon) |
|
1624 |
) |
|
1625 |
(MenuItem |
|
1626 |
label: '-' |
|
1627 |
) |
|
1628 |
(MenuItem |
|
1629 |
activeHelpKey: editFile |
|
1630 |
label: 'Edit File' |
|
1631 |
itemValue: doShowFileContents |
|
1632 |
isButton: true |
|
1633 |
labelImage: (ResourceRetriever ToolbarIconLibrary editFileIcon) |
|
1634 |
) |
|
1635 |
(MenuItem |
|
1636 |
activeHelpKey: fileIn |
|
1637 |
label: 'File In' |
|
1638 |
itemValue: fileFileIn |
|
1639 |
isButton: true |
|
1640 |
labelImage: (ResourceRetriever ToolbarIconLibrary fileInIcon) |
|
1641 |
) |
|
1642 |
(MenuItem |
|
1643 |
activeHelpKey: openChangeBrowser |
|
1644 |
enabled: hasFileSelection |
|
1645 |
label: 'Changes Browser' |
|
1646 |
itemValue: openChangesBrowser |
|
1647 |
isButton: true |
|
1648 |
labelImage: (ResourceRetriever ToolbarIconLibrary startChangesBrowserIcon) |
|
1649 |
) |
|
1650 |
(MenuItem |
|
1651 |
label: '-' |
|
1652 |
isVisible: false |
|
1653 |
) |
|
1654 |
(MenuItem |
|
1655 |
activeHelpKey: addTerminal |
|
1656 |
label: 'VT100' |
|
1657 |
itemValue: doAddTerminal |
|
1658 |
isButton: true |
|
1659 |
isVisible: false |
|
1660 |
labelImage: (ResourceRetriever ToolbarIconLibrary shellTerminalIcon) |
|
1661 |
) |
|
1662 |
(MenuItem |
|
1663 |
activeHelpKey: make |
|
1664 |
enabled: canMake |
|
1665 |
label: 'Make' |
|
1666 |
itemValue: doMake |
|
1667 |
isButton: true |
|
1668 |
isVisible: false |
|
1669 |
labelImage: (ResourceRetriever ToolbarIconLibrary makeIcon) |
|
1670 |
) |
|
1671 |
(MenuItem |
|
1672 |
activeHelpKey: viewDetails |
|
1673 |
label: 'viewDetails' |
|
1674 |
isButton: true |
|
1675 |
startGroup: right |
|
1676 |
hideMenuOnActivated: false |
|
1677 |
indication: viewDetails |
|
1678 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
1679 |
) |
|
1680 |
(MenuItem |
|
1681 |
activeHelpKey: viewDetails |
|
1682 |
label: 'viewDetails' |
|
1683 |
isButton: true |
|
1684 |
startGroup: right |
|
1685 |
isVisible: false |
|
1686 |
indication: viewDetails |
|
1687 |
submenuChannel: viewDetailsMenuSpec |
|
1688 |
labelImage: (ResourceRetriever ToolbarIconLibrary viewDetailsIcon) |
|
1689 |
) |
|
1690 |
(MenuItem |
|
1691 |
activeHelpKey: selectDetails |
|
1692 |
label: '' |
|
1693 |
isButton: true |
|
1694 |
startGroup: right |
|
1695 |
submenuChannel: viewDetailsMenuSpec |
|
1696 |
labelImage: (ResourceRetriever ToolbarIconLibrary empty1x20Icon) |
|
1697 |
) |
|
1698 |
) |
|
1699 |
nil |
|
1700 |
nil |
|
3892 | 1701 |
) |
1702 |
! ! |
|
1703 |
||
1704 |
!FileBrowserV2 methodsFor:'actions'! |
|
1705 |
||
1706 |
changeFileBrowserTitleTo:aString |
|
1707 |
||
1708 |
|string| |
|
1709 |
||
13919 | 1710 |
string := 'FileBrowser: ', aString. |
3892 | 1711 |
self window label:string. |
1712 |
! |
|
1713 |
||
1714 |
doSpawn |
|
1715 |
||
1716 |
self saveRuntimeAspectValues. |
|
6864 | 1717 |
self class openWithAspects:aspects withExtent:(self builder window extent). |
3892 | 1718 |
! |
1719 |
||
13854 | 1720 |
hideBookmarkBar |
13909 | 1721 |
"hide the bookmarks - called when the button to the left of the toolbar is clicked" |
13854 | 1722 |
|
13909 | 1723 |
self bookmarkBarVisibleHolder value:false |
13854 | 1724 |
|
1725 |
"Created: / 04-04-2012 / 12:08:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1726 |
! |
|
1727 |
||
3892 | 1728 |
hideFilenameEntryField |
1729 |
self filenameEntryFieldVisibleHolder value:false. |
|
1730 |
! |
|
1731 |
||
1732 |
hideToolbar |
|
13909 | 1733 |
"hide the toolbar - called when the button to the left of the toolbar is clicked" |
1734 |
||
3892 | 1735 |
self toolBarVisibleHolder value:false. |
3980 | 1736 |
! |
1737 |
||
13854 | 1738 |
switchToBookmarkEntry: bookmark |
1739 |
||
1740 |
self gotoFile: bookmark path asFilename |
|
1741 |
||
1742 |
"Created: / 20-04-2012 / 18:07:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1743 |
! |
|
1744 |
||
3980 | 1745 |
toggleFileDetailsFor:anItem |
1746 |
|viewDetails| |
|
1747 |
||
1748 |
viewDetails := self viewDetails value not. |
|
1749 |
self viewDetails value:viewDetails. |
|
1750 |
||
1751 |
viewDetails ifTrue:[ |
|
12336 | 1752 |
anItem activeHelpKey:#hideFileDetails. |
1753 |
anItem label:(ToolbarIconLibrary viewNoDetailsIcon). |
|
3980 | 1754 |
] ifFalse:[ |
12336 | 1755 |
anItem activeHelpKey:#showFileDetails. |
1756 |
anItem label:(ToolbarIconLibrary viewDetailsIcon). |
|
3980 | 1757 |
]. |
3892 | 1758 |
! ! |
1759 |
||
1760 |
!FileBrowserV2 methodsFor:'aspects'! |
|
1761 |
||
13854 | 1762 |
bookmarkBarVisibleHolder |
1763 |
"return/create the 'bookmarkBarVisibleHolder' value holder (automatically generated)" |
|
1764 |
||
1765 |
bookmarkBarVisibleHolder isNil ifTrue:[ |
|
1766 |
bookmarkBarVisibleHolder := true asValue. |
|
1767 |
bookmarkBarVisibleHolder addDependent:self. |
|
1768 |
]. |
|
1769 |
^ bookmarkBarVisibleHolder |
|
1770 |
||
1771 |
"Modified: / 10-06-2011 / 23:56:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1772 |
! |
|
1773 |
||
1774 |
bookmarkBarVisibleHolder:something |
|
1775 |
"set the 'bookmarkBarVisibleHolder' value holder (automatically generated)" |
|
1776 |
||
1777 |
|oldValue newValue| |
|
1778 |
||
1779 |
bookmarkBarVisibleHolder notNil ifTrue:[ |
|
1780 |
oldValue := bookmarkBarVisibleHolder value. |
|
1781 |
bookmarkBarVisibleHolder removeDependent:self. |
|
1782 |
]. |
|
1783 |
bookmarkBarVisibleHolder := something. |
|
1784 |
bookmarkBarVisibleHolder notNil ifTrue:[ |
|
1785 |
bookmarkBarVisibleHolder addDependent:self. |
|
1786 |
]. |
|
1787 |
newValue := bookmarkBarVisibleHolder value. |
|
1788 |
oldValue ~~ newValue ifTrue:[ |
|
1789 |
self update:#value with:newValue from:bookmarkBarVisibleHolder. |
|
1790 |
]. |
|
1791 |
! |
|
1792 |
||
1793 |
bookmarkHolder |
|
1794 |
"return/create the 'bookmarkHolder' value holder (automatically generated)" |
|
1795 |
||
1796 |
bookmarkHolder isNil ifTrue:[ |
|
1797 |
bookmarkHolder := ValueHolder new. |
|
1798 |
]. |
|
1799 |
^ bookmarkHolder |
|
1800 |
! |
|
1801 |
||
1802 |
bookmarkListHolder |
|
1803 |
||
1804 |
^BookmarkList forFileBrowser |
|
1805 |
||
1806 |
"Created: / 08-06-2011 / 12:16:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1807 |
! |
|
1808 |
||
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1809 |
busyLabelHolder |
12336 | 1810 |
^ self |
1811 |
aspectFor:#busyLabelHolder |
|
1812 |
ifAbsent:[ ' ' asValue ]. |
|
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1813 |
|
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1814 |
"Created: / 25-07-2006 / 09:06:00 / cg" |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1815 |
! |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1816 |
|
8010
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1817 |
canAddToClassPath |
12336 | 1818 |
^ [ |
1819 |
|f| |
|
8010
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1820 |
|
12336 | 1821 |
(Java isNil or:[Java isLoaded not]) ifTrue:[ |
1822 |
false |
|
1823 |
] ifFalse:[ |
|
1824 |
f := self currentFileNameHolder value. |
|
1825 |
f size == 1 |
|
1826 |
and:[ f:= f first. (Java classPath includes:f pathName not) |
|
1827 |
and:[f isDirectory |
|
1828 |
or:[(f hasSuffix:'jar') |
|
1829 |
or:[(f hasSuffix:'zip')]]]] |
|
1830 |
] |
|
8010
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1831 |
] |
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1832 |
! |
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1833 |
|
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1834 |
canAddToSourcePath |
12336 | 1835 |
^ [ |
1836 |
|f| |
|
8010
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1837 |
|
12336 | 1838 |
(Java isNil or:[Java isLoaded not]) ifTrue:[ |
1839 |
false |
|
1840 |
] ifFalse:[ |
|
1841 |
f := self currentFileNameHolder value. |
|
1842 |
f size == 1 |
|
1843 |
and:[ f:= f first. (Java sourcePath isNil |
|
1844 |
or:[(Java sourcePath includes:f pathName) not]) |
|
1845 |
and:[f isDirectory |
|
1846 |
or:[(f hasSuffix:'jar') |
|
1847 |
or:[(f hasSuffix:'zip')]]]]. |
|
1848 |
] |
|
8010
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1849 |
] |
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1850 |
! |
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1851 |
|
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1852 |
canRemoveFromClassPath |
12336 | 1853 |
^ [ |
1854 |
|f| |
|
8010
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1855 |
|
12336 | 1856 |
(Java isNil or:[Java isLoaded not]) ifTrue:[ |
1857 |
false |
|
1858 |
] ifFalse:[ |
|
1859 |
f := self currentFileNameHolder value. |
|
1860 |
f size == 1 |
|
1861 |
and:[f:= f first. (Java classPath includes:f pathName) |
|
1862 |
and:[f isDirectory |
|
1863 |
or:[(f hasSuffix:'jar') |
|
1864 |
or:[(f hasSuffix:'zip')]]]] |
|
1865 |
] |
|
8010
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1866 |
] |
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1867 |
! |
a4dfc3167ae2
Add missing aspect methods (canAddToClassPath etc.)
Stefan Vogel <sv@exept.de>
parents:
7855
diff
changeset
|
1868 |
|
13854 | 1869 |
currentDirectoryDisplayed |
1870 |
"Return a directory that is currently displayed in the browser" |
|
1871 |
||
13933 | 1872 |
^(self builder componentAt: #DirectoryContentsBrowser) application currentDirectoryDisplayed |
13854 | 1873 |
|
13933 | 1874 |
"Modified: / 13-02-2014 / 16:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
13854 | 1875 |
! |
1876 |
||
5120 | 1877 |
cursorColLabelHolder |
12336 | 1878 |
^ self |
1879 |
aspectFor:#cursorColLabelHolder |
|
1880 |
ifAbsent:[ |
|
1881 |
self |
|
1882 |
applicationNamed:#FileApplicationNoteBook |
|
1883 |
ifPresentDo:[:appl | appl cursorColLabelHolder]. |
|
1884 |
] |
|
5120 | 1885 |
! |
1886 |
||
1887 |
cursorLineLabelHolder |
|
12336 | 1888 |
^ self |
1889 |
aspectFor:#cursorLineLabelHolder |
|
1890 |
ifAbsent:[ |
|
1891 |
self |
|
1892 |
applicationNamed:#FileApplicationNoteBook |
|
1893 |
ifPresentDo:[:appl | appl cursorLineLabelHolder]. |
|
1894 |
] |
|
5120 | 1895 |
! |
1896 |
||
6334 | 1897 |
fileEncodingLockImageHolder |
12336 | 1898 |
^ self |
1899 |
aspectFor:#fileEncodingLockImageHolder |
|
1900 |
ifAbsent:[ |
|
1901 |
BlockValue |
|
1902 |
with:[:m | m == true ifTrue:[self class encodingLockIcon] ifFalse:[nil] ] |
|
1903 |
argument:(self lockFileEncodingHolder) |
|
1904 |
] |
|
7727 | 1905 |
|
1906 |
"Modified: / 08-03-2007 / 22:59:12 / cg" |
|
6334 | 1907 |
! |
1908 |
||
3892 | 1909 |
fileEntryFieldHolder |
1910 |
||
1911 |
fileEntryFieldHolder isNil ifTrue:[ |
|
12336 | 1912 |
fileEntryFieldHolder := ValueHolder new. |
1913 |
fileEntryFieldHolder addDependent:self. |
|
3892 | 1914 |
]. |
1915 |
^ fileEntryFieldHolder. |
|
4647 | 1916 |
! |
1917 |
||
1918 |
listOfDeviceDrives |
|
1919 |
||
1920 |
listOfDeviceDrives isNil ifTrue:[ |
|
12336 | 1921 |
listOfDeviceDrives := Filename volumes. |
4647 | 1922 |
]. |
1923 |
^ listOfDeviceDrives |
|
1924 |
! |
|
1925 |
||
5120 | 1926 |
modeLabelHolder |
12336 | 1927 |
^ self |
1928 |
aspectFor:#modeLabelHolder |
|
1929 |
ifAbsent:[ |
|
1930 |
self |
|
1931 |
applicationNamed:#FileApplicationNoteBook |
|
1932 |
ifPresentDo:[:appl | appl modeLabelHolder]. |
|
1933 |
] |
|
5120 | 1934 |
! |
1935 |
||
7102 | 1936 |
modeLabelMenuHolder |
12336 | 1937 |
^ self |
1938 |
applicationNamed:#FileApplicationNoteBook |
|
1939 |
ifPresentDo:[:appl | appl modeLabelMenu]. |
|
7102 | 1940 |
|
1941 |
"Created: / 11-09-2006 / 12:26:44 / cg" |
|
1942 |
! |
|
1943 |
||
4647 | 1944 |
selectedDeviceDrive |
1945 |
||
1946 |
selectedDeviceDrive isNil ifTrue:[ |
|
12336 | 1947 |
selectedDeviceDrive := self listOfDeviceDrives first asValue. |
1948 |
selectedDeviceDrive addDependent:self. |
|
4647 | 1949 |
]. |
1950 |
^ selectedDeviceDrive |
|
3892 | 1951 |
! ! |
1952 |
||
4252 | 1953 |
!FileBrowserV2 methodsFor:'aspects-visibility'! |
1954 |
||
6834
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1955 |
busyLabelVisibleHolder |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1956 |
^ self aspectFor:#busyLabelVisibleHolder ifAbsent:[false asValue] |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1957 |
|
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1958 |
"Created: / 25-07-2006 / 09:06:22 / cg" |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1959 |
! |
f42cab67e211
preparations for busy indicator
Claus Gittinger <cg@exept.de>
parents:
6827
diff
changeset
|
1960 |
|
5120 | 1961 |
driveSelectorVisible |
1962 |
^ self systemIsDOS |
|
1963 |
! |
|
1964 |
||
4252 | 1965 |
filenameEntryFieldVisibleHolder |
1966 |
" aspect for show FileEntryField " |
|
1967 |
||
1968 |
^ self aspectFor:#filenameEntryFieldVisibleHolder ifAbsent:[true asValue] |
|
1969 |
! |
|
1970 |
||
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1971 |
infoBarVisibleHolder |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1972 |
" aspect for show infoBar " |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1973 |
|
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1974 |
^ self aspectFor:#infoBarVisibleHolder ifAbsent:[true asValue] |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1975 |
! |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
1976 |
|
4252 | 1977 |
previewVisibleHolder |
1978 |
" aspect for show preview" |
|
1979 |
||
1980 |
^ self aspectFor:#previewVisibleHolder ifAbsent:[false asValue] |
|
1981 |
! |
|
1982 |
||
1983 |
toolBarVisibleHolder |
|
1984 |
" aspect for show toolbar" |
|
1985 |
||
1986 |
^ self aspectFor:#toolBarVisibleHolder ifAbsent:[true asValue] |
|
1987 |
! ! |
|
1988 |
||
3892 | 1989 |
!FileBrowserV2 methodsFor:'change & update'! |
1990 |
||
4011 | 1991 |
currentFileNameHolderChanged |
12728 | 1992 |
|newEntryValue nSelected files volume dir| |
4011 | 1993 |
|
7561 | 1994 |
files := self currentSelectedObjects. |
4252 | 1995 |
nSelected := files size. |
4011 | 1996 |
|
4252 | 1997 |
nSelected == 0 ifTrue:[ |
12728 | 1998 |
newEntryValue := ''. |
4011 | 1999 |
] ifFalse:[ |
12728 | 2000 |
nSelected == 1 ifTrue:[ |
2001 |
newEntryValue := files first. |
|
2002 |
] ifFalse:[ |
|
2003 |
newEntryValue := self commonPrefixOfSelectedFiles. |
|
2004 |
]. |
|
4011 | 2005 |
]. |
4390
e9e2343d5569
no expand on change filename holder for entry field anymore
penk
parents:
4380
diff
changeset
|
2006 |
self fileEntryFieldHolder value:(newEntryValue asString) withoutNotifying:self. |
4775 | 2007 |
|
5187
ce7e3132b012
supportsVolumes instead of OperatingSystem isWindowsLike for volume widget
james
parents:
5185
diff
changeset
|
2008 |
OperatingSystem supportsVolumes ifTrue:[ |
12728 | 2009 |
volume := (nSelected >= 1) |
2010 |
ifTrue:[files first volume] |
|
2011 |
ifFalse:[nil]. |
|
2012 |
self selectedDeviceDrive value:volume. |
|
5187
ce7e3132b012
supportsVolumes instead of OperatingSystem isWindowsLike for volume widget
james
parents:
5185
diff
changeset
|
2013 |
]. |
4252 | 2014 |
self updatePreview. |
7561 | 2015 |
|
7855
d8c06d41b20b
show the current directory in the label
Claus Gittinger <cg@exept.de>
parents:
7842
diff
changeset
|
2016 |
nSelected == 1 ifTrue:[ |
12728 | 2017 |
(dir := self currentDirectory) notNil ifTrue:[ |
13919 | 2018 |
self changeFileBrowserTitleTo:(dir baseName) |
12728 | 2019 |
] |
7855
d8c06d41b20b
show the current directory in the label
Claus Gittinger <cg@exept.de>
parents:
7842
diff
changeset
|
2020 |
]. |
13854 | 2021 |
self updateBookmark |
7855
d8c06d41b20b
show the current directory in the label
Claus Gittinger <cg@exept.de>
parents:
7842
diff
changeset
|
2022 |
|
10183
c4ce7324eb06
changed: #currentFileNameHolderChanged
Claus Gittinger <cg@exept.de>
parents:
9944
diff
changeset
|
2023 |
"Modified: / 06-07-2011 / 09:41:50 / cg" |
13854 | 2024 |
"Modified: / 05-02-2014 / 11:45:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4011 | 2025 |
! |
2026 |
||
2027 |
fileEntryFieldHolderChanged |
|
13026 | 2028 |
|fileName fileNameString dir| |
4011 | 2029 |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
2030 |
fileNameString := fileEntryFieldHolder value withoutSeparators. |
12336 | 2031 |
fileNameString isEmpty ifTrue:[ |
13026 | 2032 |
pathEntryField flash. |
2033 |
^ self |
|
5281 | 2034 |
]. |
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
2035 |
|
13026 | 2036 |
fileName := fileNameString asFilename. |
2037 |
fileName exists ifFalse:[ |
|
2038 |
pathEntryField flash. |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
2039 |
|
13026 | 2040 |
dir := fileName directory. |
2041 |
dir exists ifTrue:[ |
|
2042 |
self currentFileNameHolder |
|
2043 |
value:(OrderedCollection with:dir) |
|
2044 |
withoutNotifying:self. |
|
2045 |
]. |
|
2046 |
fileName baseName includesMatchCharacters ifTrue:[ |
|
2047 |
self fileEntryFieldHolder value:(fileName directoryName) withoutNotifying:self. |
|
2048 |
self filterModel value:fileName baseName. |
|
2049 |
]. |
|
5185
c1768b26d5f4
set fileName-entryField and pattern, if a name with matchPattern
Claus Gittinger <cg@exept.de>
parents:
5162
diff
changeset
|
2050 |
|
12336 | 2051 |
"/ answer := OptionBox |
4531 | 2052 |
"/ request:(resources string:'No file or directory named "%1" exists.\\Create ?' with:fileNameString allBold) withCRs |
2053 |
"/ buttonLabels:#('Create as File' 'Create as Directory' 'Cancel') |
|
2054 |
"/ values:#(createFile createDirectory nil) |
|
2055 |
"/ default:nil. |
|
2056 |
"/ |
|
13026 | 2057 |
"/ answer isNil ifTrue:[ |
2058 |
"/ ^ self. |
|
2059 |
"/ ]. |
|
2060 |
"/ |
|
2061 |
"/ [ |
|
2062 |
"/ answer == #createFile ifTrue:[ |
|
2063 |
"/ fileName directory recursiveMakeDirectory. |
|
2064 |
"/ fileName createAsEmptyFile. |
|
2065 |
"/ ] ifFalse:[ |
|
2066 |
"/ answer == #createDirectory ifTrue:[ |
|
2067 |
"/ fileName recursiveMakeDirectory. |
|
2068 |
"/ ] |
|
2069 |
"/ ]. |
|
2070 |
"/ ] on:OperatingSystem accessDeniedErrorSignal do:[:ex | |
|
2071 |
"/ Dialog warn:'Error: ' , ex description. |
|
2072 |
"/ ]. |
|
2073 |
^ self |
|
4507
7aeed604c4db
added createFile/directory option from entryField
Claus Gittinger <cg@exept.de>
parents:
4454
diff
changeset
|
2074 |
]. |
5959 | 2075 |
self setCurrentFileName:fileName. |
4011 | 2076 |
! |
2077 |
||
4647 | 2078 |
selectedDeviceDriveChanged |
2079 |
| newDrive curSel newFile| |
|
2080 |
||
2081 |
newDrive := self selectedDeviceDrive value. |
|
7561 | 2082 |
curSel := self currentSelectedObjects. |
7842 | 2083 |
curSel notEmptyOrNil ifTrue:[ |
12336 | 2084 |
curSel first volume = newDrive ifTrue:[ ^self]. |
4647 | 2085 |
]. |
6591 | 2086 |
|
5411
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
2087 |
newDrive notNil ifTrue:[ |
12336 | 2088 |
newFile := newDrive asFilename. |
5411
198e8a5c3700
bugfix WIN: check whether newDrive isNil in #selectedDeviceDriveChanged
ca
parents:
5400
diff
changeset
|
2089 |
|
12336 | 2090 |
newFile isReadable ifTrue:[ |
2091 |
self gotoFile:newFile. |
|
2092 |
^self. |
|
2093 |
]. |
|
4651 | 2094 |
]. |
12336 | 2095 |
self selectedDeviceDrive |
2096 |
value:(curSel notEmptyOrNil |
|
2097 |
ifTrue:[curSel first volume] |
|
2098 |
ifFalse:['C:']). |
|
7561 | 2099 |
|
7842 | 2100 |
"Modified: / 18-09-2007 / 09:41:30 / cg" |
4647 | 2101 |
! |
2102 |
||
4252 | 2103 |
selectedImage |
2104 |
|files selectedFile mime img| |
|
2105 |
||
4451
6f06f760a64b
only open preview for selected files not for directories
penk
parents:
4390
diff
changeset
|
2106 |
files := self currentSelectedFiles. |
4259 | 2107 |
files size >= 1 ifFalse:[ |
12336 | 2108 |
^ nil |
4252 | 2109 |
]. |
12336 | 2110 |
selectedFile := files last. |
4252 | 2111 |
|
2112 |
mime := MIMETypes mimeTypeForFilename:selectedFile. |
|
2113 |
(mime notNil and:[mime startsWith:'image/']) ifTrue:[ |
|
12336 | 2114 |
img := Image fromFile:selectedFile. |
2115 |
^ img |
|
4252 | 2116 |
]. |
2117 |
||
2118 |
^ nil. |
|
2119 |
! |
|
2120 |
||
4262 | 2121 |
showImagePreview:image |
4252 | 2122 |
|imgView| |
2123 |
||
4262 | 2124 |
imgView := builder componentAt:#Preview. |
11844
e8bed7c810d6
changed: #showImagePreview:
Claus Gittinger <cg@exept.de>
parents:
11782
diff
changeset
|
2125 |
(imgView isNil or:[imgView scrolledView isNil]) ifTrue:[^ self]. |
4252 | 2126 |
imgView adjust:#fitBig. |
2127 |
imgView image:image. |
|
7614 | 2128 |
|
2129 |
"Modified: / 05-02-2007 / 10:52:03 / cg" |
|
4252 | 2130 |
! |
2131 |
||
4262 | 2132 |
showPreview |
2133 |
|shownImage lbl previewLabel| |
|
2134 |
||
2135 |
shownImage := self selectedImage. |
|
4300 | 2136 |
lbl := shownImage isNil ifTrue:'Preview' ifFalse:[ shownImage fileName asFilename baseName ]. |
4262 | 2137 |
|
2138 |
previewLabel := builder componentAt:#PreviewLabel. |
|
12336 | 2139 |
previewLabel label:lbl; forceResizeHorizontally. |
2140 |
self enqueueMessage:#'showImagePreview:' for:self arguments:(Array with:shownImage). |
|
4262 | 2141 |
! |
2142 |
||
3892 | 2143 |
update:something with:aParameter from:changedObject |
4647 | 2144 |
changedObject == self selectedDeviceDrive ifTrue:[ |
13908 | 2145 |
self selectedDeviceDriveChanged. |
2146 |
^ self. |
|
4647 | 2147 |
]. |
3892 | 2148 |
changedObject == self fileEntryFieldHolder ifTrue:[ |
13908 | 2149 |
self fileEntryFieldHolderChanged. |
2150 |
^ self. |
|
3892 | 2151 |
]. |
2152 |
changedObject == self currentFileNameHolder ifTrue:[ |
|
13908 | 2153 |
super update:something with:aParameter from:changedObject. |
2154 |
self currentFileNameHolderChanged. |
|
2155 |
^ self. |
|
3892 | 2156 |
]. |
4252 | 2157 |
(changedObject == self previewVisibleHolder) ifTrue:[ |
13908 | 2158 |
self updatePreview. |
2159 |
^ self. |
|
4252 | 2160 |
]. |
12336 | 2161 |
(changedObject == self toolBarVisibleHolder |
13908 | 2162 |
or:[changedObject == self bookmarkBarVisibleHolder |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2163 |
or:[changedObject == self filenameEntryFieldVisibleHolder |
13908 | 2164 |
or:[changedObject == self infoBarVisibleHolder]]]) ifTrue:[ |
2165 |
self updateToolVisibility. |
|
2166 |
^ self. |
|
3892 | 2167 |
]. |
4085
9e58ddfa6969
sort will be triggered from the FileBrowserV2 instance not from AbstractFileBrowser anymore
penk
parents:
4084
diff
changeset
|
2168 |
(changedObject == self sortBlockProperty or:[changedObject == self sortDirectoriesBeforeFiles]) ifTrue:[ |
13908 | 2169 |
self sortFileListsBy:(self sortBlockProperty value) withReverse:false. |
2170 |
^ self. |
|
12336 | 2171 |
]. |
3892 | 2172 |
|
2173 |
^ 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
|
2174 |
|
d8c06d41b20b
show the current directory in the label
Claus Gittinger <cg@exept.de>
parents:
7842
diff
changeset
|
2175 |
"Modified: / 01-10-2007 / 19:21:35 / cg" |
3892 | 2176 |
! |
2177 |
||
13854 | 2178 |
updateBookmark |
2179 |
||
2180 |
| file bookmark | |
|
2181 |
file := fileEntryFieldHolder value. |
|
2182 |
file notEmptyOrNil ifTrue:[ |
|
2183 |
bookmark := Bookmark forFile: file. |
|
2184 |
]. |
|
2185 |
self bookmarkHolder value: bookmark. |
|
2186 |
||
2187 |
"Created: / 13-04-2012 / 12:37:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2188 |
! |
|
2189 |
||
4252 | 2190 |
updatePreview |
6524 | 2191 |
|previewLabel shownImage plug closePreviewButton| |
4252 | 2192 |
|
2193 |
self previewVisibleHolder value ifTrue:[ |
|
12336 | 2194 |
shownImage := nil. |
2195 |
imgView := builder componentAt:#Preview. |
|
2196 |
previewLabel := builder componentAt:#PreviewLabel. |
|
2197 |
closePreviewButton := builder componentAt:#ClosePreviewButton. |
|
6524 | 2198 |
|
12336 | 2199 |
plug := Plug new. |
2200 |
plug respondTo:#closePreview with:[ self previewVisibleHolder value:false ]. |
|
4257 | 2201 |
|
12336 | 2202 |
previewLabel menuHolder:(self class previewLabelMenu decodeAsLiteralArray). |
2203 |
previewLabel menuPerformer:plug asValue. |
|
4257 | 2204 |
|
12336 | 2205 |
closePreviewButton action:[ self previewVisibleHolder value:false ]. |
6524 | 2206 |
|
12336 | 2207 |
previewProcess notNil ifTrue:[ |
2208 |
previewProcess terminate |
|
2209 |
]. |
|
2210 |
previewProcess := [ |
|
2211 |
|imgView oldBg shownImage lbl| |
|
4252 | 2212 |
|
12336 | 2213 |
oldBg := previewLabel backgroundColor. |
2214 |
previewLabel backgroundColor:(Color red lightened lightened). |
|
2215 |
[ |
|
2216 |
self showPreview. |
|
2217 |
previewProcess := nil. |
|
2218 |
] ensure:[ |
|
2219 |
previewLabel backgroundColor:oldBg. |
|
2220 |
]. |
|
2221 |
] forkAt:7. |
|
4252 | 2222 |
] ifFalse:[ |
12336 | 2223 |
imgView notNil ifTrue:[ |
2224 |
imgView image:nil. |
|
2225 |
] |
|
4252 | 2226 |
]. |
2227 |
! |
|
2228 |
||
3892 | 2229 |
updateToolVisibility |
13854 | 2230 |
|bldr toolBar bookmarkBar infoBar filenameEntryField vPanel topOffset bottomOffset |
2231 |
toolBarVisible bookmarkBarVisible filenameEntryFieldVisible infoBarVisible d| |
|
3892 | 2232 |
|
13854 | 2233 |
bldr := self builder. |
3892 | 2234 |
|
2235 |
topOffset := 0. |
|
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2236 |
bottomOffset := 0. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2237 |
|
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2238 |
toolBarVisible := self toolBarVisibleHolder value. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2239 |
toolBarVisible ifTrue:[ |
13854 | 2240 |
toolBar := bldr componentAt:#ToolbarBox. |
12728 | 2241 |
topOffset := topOffset + toolBar height. |
3892 | 2242 |
]. |
2243 |
||
13854 | 2244 |
bookmarkBarVisible := self bookmarkBarVisibleHolder value. |
2245 |
bookmarkBarVisible ifTrue:[ |
|
13908 | 2246 |
bookmarkBar := bldr componentAt:#BookmarkBar. |
2247 |
d := bookmarkBar height. "/ layout bottomOffset - bookmarkBar layout topOffset. |
|
2248 |
bookmarkBar layout topOffset:topOffset bottomOffset:topOffset + d. |
|
2249 |
"/ that's the consequence of modifying the layout, instead of sending #layout: |
|
2250 |
"/ we have to tell the component that it changed here!! |
|
2251 |
bookmarkBar layoutChanged. |
|
2252 |
topOffset := topOffset + d |
|
13854 | 2253 |
]. |
2254 |
||
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2255 |
filenameEntryFieldVisible := self filenameEntryFieldVisibleHolder value. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2256 |
filenameEntryFieldVisible ifTrue:[ |
13854 | 2257 |
filenameEntryField := bldr componentAt:#FilenameEntryFieldBox. |
12728 | 2258 |
d := filenameEntryField layout bottomOffset - filenameEntryField layout topOffset. |
2259 |
filenameEntryField layout topOffset:topOffset bottomOffset:topOffset + d. |
|
13908 | 2260 |
"/ that's the consequence of modifying the layout, instead of sending #layout: |
2261 |
"/ we have to tell the component that it changed here!! |
|
2262 |
filenameEntryField layoutChanged. |
|
12728 | 2263 |
topOffset := topOffset + filenameEntryField height. |
3892 | 2264 |
]. |
2265 |
||
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2266 |
infoBarVisible := self infoBarVisibleHolder value. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2267 |
infoBarVisible ifTrue:[ |
13854 | 2268 |
infoBar := bldr componentAt:#InfoBox. |
12728 | 2269 |
bottomOffset := bottomOffset - infoBar height. |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2270 |
]. |
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2271 |
|
13854 | 2272 |
vPanel := bldr componentAt:#BrowserBox. |
2273 |
vPanel layout topOffset:topOffset+1. |
|
2274 |
vPanel layout bottomOffset:bottomOffset-1. |
|
3892 | 2275 |
vPanel container notNil ifTrue:[ |
12728 | 2276 |
vPanel containerChangedSize. |
3892 | 2277 |
]. |
13854 | 2278 |
|
2279 |
"Modified: / 03-04-2012 / 22:23:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3892 | 2280 |
! ! |
2281 |
||
3957 | 2282 |
!FileBrowserV2 methodsFor:'event handling'! |
2283 |
||
4904 | 2284 |
crPressedInPathField |
2285 |
|path fn| |
|
2286 |
||
2287 |
path := fileEntryFieldHolder value. |
|
2288 |
fn := path asFilename. |
|
2289 |
(fn exists and:[ fn isDirectory not ]) ifTrue:[ |
|
12336 | 2290 |
self openApplForFile:path. |
4904 | 2291 |
] |
2292 |
! |
|
2293 |
||
3957 | 2294 |
processEvent:anEvent |
2295 |
"filter keyboard events. |
|
2296 |
Return true, if I have eaten the event" |
|
2297 |
||
12116 | 2298 |
<resource: #keyboard (#Return )> |
2299 |
||
3957 | 2300 |
|focusView key rawKey fileName| |
2301 |
||
2302 |
anEvent isKeyPressEvent ifTrue:[ |
|
13681 | 2303 |
focusView := anEvent targetView. |
2304 |
key := anEvent key. |
|
2305 |
rawKey := anEvent rawKey. |
|
3957 | 2306 |
|
13681 | 2307 |
(focusView isSameOrComponentOf:self window) ifTrue:[ |
3957 | 2308 |
|
13681 | 2309 |
(focusView == pathEntryField) ifFalse:[ ^ false]. |
3957 | 2310 |
|
13681 | 2311 |
(key == #Return) ifTrue:[ |
2312 |
fileName := pathEntryField list first asFilename. |
|
2313 |
(fileName exists and:[fileName isDirectory not]) ifTrue:[ |
|
2314 |
self openApplForFile:fileName |
|
2315 |
]. |
|
2316 |
]. |
|
2317 |
] |
|
3957 | 2318 |
]. |
7798 | 2319 |
|
2320 |
(anEvent isButtonPressEvent or:[anEvent isButtonMultiPressEvent]) ifTrue:[ |
|
13681 | 2321 |
self |
2322 |
applicationNamed:#FileApplicationNoteBook |
|
2323 |
ifPresentDo:[:appl | |
|
2324 |
|subApp editor eventView viewsName| |
|
7798 | 2325 |
|
13681 | 2326 |
subApp := appl selectedApplication. |
2327 |
subApp notNil ifTrue:[ |
|
2328 |
eventView := anEvent view. |
|
2329 |
viewsName := eventView name. |
|
7595
171c7e762935
gotoLine on double-click line-nr-label
Claus Gittinger <cg@exept.de>
parents:
7561
diff
changeset
|
2330 |
|
13681 | 2331 |
anEvent isButtonMultiPressEvent ifTrue:[ |
2332 |
viewsName = 'LineLabel' ifTrue:[ |
|
2333 |
editor := subApp perform:#editView ifNotUnderstood:nil. |
|
2334 |
editor notNil ifTrue:[ |
|
2335 |
editor gotoLine |
|
2336 |
]. |
|
2337 |
]. |
|
2338 |
viewsName = 'ModeLabel' ifTrue:[ |
|
2339 |
eventView activateMenu |
|
2340 |
]. |
|
2341 |
viewsName = 'EncodingLabel' ifTrue:[ |
|
2342 |
eventView activateMenu |
|
2343 |
]. |
|
2344 |
] ifFalse:[ |
|
2345 |
anEvent button == 2 ifTrue:[ |
|
2346 |
eventView name = 'LineLabel' ifTrue:[ |
|
2347 |
subApp editView gotoLine |
|
2348 |
]. |
|
2349 |
]. |
|
2350 |
]. |
|
2351 |
]. |
|
2352 |
]. |
|
7595
171c7e762935
gotoLine on double-click line-nr-label
Claus Gittinger <cg@exept.de>
parents:
7561
diff
changeset
|
2353 |
]. |
171c7e762935
gotoLine on double-click line-nr-label
Claus Gittinger <cg@exept.de>
parents:
7561
diff
changeset
|
2354 |
|
3957 | 2355 |
^ false |
7798 | 2356 |
|
2357 |
"Modified: / 17-05-2007 / 09:12:53 / cg" |
|
3957 | 2358 |
! ! |
2359 |
||
6131 | 2360 |
!FileBrowserV2 methodsFor:'menu accessing'! |
2361 |
||
2362 |
menuFileHistory |
|
14134 | 2363 |
"initialize the file history menu" |
2364 |
||
6131 | 2365 |
<resource: #programMenu > |
2366 |
||
2367 |
|menu hist text removeItem removeCol| |
|
2368 |
||
14134 | 2369 |
menu := Menu new receiver:self. |
6131 | 2370 |
|
2371 |
hist := self fileHistory. |
|
2372 |
hist isEmpty ifTrue:[^ nil]. |
|
2373 |
||
2374 |
removeCol := OrderedCollection new. |
|
2375 |
hist do:[:aFileItem| |
|
12961 | 2376 |
"aFileItem fileName exists" true ifTrue:[ |
2377 |
menu addItem:(MenuItem |
|
2378 |
label: aFileItem fileName asString |
|
14603 | 2379 |
itemValue: |
2380 |
[ |
|
2381 |
self setCurrentFileName:(aFileItem fileName). |
|
2382 |
self openApplByFileItem:aFileItem |
|
2383 |
] |
|
2384 |
translateLabel:false). |
|
12961 | 2385 |
] ifFalse:[ |
2386 |
removeCol add:aFileItem. |
|
2387 |
] |
|
6131 | 2388 |
]. |
2389 |
"/ remove all not existing history entries |
|
2390 |
removeCol do:[ : el | |
|
12961 | 2391 |
hist remove:el. |
6131 | 2392 |
]. |
2393 |
removeItem := MenuItem new. |
|
2394 |
text := resources string:'Clear History'. |
|
2395 |
"/ text := LabelAndIcon icon:(self class clearHistoryIcon) string:text. |
|
2396 |
removeItem label:text. |
|
12336 | 2397 |
removeItem |
12961 | 2398 |
itemValue:[ |
2399 |
self fileHistory removeAll. |
|
2400 |
self enableFileHistory value:false. |
|
2401 |
]. |
|
6131 | 2402 |
menu addSeparator. |
2403 |
menu addItem:removeItem. |
|
2404 |
^ menu |
|
11782 | 2405 |
|
2406 |
"Modified: / 09-09-2012 / 13:08:42 / cg" |
|
6131 | 2407 |
! ! |
2408 |
||
6460 | 2409 |
!FileBrowserV2 methodsFor:'queries'! |
2410 |
||
12670 | 2411 |
defaultWindowExtent |
2412 |
"use nearly the full screen height, but at least 768px if available. |
|
2413 |
Keep the width as defined in the windowSpec" |
|
2414 |
||
12728 | 2415 |
|w maxHeight| |
12670 | 2416 |
|
12728 | 2417 |
w := self window. |
2418 |
maxHeight := w device usableHeightAt:w origin. |
|
2419 |
^ Point x:nil y:(((maxHeight - 200) max:w extent y) min:maxHeight). |
|
12670 | 2420 |
! |
2421 |
||
6460 | 2422 |
getAllFilesAsStrings |
2423 |
^ self directoryContentsBrowser getAllFilesAsStrings |
|
2424 |
! ! |
|
2425 |
||
3892 | 2426 |
!FileBrowserV2 methodsFor:'startup & release'! |
2427 |
||
3954 | 2428 |
closeRequest |
6631 | 2429 |
"asks for permission before closing" |
2430 |
||
12336 | 2431 |
self |
2432 |
applicationNamed:#FileApplicationNoteBook |
|
2433 |
ifPresentDo:[:appl | appl tryCloseApplications ifFalse:[^ self] ]. |
|
5010 | 2434 |
|
6631 | 2435 |
super closeRequest. |
3954 | 2436 |
! |
2437 |
||
3892 | 2438 |
hideFilenameEntryFieldButtonCreated:aButton |
2439 |
||
12336 | 2440 |
aButton passiveLevel:(MenuPanel defaultLevel). |
3892 | 2441 |
aButton activeLevel:-1. |
2442 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor). |
|
2443 |
! |
|
2444 |
||
2445 |
hideToolBarButtonCreated:aButton |
|
2446 |
||
12336 | 2447 |
aButton passiveLevel:(MenuPanel defaultLevel). |
3892 | 2448 |
aButton activeLevel:-1. |
2449 |
aButton backgroundColor:(MenuPanel defaultBackgroundColor). |
|
2450 |
! |
|
2451 |
||
2452 |
initialize |
|
2453 |
||
2454 |
self masterApplication:nil. |
|
6370 | 2455 |
self directoryHistory resetForwardBackward. |
3892 | 2456 |
! |
2457 |
||
2458 |
makeDependent |
|
4008 | 2459 |
|
4004 | 2460 |
super makeDependent. |
4085
9e58ddfa6969
sort will be triggered from the FileBrowserV2 instance not from AbstractFileBrowser anymore
penk
parents:
4084
diff
changeset
|
2461 |
self sortBlockProperty addDependent:self. |
3892 | 2462 |
self filenameEntryFieldVisibleHolder addDependent:self. |
2463 |
self toolBarVisibleHolder addDependent:self. |
|
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2464 |
self infoBarVisibleHolder addDependent:self. |
4255 | 2465 |
self previewVisibleHolder addDependent:self. |
3892 | 2466 |
! |
2467 |
||
8254 | 2468 |
onDirectory:aDirectoryPathOrNil |
8188 | 2469 |
|files| |
2470 |
||
2471 |
self createBuilder. |
|
8254 | 2472 |
aDirectoryPathOrNil notNil ifTrue:[ |
12336 | 2473 |
aDirectoryPathOrNil isCollection ifTrue:[ |
2474 |
files := aDirectoryPathOrNil |
|
2475 |
] ifFalse:[ |
|
2476 |
files := Array with:aDirectoryPathOrNil. |
|
2477 |
]. |
|
2478 |
self currentFileNameHolder value:files. |
|
8188 | 2479 |
]. |
2480 |
! |
|
2481 |
||
2482 |
openOnDirectory:aDirectoryPath |
|
2483 |
self onDirectory:aDirectoryPath. |
|
2484 |
self open |
|
2485 |
! |
|
2486 |
||
2487 |
openOnFileNamed:aFilename editing:editing |
|
2488 |
"start a new FileBrowserV2 on a aFilename; |
|
2489 |
If editing is true, the browser opens the document as text to be edited; |
|
2490 |
if false, it looks for an appropriate viewer and uses that if one is found." |
|
2491 |
||
2492 |
|f| |
|
2493 |
||
2494 |
f := aFilename asFilename asAbsoluteFilename. |
|
2495 |
f isDirectory ifTrue:[ |
|
12336 | 2496 |
self onDirectory:aFilename. |
2497 |
self open. |
|
2498 |
^ self. |
|
8188 | 2499 |
]. |
2500 |
||
2501 |
self onDirectory:(f directory). |
|
2502 |
self currentFileNameHolder setValue:(Array with:f). |
|
2503 |
self open. |
|
9886 | 2504 |
self enqueueDelayedAction:[ |
12336 | 2505 |
editing ifTrue:[ |
2506 |
self openTextEditorForFile:f. |
|
2507 |
] ifFalse:[ |
|
2508 |
self openApplForFile:f. |
|
2509 |
]. |
|
8188 | 2510 |
]. |
2511 |
||
2512 |
" |
|
2513 |
FileBrowserV2 openOnFileNamed:'Makefile' |
|
2514 |
" |
|
2515 |
! |
|
2516 |
||
4884 | 2517 |
postBuildDirectoryTree:aWidget |
2518 |
aWidget application multipleSelect:true. |
|
2519 |
! |
|
2520 |
||
4365 | 2521 |
postBuildEditField:aWidget |
2522 |
||
2523 |
pathEntryField := aWidget. |
|
2524 |
aWidget model:self fileEntryFieldHolder. |
|
6370 | 2525 |
aWidget listHolder:self directoryHistory. |
4365 | 2526 |
aWidget level:-1. |
4904 | 2527 |
aWidget acceptIfUnchanged:true. |
2528 |
aWidget crAction:[ self crPressedInPathField ]. |
|
4365 | 2529 |
! |
2530 |
||
7102 | 2531 |
postBuildEditModeInfoLabel:aLabel |
2532 |
aLabel menuHolder:self; menuMessage:#modeLabelMenuHolder. |
|
2533 |
||
2534 |
"Created: / 11-09-2006 / 12:24:54 / cg" |
|
2535 |
! |
|
2536 |
||
4018 | 2537 |
postBuildFilterBox:aWidget |
2538 |
||
2539 |
self filterValueBox value:aWidget. |
|
2540 |
self filterBackgroundColor value:aWidget backgroundColor. |
|
2541 |
! |
|
2542 |
||
3892 | 2543 |
postBuildPathViewBox:aWidget |
2544 |
||
2545 |
aWidget backgroundColor:(MenuPanel defaultBackgroundColor). |
|
2546 |
! |
|
2547 |
||
2548 |
postBuildWith:aBuilder |
|
2549 |
||
10787
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2550 |
| prefs | |
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2551 |
|
3892 | 2552 |
super postBuildWith:aBuilder. |
3980 | 2553 |
self updateToolVisibility. |
10787
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2554 |
|
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2555 |
"Load user settings" |
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2556 |
prefs := UserPreferences current. |
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2557 |
AbstractFileBrowser userPreferencesAspectList keysAndValuesDo:[:aspect :default| |
12336 | 2558 |
| value | |
10790 | 2559 |
|
12336 | 2560 |
(prefs respondsTo: aspect) ifTrue:[ |
2561 |
value := prefs perform: aspect |
|
2562 |
] ifFalse:[ |
|
2563 |
value := prefs at: aspect ifAbsent:[default]. |
|
2564 |
]. |
|
2565 |
(self perform: aspect) value: value |
|
10787
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2566 |
] |
637d7e03d602
changed: #postBuildWith: - read settings from user preferences
vrany
parents:
10770
diff
changeset
|
2567 |
|
10790 | 2568 |
"Modified: / 10-10-2011 / 10:54:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3892 | 2569 |
! |
2570 |
||
2571 |
postOpenWith:aBuilder |
|
2572 |
||
4071 | 2573 |
super postOpenWith:aBuilder. |
6595
17b6232d30ef
menu reorganized; infoBar hidable
Claus Gittinger <cg@exept.de>
parents:
6591
diff
changeset
|
2574 |
|
4577 | 2575 |
self currentFileNameHolderChangedForCommon. |
4071 | 2576 |
self currentFileNameHolderChanged. |
4027 | 2577 |
|
3957 | 2578 |
self windowGroup addPreEventHook:self. |
3892 | 2579 |
! |
2580 |
||
2581 |
release |
|
2582 |
||
2583 |
self saveRuntimeAspectValues. |
|
14067 | 2584 |
super release |
3892 | 2585 |
! ! |
2586 |
||
2587 |
!FileBrowserV2 class methodsFor:'documentation'! |
|
2588 |
||
13909 | 2589 |
version |
14603 | 2590 |
^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.225 2014-07-08 13:28:27 cg Exp $' |
13909 | 2591 |
! |
2592 |
||
8831 | 2593 |
version_CVS |
14603 | 2594 |
^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.225 2014-07-08 13:28:27 cg Exp $' |
3892 | 2595 |
! ! |
2596 |
||
12116 | 2597 |
|
3892 | 2598 |
FileBrowserV2 initialize! |