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