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