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