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