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