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