author | Claus Gittinger <cg@exept.de> |
Mon, 10 Feb 2003 15:04:58 +0100 | |
changeset 4531 | c4783f6dfd7a |
parent 4523 | ae3d65269e21 |
child 4534 | 60139c1a36e6 |
permissions | -rw-r--r-- |
3892 | 1 |
"{ Package: 'stx:libtool' }" |
2 |
||
3 |
ApplicationModel subclass:#AbstractFileBrowser |
|
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
4 |
instanceVariableNames:'aspects' |
4496
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
5 |
classVariableNames:'DirectoryHistory RuntimeAspects DirectoryBookmarks |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
6 |
LastEnforcedNameSpace CommandHistory DefaultCommandPerSuffix |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
7 |
CommandHistorySize LastFileDiffFile DefaultFilters |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
8 |
CurrentSelection RootHolder' |
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
9 |
poolDictionaries:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
10 |
category:'Interface-Tools-File' |
3892 | 11 |
! |
12 |
||
13 |
AbstractFileBrowser class instanceVariableNames:'DisabledCursorImage EnabledCursorImage' |
|
14 |
||
15 |
" |
|
16 |
The following class instance variables are inherited by this class: |
|
17 |
||
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
18 |
ApplicationModel - ClassResources |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
19 |
Model - |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
20 |
Object - |
3892 | 21 |
" |
22 |
! |
|
23 |
||
24 |
Object subclass:#Clipboard |
|
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
25 |
instanceVariableNames:'method files' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
26 |
classVariableNames:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
27 |
poolDictionaries:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
28 |
privateIn:AbstractFileBrowser |
3892 | 29 |
! |
30 |
||
31 |
Object subclass:#CodeExecutionLock |
|
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
32 |
instanceVariableNames:'locked' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
33 |
classVariableNames:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
34 |
poolDictionaries:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
35 |
privateIn:AbstractFileBrowser |
3892 | 36 |
! |
37 |
||
4366 | 38 |
List subclass:#DirectoryHistory |
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
39 |
instanceVariableNames:'forwardList backList lastWasForwardPath lastBackPath lastAddPath |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
40 |
backForwardList backForwardIndex' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
41 |
classVariableNames:'HistorySize' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
42 |
poolDictionaries:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
43 |
privateIn:AbstractFileBrowser |
3952 | 44 |
! |
45 |
||
46 |
Object subclass:#DirectoryHistoryItem |
|
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
47 |
instanceVariableNames:'path position' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
48 |
classVariableNames:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
49 |
poolDictionaries:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
50 |
privateIn:AbstractFileBrowser::DirectoryHistory |
3892 | 51 |
! |
52 |
||
53 |
OrderedSet subclass:#FilenameHistory |
|
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
54 |
instanceVariableNames:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
55 |
classVariableNames:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
56 |
poolDictionaries:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
57 |
privateIn:AbstractFileBrowser |
3892 | 58 |
! |
59 |
||
60 |
Object subclass:#SaveAspectItem |
|
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
61 |
instanceVariableNames:'value isHolder' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
62 |
classVariableNames:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
63 |
poolDictionaries:'' |
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
64 |
privateIn:AbstractFileBrowser |
3892 | 65 |
! |
66 |
||
67 |
||
68 |
!AbstractFileBrowser class methodsFor:'classAccess'! |
|
69 |
||
3952 | 70 |
directoryHistoryClass |
71 |
||
72 |
^ AbstractFileBrowser::DirectoryHistory |
|
73 |
! |
|
74 |
||
3892 | 75 |
filenameHistoryClass |
76 |
||
77 |
^ FilenameHistory |
|
78 |
! ! |
|
79 |
||
3952 | 80 |
!AbstractFileBrowser class methodsFor:'classVarAccess'! |
81 |
||
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
82 |
currentSelection |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
83 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
84 |
CurrentSelection isNil ifTrue:[ |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
85 |
CurrentSelection := #(). |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
86 |
]. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
87 |
^ CurrentSelection |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
88 |
! |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
89 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
90 |
currentSelection:aFilenameCol |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
91 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
92 |
CurrentSelection := aFilenameCol |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
93 |
! |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
94 |
|
3952 | 95 |
directoryHistory |
96 |
||
97 |
DirectoryHistory isNil ifTrue:[ |
|
4414 | 98 |
DirectoryHistory := self directoryHistoryClass new. |
3964 | 99 |
"/ DirectoryHistory inspect. |
3952 | 100 |
]. |
101 |
^ DirectoryHistory |
|
102 |
! |
|
103 |
||
104 |
resetClassVars |
|
105 |
||
106 |
DirectoryHistory := nil. |
|
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
107 |
CurrentSelection := nil. |
3952 | 108 |
" |
109 |
AbstractFileBrowser resetClassVars |
|
110 |
" |
|
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
111 |
! |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
112 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
113 |
rootHolder |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
114 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
115 |
^ RootHolder |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
116 |
! |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
117 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
118 |
rootHolder:aRoot |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
119 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
120 |
RootHolder := aRoot |
3952 | 121 |
! ! |
122 |
||
3892 | 123 |
!AbstractFileBrowser class methodsFor:'defaults'! |
124 |
||
125 |
commandHistory |
|
126 |
||
127 |
CommandHistory isNil ifTrue:[ |
|
4414 | 128 |
CommandHistory := OrderedCollection new. |
3892 | 129 |
]. |
130 |
^ CommandHistory |
|
131 |
! |
|
132 |
||
133 |
commandHistorySize |
|
134 |
||
4190 | 135 |
"max no of entries in the HistoryList " |
3892 | 136 |
CommandHistorySize isNil ifTrue:[ |
4414 | 137 |
CommandHistorySize := 50 |
3892 | 138 |
]. |
139 |
^ CommandHistorySize |
|
140 |
! |
|
141 |
||
142 |
defaultFilterList |
|
143 |
||
144 |
DefaultFilters isNil ifTrue:[ |
|
4414 | 145 |
DefaultFilters := #( '*' |
146 |
'*.st' |
|
147 |
'*.htm*' |
|
148 |
'*.txt' |
|
149 |
'*.gif' |
|
150 |
'*.xpm' |
|
151 |
'*.jpg' |
|
152 |
'*.[h,c]*' |
|
153 |
) |
|
3892 | 154 |
]. |
155 |
^ DefaultFilters. |
|
156 |
! |
|
157 |
||
158 |
directoryBookmarks |
|
159 |
||
160 |
DirectoryBookmarks isNil ifTrue:[ |
|
4414 | 161 |
DirectoryBookmarks := OrderedCollection new. |
162 |
DirectoryBookmarks add:Filename homeDirectory asAbsoluteFilename. |
|
163 |
DirectoryBookmarks add:Filename tempDirectory. |
|
164 |
DirectoryBookmarks add:Filename currentDirectory asAbsoluteFilename. |
|
165 |
Smalltalk systemPath do:[:path | |
|
166 |
((path ~= '.') and:[path asFilename exists]) ifTrue:[ |
|
167 |
DirectoryBookmarks add:path asFilename. |
|
168 |
] |
|
169 |
] |
|
3892 | 170 |
]. |
171 |
^ DirectoryBookmarks |
|
172 |
||
173 |
"/ DirectoryBookmarks := nil |
|
174 |
! |
|
175 |
||
4496
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
176 |
initialCommandFor:fileName in:aDirectory intoBox:aBox |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
177 |
"set a useful initial command in an execute box." |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
178 |
|
4523 | 179 |
|mime cmd select path suffix baseName pathName| |
4496
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
180 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
181 |
path := aDirectory filenameFor:fileName. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
182 |
baseName := path baseName. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
183 |
suffix := path suffix. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
184 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
185 |
mime := MIMETypes mimeTypeForSuffix:suffix. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
186 |
"/ mime notNil ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
187 |
"/ cmd := self initialCommandForMIME:mime file:path |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
188 |
"/ ]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
189 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
190 |
"/ XXX should be changed to take stuff from a config file |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
191 |
"/ XXX or from resources. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
192 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
193 |
(path type == #regular) ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
194 |
path isExecutableProgram ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
195 |
aBox initialText:(path pathName , ' <arguments>'). |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
196 |
^ self |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
197 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
198 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
199 |
select := true. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
200 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
201 |
"some heuristics - my personal preferences ... |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
202 |
(actually this should come from a configfile)" |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
203 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
204 |
(baseName endsWith:'akefile') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
205 |
aBox initialText:'make target' selectFrom:6 to:11. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
206 |
^ self |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
207 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
208 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
209 |
cmd := MIMETypes defaultCommandPerMIME at:mime ifAbsent:nil. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
210 |
cmd notNil ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
211 |
select := false |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
212 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
213 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
214 |
cmd isNil ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
215 |
suffix := path suffix. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
216 |
(suffix = 'C') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
217 |
cmd := 'g++ -c %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
218 |
select := 6. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
219 |
] ifFalse:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
220 |
suffix := suffix asLowercase. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
221 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
222 |
(suffix = 'taz') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
223 |
aBox initialText:'zcat %1 | tar tvf -'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
224 |
select := false. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
225 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
226 |
(suffix = 'tar') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
227 |
cmd := 'tar tvf %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
228 |
select := 7. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
229 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
230 |
(suffix = 'zoo') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
231 |
cmd := 'zoo -list %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
232 |
select := 9. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
233 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
234 |
(suffix = 'zip') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
235 |
cmd := 'unzip -l %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
236 |
select := 8. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
237 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
238 |
(suffix = 'jar') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
239 |
cmd := 'unzip -l %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
240 |
select := 8. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
241 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
242 |
(suffix = 'z') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
243 |
(baseName asLowercase endsWith:'tar.z') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
244 |
cmd := 'zcat %1 | tar tvf -'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
245 |
select := false. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
246 |
] ifFalse:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
247 |
cmd := 'uncompress %1' |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
248 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
249 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
250 |
(suffix = 'gz') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
251 |
(baseName asLowercase endsWith:'tar.gz') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
252 |
cmd := ('gunzip < %1 | tar tvf -' ). |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
253 |
select := false. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
254 |
] ifFalse:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
255 |
cmd := 'gunzip %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
256 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
257 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
258 |
(suffix = 'html') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
259 |
cmd := 'netscape %1' |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
260 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
261 |
(suffix = 'htm') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
262 |
cmd := 'netscape %1' |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
263 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
264 |
(suffix = 'uue') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
265 |
cmd := 'uudecode %1' |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
266 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
267 |
(suffix = 'c') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
268 |
cmd := 'cc -c %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
269 |
select := 5. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
270 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
271 |
(suffix = 'cc') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
272 |
cmd := 'g++ -c %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
273 |
select := 6. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
274 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
275 |
(suffix = 'xbm') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
276 |
cmd := 'bitmap %1' |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
277 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
278 |
(suffix = 'ps') ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
279 |
cmd := 'ghostview %1' |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
280 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
281 |
((suffix = '1') or:[suffix = 'man']) ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
282 |
cmd := 'nroff -man %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
283 |
select := 10. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
284 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
285 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
286 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
287 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
288 |
cmd isNil ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
289 |
DefaultCommandPerSuffix isNil ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
290 |
cmd := '<cmd>' |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
291 |
] ifFalse:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
292 |
cmd := DefaultCommandPerSuffix |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
293 |
at:suffix |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
294 |
ifAbsent:'<cmd>'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
295 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
296 |
cmd := cmd , ' %1'. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
297 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
298 |
|
4523 | 299 |
pathName := path pathName. |
300 |
OperatingSystem isUNIXlike ifTrue:[ |
|
301 |
pathName includesSeparator ifTrue:[ |
|
302 |
pathName := '"' , pathName , '"' |
|
303 |
] |
|
304 |
]. |
|
305 |
||
306 |
cmd := cmd bindWith:pathName. |
|
4496
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
307 |
select == false ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
308 |
aBox initialText:cmd |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
309 |
] ifFalse:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
310 |
select class == Interval ifTrue:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
311 |
aBox initialText:cmd selectFrom:select start to:select stop |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
312 |
] ifFalse:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
313 |
select isInteger ifFalse:[ |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
314 |
select := (cmd indexOf:Character space ifAbsent:[cmd size + 1]) - 1. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
315 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
316 |
aBox initialText:cmd selectFrom:1 to:select |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
317 |
]. |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
318 |
] |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
319 |
] |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
320 |
|
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
321 |
"Modified: / 24.9.1997 / 16:34:52 / stefan" |
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
322 |
"Modified: / 9.4.1998 / 17:15:57 / cg" |
3892 | 323 |
! |
324 |
||
325 |
listOfRuntimeValuesToRemark |
|
326 |
||
4201 | 327 |
" list of all aspects that will be saved after close of FileBrowserV2" |
3892 | 328 |
|
329 |
^ #( |
|
4201 | 330 |
#filterModel |
331 |
#enableFileHistory |
|
332 |
#fileHistory |
|
333 |
#currentSortOrder |
|
334 |
#sortBlockProperty |
|
3892 | 335 |
) |
336 |
! |
|
337 |
||
338 |
resetAspects |
|
339 |
||
340 |
RuntimeAspects := nil. |
|
341 |
||
342 |
" |
|
343 |
self resetAspects |
|
344 |
" |
|
345 |
! |
|
346 |
||
347 |
runtimeAspects |
|
348 |
||
349 |
RuntimeAspects isNil ifTrue:[ |
|
4414 | 350 |
RuntimeAspects := Dictionary new. |
3892 | 351 |
]. |
352 |
^ RuntimeAspects |
|
353 |
! |
|
354 |
||
4201 | 355 |
userPreferencesAspectList |
356 |
||
357 |
" list of all aspects that will be saved with save settings |
|
358 |
that aspects will be image consistent if the settings are saved in Launcher |
|
359 |
dont forget to add a access methos in Userpreferences if you add a aspect here |
|
360 |
" |
|
361 |
||
362 |
^ #( |
|
363 |
#viewDirsInContentsBrowser |
|
364 |
#showDirectoryTree |
|
365 |
#showHiddenFiles |
|
366 |
#viewDescription |
|
367 |
#viewDetails |
|
368 |
#viewDirectoryDescription |
|
369 |
#viewFilesInDirectoryTree |
|
370 |
#viewGroup |
|
371 |
#viewOwner |
|
372 |
#viewPermissions |
|
373 |
#viewPreview |
|
374 |
#viewSize |
|
375 |
#viewTime |
|
376 |
#viewType |
|
377 |
#openMultipleApplicationsForType |
|
378 |
#filenameEntryFieldVisibleHolder |
|
379 |
#toolBarVisibleHolder |
|
380 |
#sortDirectoriesBeforeFiles |
|
381 |
#openAlwaysInTextEditor |
|
382 |
#sortCaseless |
|
383 |
) |
|
3892 | 384 |
! ! |
385 |
||
386 |
!AbstractFileBrowser class methodsFor:'image'! |
|
387 |
||
4337
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
388 |
disabledCursorImage |
3892 | 389 |
|
390 |
DisabledCursorImage isNil ifTrue:[ |
|
4337
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
391 |
DisabledCursorImage := Image fromFile:'xpmBitmaps/cursors/no_entry.xpm' |
3892 | 392 |
]. |
393 |
^ DisabledCursorImage |
|
394 |
! |
|
395 |
||
4337
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
396 |
enabledCursorImage |
3892 | 397 |
|
398 |
EnabledCursorImage isNil ifTrue:[ |
|
4337
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
399 |
EnabledCursorImage := Image fromFile:'xpmBitmaps/cursors/double_crossHair.xpm' |
3892 | 400 |
]. |
401 |
^ EnabledCursorImage |
|
402 |
! ! |
|
403 |
||
404 |
!AbstractFileBrowser class methodsFor:'image specs'! |
|
405 |
||
406 |
clearHistoryIcon |
|
407 |
^ Icon deleteIcon |
|
408 |
! |
|
409 |
||
410 |
closeIcon |
|
411 |
"This resource specification was automatically generated |
|
412 |
by the ImageEditor of ST/X." |
|
413 |
||
414 |
"Do not manually edit this!! If it is corrupted, |
|
415 |
the ImageEditor may not be able to read the specification." |
|
416 |
||
417 |
" |
|
418 |
self closeIcon inspect |
|
419 |
ImageEditor openOnClass:self andSelector:#closeIcon |
|
420 |
" |
|
421 |
||
422 |
<resource: #image> |
|
423 |
||
424 |
^Icon |
|
4414 | 425 |
constantNamed:#'AbstractFileBrowser class closeIcon' |
426 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 427 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ H@@@@@@@@@@@@B@ @@@@@@@@@@@@HB@ @@@@@@@@@B@ H@@@@@@@@@@@@@@ HB@@@@@@@B@ H@@@@@@@@@ |
428 |
@@@@@@@B@ H@@@@B@ H@@@@@@@@@@@@@@@@@@@HB@ @B@ H@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@B@ H@@@@@@@@@@@@@@@@@ |
|
429 |
@@@@@@@B@ HB@ @@@@@@@@@@@@@@@@@@@@@B@ H@@ HB@@@@@@@@@@@@@@@@@@@B@ H@@@@B@ H@@@@@@@@A@@@@@@@B@ H@@@@@@@HB@ @@@@@@@@@@@@@B |
|
430 |
@ H@@@@@@@@@@ HB@@@@@@@@@@@@@ H@@@@@@@@@@@@B@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@PD@@P@@ |
|
431 |
@@DA@@@@@PD@@@DA@@@@@P@@@@D@@@D@@@D@@P@@@@D@@@D@@@D@@@@A@@@A@@@A@@@A@@@A@PDA@@@A@@@@@P@@@P@@@P@@@@D@@P@@@@@@@@DA@@DA@@@A |
|
432 |
@P@@@PD@@@@A@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[255 255 255 0 0 0 255 0 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@A C@A0G@@8N@@\\@@N8@@G0@@C @@G0@@N8@@\\B@8N@A0G@A C@@@@@A@@@MFL0QIQHQII8QIE@M&X0@@@@') ; yourself); yourself] |
|
433 |
! |
|
434 |
||
435 |
copyIcon |
|
436 |
<resource: #programImage> |
|
437 |
||
438 |
^ ToolbarIconLibrary copy20x20Icon "copy28x28Icon" |
|
439 |
! |
|
440 |
||
441 |
cutIcon |
|
442 |
<resource: #programImage> |
|
443 |
||
444 |
^ ToolbarIconLibrary cut20x20Icon2 "cut28x28Icon" |
|
445 |
! |
|
446 |
||
447 |
deleteIcon |
|
448 |
<resource: #programImage> |
|
449 |
||
450 |
^ ToolbarIconLibrary erase20x20Icon "/ delete28x28Icon |
|
451 |
! |
|
452 |
||
453 |
diffIcon |
|
454 |
"This resource specification was automatically generated |
|
455 |
by the ImageEditor of ST/X." |
|
456 |
||
457 |
"Do not manually edit this!! If it is corrupted, |
|
458 |
the ImageEditor may not be able to read the specification." |
|
459 |
||
460 |
" |
|
461 |
self diffIcon inspect |
|
462 |
ImageEditor openOnClass:self andSelector:#diffIcon |
|
463 |
" |
|
464 |
||
465 |
<resource: #image> |
|
466 |
||
467 |
^Icon |
|
4414 | 468 |
constantNamed:#'AbstractFileBrowser class diffIcon' |
469 |
ifAbsentPut:[(Depth8Image new) width: 26; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 470 |
@@@@@@@@A@PDA@PDA@PD@@@@@@@@@@@@@@@@@@@@@@@DA XFA XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA XF@@@@@@@@@@@@@@@@@@@@@@@@@@@@A@XFA @F |
471 |
A XD@@@@@@@@@@@@@@@@@@@@@@@DA X@A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA @FA XFA@@@@@@@@@@@@@@@@@@@@@@@A@XF@@XFA XD@@@@@@@@@@@@ |
|
472 |
@@@@@@@@@@@DA X@A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA X@A XFA@@@@@@@@@@@@@@@@@@@@@@@A@XFA X@@@@@@@@@@@@@@@@@@@@@@@@@@@@DA XF |
|
473 |
A XFA P@@@@@@@@@@@@@@@@@@@@@@@PFA XFA XFA@@@@@@@@@@@@@@@@@@@@@@@A@PDA@PDA@PD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
474 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
475 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
476 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 129 129 129 0 0 0 194 194 194 132 132 132 198 198 198 255 255 255]; mask:((Depth1Image new) width: 26; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@?8@@@O>@@@C? @@@?<@@@O> @@C?(@@@?:@@@O> @@C?8@@@??@@@O>8@@C?''@@@?80@@@@@@@@T[@@@DI@@@GSX@@BT$@@@%I@@@IRP@@A4$@@@@@@@@@@a') ; yourself); yourself] |
|
477 |
! |
|
478 |
||
479 |
fileInIcon |
|
480 |
<resource: #programImage> |
|
481 |
||
4094 | 482 |
^ ToolbarIconLibrary fileIn20x20Icon3 |
3892 | 483 |
! |
484 |
||
485 |
goHomeIcon |
|
486 |
"This resource specification was automatically generated |
|
487 |
by the ImageEditor of ST/X." |
|
488 |
||
489 |
"Do not manually edit this!! If it is corrupted, |
|
490 |
the ImageEditor may not be able to read the specification." |
|
491 |
||
492 |
" |
|
493 |
self goHomeIcon inspect |
|
494 |
ImageEditor openOnClass:self andSelector:#goHomeIcon |
|
4084 | 495 |
Icon flushCachedIcons |
3892 | 496 |
" |
497 |
||
498 |
<resource: #image> |
|
499 |
||
500 |
^Icon |
|
4414 | 501 |
constantNamed:#'AbstractFileBrowser class goHomeIcon' |
502 |
ifAbsentPut:[(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 503 |
@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@DQ@@@@@@@@@@@@DQDP@@@@@@@@@@DQ@QD@@@@@@@@@DQH2DQ@@@@@@@@DQH4L!!DP@@@@@@DQH4QCHQD@@@@@ |
504 |
DQH4QDP2DQ@@@@DQH4QDQDL!!DP@@DQH4QDQDQCHQD@D"H4QBH"ADP0@A@RH#QBH"H QC@@D@@@MDIUUUADL@@@@@@4P%UUTDP0@@@@@CQBUUUPQC@@@@@@MD |
|
505 |
IUUUADL@@@@@@4P%UUTDP0@@@@@CQBUUUPQC@@@@@@MDIUUUADL@@@@@@4P%UUTDP0@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 192 0 0 64 0 0 128 128 128 192 192 192 100 128 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@A@@@C @A''0@A/8@A?<@A?>@A??@C?? G??0O??8_??<_??<_??<C?? C?? C?? C?? C?? C?? C?? C?? C?? ') ; yourself); yourself] |
|
3892 | 506 |
! |
507 |
||
508 |
hexToggle22x22Icon |
|
509 |
"This resource specification was automatically generated |
|
510 |
by the ImageEditor of ST/X." |
|
511 |
||
512 |
"Do not manually edit this!! If it is corrupted, |
|
513 |
the ImageEditor may not be able to read the specification." |
|
514 |
||
515 |
" |
|
516 |
self hexToggle22x22Icon inspect |
|
517 |
ImageEditor openOnClass:self andSelector:#hexToggle22x22Icon |
|
518 |
" |
|
519 |
||
520 |
<resource: #image> |
|
521 |
||
522 |
^Icon |
|
4414 | 523 |
constantNamed:#'AbstractFileBrowser class hexToggle22x22Icon' |
524 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 525 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@AP@@@@T@@@@EAP@@@@@@@@@@ |
526 |
@@@@@@TEAP@E@@TEAPT@@@@@@@@@@@@@@@@EAP@@AP@@APTE@@@@@@@@@@@@@@@@APTE@@T@APTEAP@@@@@@@@@@@@@@@@T@@@@E@@TEAPT@@@@@@@@@@@@@ |
|
527 |
@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@AP@@@@T@@@@EAP@@@@@@@@@@@@@@@@T@AP@E@@T@APT@@@@@@@@@@@@@@@@E@@@@AP@@@@TE@@@@@@@@@@@@@@@@ |
|
528 |
AP@E@@T@AP@EAP@@@@@@@@@@@@@@@@T@AP@E@@@@APT@@@@@@@@@@@@@@@@EAPTEAPTEAPTE@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
529 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
530 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 105 133 190 129 129 129 194 194 194 255 0 0 255 255 255]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@A?>@@@@@B''Q@B$J@C&D@B$J@B''Q@') ; yourself); yourself] |
|
531 |
! |
|
532 |
||
533 |
historyIcon |
|
534 |
<resource: #programImage> |
|
535 |
||
536 |
^ ToolbarIconLibrary history20x20Icon "/ history28x28Icon |
|
537 |
! |
|
538 |
||
539 |
homeIcon |
|
540 |
<resource: #programImage> |
|
541 |
||
542 |
^ ToolbarIconLibrary home28x28Icon |
|
543 |
! |
|
544 |
||
545 |
htmlReloadIcon |
|
546 |
"This resource specification was automatically generated |
|
547 |
by the ImageEditor of ST/X." |
|
548 |
||
549 |
"Do not manually edit this!! If it is corrupted, |
|
550 |
the ImageEditor may not be able to read the specification." |
|
551 |
||
552 |
" |
|
553 |
self htmlReloadIcon inspect |
|
554 |
ImageEditor openOnClass:self andSelector:#htmlReloadIcon |
|
555 |
" |
|
556 |
||
557 |
<resource: #image> |
|
558 |
||
559 |
^Icon |
|
4414 | 560 |
constantNamed:#'AbstractFileBrowser class htmlReloadIcon' |
561 |
ifAbsentPut:[(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 562 |
@@@@@@@@@@@UT@@@@@EU@D@@@@UT@@@H@AUP@@@@@EU@@@@@@EU@@@@E@EU@@@@@@EU@@@@@AUUT@@@@@UUP@@@@@EU@@@@@@AT@@@@@@@P@@@@H@@@@@@@@ |
563 |
@@@@@@@@@@@@@@@H@@@@@@@@@@@@@@@G@@@@@@@J@@@@@@@I@@@@@@@@') ; colorMapFromArray:#[0 0 0 0 129 0]; mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@G<C@_?C@??#A?C3C>@;G<@KG<@CG<@C??$C_?NCO>_CG<?#C9?3A3?;@''??@@?#P@?C\A?COC>CG?<CC?8C@? C') ; yourself); yourself] |
|
564 |
! |
|
565 |
||
566 |
leftArrow |
|
567 |
"This resource specification was automatically generated |
|
568 |
by the ImageEditor of ST/X." |
|
569 |
||
570 |
"Do not manually edit this!! If it is corrupted, |
|
571 |
the ImageEditor may not be able to read the specification." |
|
572 |
||
573 |
" |
|
574 |
self leftArrow inspect |
|
575 |
ImageEditor openOnClass:self andSelector:#leftArrow |
|
576 |
" |
|
577 |
||
578 |
<resource: #image> |
|
579 |
||
580 |
^Icon |
|
4414 | 581 |
constantNamed:#'AbstractFileBrowser class leftArrow' |
582 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 583 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
584 |
@@@@@@@@@@@@@@@@@@@A@0D@@@@@@@@@@@@@@@@@@@@@@@@@@@DDAPH@@@@@@@@@@@@@@@@@@@@@@@@@@PX@A0D@@@@@@@@@@@@@@@@@@@@@@@@AB@@IB HK |
|
585 |
@0LA@PDK@@@@@@@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@@@@@@@PX@@ALTEP8PDQDVE0\R@@@@@@@@@@@AAADQD1PUEQTNF@$SFP(R@@@@@@@@@@@KB!!P[ |
|
586 |
GAPUEQT]GQ4]GP(R@@@@@@@@@@@@D (TG!!0TEA,_G1<[H@(R@@@@@@@@@@@@@AHJC!!< GQ4JB (JB"DK@@@@@@@@@@@@@@@RB 8^B DRD!!HRD!!HK@@@@@@@@ |
|
587 |
@@@@@@@@D (]H H@@@@@@@@@@@@@@@@@@@@@@@@@@AHJHPD@@@@@@@@@@@@@@@@@@@@@@@@@@@@K@PH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B0D@@@@@@@@@ |
|
588 |
@@@@@@@@@@@@@@@@@@@@@@,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
589 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 32 96 32 64 96 96 128 160 64 96 128 128 160 192 32 96 128 128 160 160 160 192 224 0 96 128 0 0 0 128 128 160 64 192 192 32 160 192 64 128 192 128 192 224 192 224 224 0 0 32 96 192 224 0 160 192 0 128 192 160 224 224 96 160 192 128 192 192 64 160 192 192 192 192 32 192 192 0 192 224 0 128 160 32 192 224 64 192 224 0 192 192 0 64 96 0 64 128]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@B@@@F@@@N@@@^@@@>@@A??@C??@G??@O??@O??@G??@C??@A??@@>@@@^@@@N@@@F@@@B@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
|
590 |
! |
|
591 |
||
592 |
leftArrow20x20Icon |
|
593 |
"This resource specification was automatically generated |
|
594 |
by the ImageEditor of ST/X." |
|
595 |
||
596 |
"Do not manually edit this!! If it is corrupted, |
|
597 |
the ImageEditor may not be able to read the specification." |
|
598 |
||
599 |
" |
|
600 |
self leftArrow20x20Icon inspect |
|
601 |
ImageEditor openOnClass:self andSelector:#leftArrow20x20Icon |
|
602 |
Icon flushCachedIcons |
|
603 |
" |
|
604 |
||
605 |
<resource: #image> |
|
606 |
||
607 |
^Icon |
|
4414 | 608 |
constantNamed:#'AbstractFileBrowser class leftArrow20x20Icon' |
609 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 610 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@@HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB@ HB@ HB@ H@@ @B@ HB@ HB@ HB@ HB@ HB@@HA |
611 |
@@HB@ HB@ HB@ HB@ HB@ @B@PD@@ HB@ HB@ HB@ HB@ H@@ DA@P@@@@@@@@@@@ HB@ HB@@HA@PDA@ HB@ HB@ @B@ HB@ @B@PDA@PDA@PDA@PDB@@HB |
|
612 |
@ H@@ DA@PDA@PDA@PDA@PH@@ HB@ @B@PDA@PDA@PDA@PDA@ @B@ HB@ @B@PDA@PDA@PDA@PDB@@HB@ HB@ @B@PDA@PHB@ HB@ H@@ HB@ HB@ @B@PDA |
|
613 |
@@@@@@@@@@@B@ HB@ HB@ @B@PD@@ HB@ HB@ HB@ HB@ HB@ @B@P@B@ HB@ HB@ HB@ HB@ HB@ @B@@HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB |
|
614 |
@ HB@ HB@ HB@ @B@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @a') ; colorMapFromArray:#[0 0 0 100 128 255 128 128 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@M@B@@@F@J@N@@@^@J@>@@A??@C??@G??OO??@O??@G??@C??@A??E@>@H@^@@@N@@@F@N@B@A@@@@') ; yourself); yourself] |
|
3892 | 615 |
! |
616 |
||
617 |
leftArrow20x20PlusMenuIcon |
|
618 |
"This resource specification was automatically generated |
|
619 |
by the ImageEditor of ST/X." |
|
620 |
||
621 |
"Do not manually edit this!! If it is corrupted, |
|
622 |
the ImageEditor may not be able to read the specification." |
|
623 |
||
624 |
" |
|
625 |
self leftArrow20x20PlusMenuIcon inspect |
|
626 |
ImageEditor openOnClass:self andSelector:#leftArrow20x20PlusMenuIcon |
|
627 |
Icon flushCachedIcons |
|
628 |
" |
|
629 |
||
630 |
<resource: #image> |
|
631 |
||
632 |
^Icon |
|
4414 | 633 |
constantNamed:#'AbstractFileBrowser class leftArrow20x20PlusMenuIcon' |
634 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 635 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@A@ @@@@@@@@@@@@@@@@@@@@@@@PLA@@@@@@@@@@@@@@@@@@@@@@DD |
636 |
APH@@@@@@@@@@@@@@@@@@@@AA @G@P@@@@@@@@@@@@@@@@@@@P @BP(BB0LC@PDAB0@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@AA @@D1PUC!!@QDQXWA1H@ |
|
637 |
@@@@@PPQDQLTEQTUC!! ID1$JD @@@@@KB!!P[GAPUEQT]GQ4]GP(R@@@@@@@RB!!P^GAPTF1<_G1, B!!H@@@@@@@@RB 8_HA4]B (JB (!!B0@@@@@@@@@RB 8^ |
|
638 |
B DRD!!HRD!!HK@@@@@@@@@@@RB!!4"@ @@@@@@@@@@@@@@@@@@@@@RB"DA@@@@@@@@@@@KB0,KB0,K@@@K@PH@@@@@@@@@@@@KB0,KB0@@@@@K@P@@@@@@@@@@ |
|
639 |
@@@KB0,@@@@@@@@K@@@@@@@@@@@@@@@K@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[224 224 224 0 32 64 0 32 96 32 64 96 96 128 160 64 96 128 128 160 192 32 96 128 128 160 160 160 192 224 0 96 128 0 0 0 128 128 160 64 192 192 32 160 192 64 128 192 128 192 224 192 224 224 0 0 32 96 192 224 0 160 192 0 128 192 160 224 224 96 160 192 128 192 192 64 160 192 192 192 192 32 192 192 0 192 224 0 128 160 32 192 224 64 192 224 0 192 192 0 64 96 0 64 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A@@@C@@@G@@@O@@@_@@@?? A?? C?? G?? G?? C?? A?? @?? @_@@@O@@?''@@_C@@NA@@D@@@') ; yourself); yourself] |
|
640 |
! |
|
641 |
||
4094 | 642 |
leftArrowIcon |
643 |
^ self leftArrow20x20Icon |
|
644 |
! |
|
645 |
||
3892 | 646 |
leftArrowPlusMenu |
647 |
"This resource specification was automatically generated |
|
648 |
by the ImageEditor of ST/X." |
|
649 |
||
650 |
"Do not manually edit this!! If it is corrupted, |
|
651 |
the ImageEditor may not be able to read the specification." |
|
652 |
||
653 |
" |
|
654 |
self leftArrowPlusMenu inspect |
|
655 |
ImageEditor openOnClass:self andSelector:#leftArrowPlusMenu |
|
656 |
" |
|
657 |
||
658 |
<resource: #image> |
|
659 |
||
660 |
^Icon |
|
4414 | 661 |
constantNamed:#'AbstractFileBrowser class leftArrowPlusMenu' |
662 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 663 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
664 |
@@@@@@@@@@@@@@@@@@@A@0D@@@@@@@@@@@@@@@@@@@@@@@@@@@DDAPH@@@@@@@@@@@@@@@@@@@@@@@@@@PX@A0D@@@@@@@@@@@@@@@@@@@@@@@@AB@@IB HK |
|
665 |
@0LA@PDK@@@@@@@@@@@@@@DL@@@MC <P@@@@DPLR@@@@@@@@@@@@@PX@@ALTEP8PDQDVE0\R@@@@@@@@@@@AAADQD1PUEQTNF@$SFP(R@@@@@@@@@@@KB!!P[ |
|
666 |
GAPUEQT]GQ4]GP(R@@@@@@@@@@@@D (TG!!0TEA,_G1<[H@(R@@@@@@@@@@@@@AHJC!!< GQ4JB (JB"DK@@@@@@@@@@@@@@@RB 8^B DRD!!HRD!!HK@@@@@@@@ |
|
667 |
@@@@@@@@D (]H H@@@@@@@@@@@@@@@@@@@@@@@@@@AHJHPD@@@@@@@@@@@@@@@@@@@@@@@@@@@@K@PH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B0D@@@@@@@@@ |
|
668 |
@@@@@@@@@@@@@@@@@@@@@@,@@@@@@@@KB0,KB0,K@@@@@@@@@@@@@@@@@@@@@@@@B0,KB0,@@@@@@@@@@@@@@@@@@@@@@@@@@@,KB0@@@@@@@@@@@@@@@@@@ |
|
669 |
@@@@@@@@@@@K@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 32 96 32 64 96 96 128 160 64 96 128 128 160 192 32 96 128 128 160 160 160 192 224 0 96 128 0 0 0 128 128 160 64 192 192 32 160 192 64 128 192 128 192 224 192 224 224 0 0 32 96 192 224 0 160 192 0 128 192 160 224 224 96 160 192 128 192 192 64 160 192 192 192 192 32 192 192 0 192 224 0 128 160 32 192 224 64 192 224 0 192 192 0 64 96 0 64 128]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@B@@@F@@@N@@@^@@@>@@A??@C??@G??@O??@O??@G??@C??@A??@@>@@@^@@@N@@@F@@@BA?@@@>@@@\@@@H@@@@') ; yourself); yourself] |
|
670 |
! |
|
671 |
||
672 |
leftDownIcon |
|
673 |
"This resource specification was automatically generated |
|
674 |
by the ImageEditor of ST/X." |
|
675 |
||
676 |
"Do not manually edit this!! If it is corrupted, |
|
677 |
the ImageEditor may not be able to read the specification." |
|
678 |
||
679 |
" |
|
680 |
self leftDownIcon inspect |
|
681 |
ImageEditor openOnClass:self andSelector:#leftDownIcon |
|
682 |
" |
|
683 |
||
684 |
<resource: #image> |
|
685 |
||
686 |
^Icon |
|
4414 | 687 |
constantNamed:#'AbstractFileBrowser class leftDownIcon' |
688 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 689 |
UUUUUUUUUUUPAUUUUUUUP@UUUUUUUPB!!UUUUUU@B*AUUUUU@B*(UUUUUPB** UUUUPB***AUUUTB***(EUUUB****%UUUR*****UUUUU@*%UUUUUUPJ)UUUU |
690 |
UUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*$@@@@AUPJ*****)UTB******UU@******%UPJ*****)UTAUUUU |
|
691 |
UUUU@@@@@@@AUUUUUUUUUP@a') ; colorMapFromArray:#[255 255 255 0 0 0 40 40 100 255 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
692 |
@@@@@@@@@@@@ @@@@\@@@@O @@@G<@@@C? @@A?<@@@?? @@_?<@@G?? @@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C??? @???8@O? |
|
693 |
?>@C??? @???8@O??>@@@@@@@@@@@@@a') ; yourself); yourself] |
|
694 |
! |
|
695 |
||
696 |
leftIcon |
|
697 |
"This resource specification was automatically generated |
|
698 |
by the ImageEditor of ST/X." |
|
699 |
||
700 |
"Do not manually edit this!! If it is corrupted, |
|
701 |
the ImageEditor may not be able to read the specification." |
|
702 |
||
703 |
" |
|
704 |
self leftIcon inspect |
|
705 |
ImageEditor openOnClass:self andSelector:#leftIcon |
|
706 |
" |
|
707 |
||
708 |
<resource: #image> |
|
709 |
||
710 |
^Icon |
|
4414 | 711 |
constantNamed:#'AbstractFileBrowser class leftIcon' |
712 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 713 |
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUPUUUUUUUUPUUUUUUUUP%UUUUUUUP)UUUUUUUP*P@@@@@AP*$@@@@@@P******* |
714 |
*P********$********)J********U********%V*%UUUUUUUZ)UUUUUUUP*UUUUUUUUV%UUUUUUUUYUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU |
|
715 |
UUUUUUUUUUUUUUUUUUUUUP@a') ; colorMapFromArray:#[255 255 255 0 0 0 40 40 100 255 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
716 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H@@@@F@@@@C @@@A8@@@@>@@@@_???0O???<G????C????0_???<C????@_???0C8@@@@^@@@@C @@@@X@@@@@@ |
|
717 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
718 |
! |
|
719 |
||
4230 | 720 |
makeIcon |
721 |
"This resource specification was automatically generated |
|
722 |
by the ImageEditor of ST/X." |
|
723 |
||
724 |
"Do not manually edit this!! If it is corrupted, |
|
725 |
the ImageEditor may not be able to read the specification." |
|
726 |
||
727 |
" |
|
728 |
self makeIcon inspect |
|
729 |
ImageEditor openOnClass:self andSelector:#makeIcon |
|
730 |
Icon flushCachedIcons |
|
731 |
" |
|
732 |
||
733 |
<resource: #image> |
|
734 |
||
735 |
^Icon |
|
736 |
constantNamed:#'AbstractFileBrowser class makeIcon' |
|
737 |
ifAbsentPut:[(Depth8Image new) width: 22; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
738 |
@@@@@@@@@@@@@@XF@@@@@@@@@@@@@@@@@@@FA X@@@XJB X@@@@FA @@@@@@@@@FB (JA XJB (JA XEB \F@@@@@@@@A (JB (JB (JB (JB (GA @@@@@@ |
|
739 |
@@DAB (JB (JB (JB (GAPT@@@@@A XFA XJB (GAPDAB (JAPTFA X@A \JB (JB (GAPD@@@DJB (JB (JA XJB (JB (JA0DEA0DAB (JB (JB TAA XF |
|
740 |
B (JB (EAPTEA0(JB TEAPTA@PDA@PXJB (JB (JB (JB TE@PDA@PDA@PXJB (JB (JB (JB (JA0TA@PD@@PXJB (JB (JB (JB (JB (JA D@@@HDB (J |
|
741 |
@ HJB (JB PDA@(JB X@@@@@@P\G@PDAA (JB XA@PDFA XA@@@@@@DA@PDA@PXJB (F@PDA@PDA@P@@@@@A@PDA@PDFA0(GA D@@PDA@PD@@@@@@@DA@P@@ |
|
742 |
@PXFA D@@@@A@PD@@@@@@@@@@@@@@@DA@PDA@@@@@@@@@@@@@@@@@@@@@@@A@PDA@P@@@@@@@@@@@@@@@@@@@@@@@@DA@P@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 48 48 48 56 59 56 64 68 64 88 92 88 128 128 128 160 160 160 192 192 192 216 219 216 239 244 239 248 252 248]; mask:((Depth1Image new) width: 22; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@C@@C''#@G?? G?? G?? _??8???<???<???<???<???<_??8_??0O??0O??0O?70GO# @O @@O @@G@@') ; yourself); yourself] |
|
743 |
! |
|
744 |
||
3892 | 745 |
menuHistoryList9x20Icon |
746 |
"This resource specification was automatically generated |
|
747 |
by the ImageEditor of ST/X." |
|
748 |
||
749 |
"Do not manually edit this!! If it is corrupted, |
|
750 |
the ImageEditor may not be able to read the specification." |
|
751 |
||
752 |
" |
|
753 |
self menuHistoryList9x20Icon inspect |
|
754 |
ImageEditor openOnClass:self andSelector:#menuHistoryList9x20Icon |
|
755 |
Icon flushCachedIcons |
|
756 |
" |
|
757 |
||
758 |
<resource: #image> |
|
759 |
||
760 |
^Icon |
|
4414 | 761 |
constantNamed:#'AbstractFileBrowser class menuHistoryList9x20Icon' |
762 |
ifAbsentPut:[(Depth1Image new) width: 9; height: 20; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a') ; colorMapFromArray:#[255 255 255 0 0 0]; mask:((Depth1Image new) width: 9; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a') ; yourself); yourself] |
|
3892 | 763 |
! |
764 |
||
765 |
menuHistoryListIcon |
|
766 |
"This resource specification was automatically generated |
|
767 |
by the ImageEditor of ST/X." |
|
768 |
||
769 |
"Do not manually edit this!! If it is corrupted, |
|
770 |
the ImageEditor may not be able to read the specification." |
|
771 |
||
772 |
" |
|
773 |
self menuHistoryListIcon inspect |
|
774 |
ImageEditor openOnClass:self andSelector:#menuHistoryListIcon |
|
775 |
" |
|
776 |
||
777 |
<resource: #image> |
|
778 |
||
779 |
^Icon |
|
4414 | 780 |
constantNamed:#'AbstractFileBrowser class menuHistoryListIcon' |
781 |
ifAbsentPut:[(Depth1Image new) width: 12; height: 12; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??S?<O?0??C?<O?0??/?=_?0??C?<O?0') ; colorMapFromArray:#[255 255 255 0 0 0]; mask:((Depth1Image new) width: 12; height: 12; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@O@@<@C0A?8C?@G8@O@@X@@@A?8@@@') ; yourself); yourself] |
|
3892 | 782 |
! |
783 |
||
3923 | 784 |
newDirectory20x20Icon |
785 |
"This resource specification was automatically generated |
|
786 |
by the ImageEditor of ST/X." |
|
787 |
||
788 |
"Do not manually edit this!! If it is corrupted, |
|
789 |
the ImageEditor may not be able to read the specification." |
|
790 |
||
791 |
" |
|
792 |
self newDirectory20x20Icon inspect |
|
793 |
ImageEditor openOnClass:self andSelector:#newDirectory20x20Icon |
|
794 |
Icon flushCachedIcons |
|
795 |
" |
|
796 |
||
797 |
<resource: #image> |
|
798 |
||
799 |
^Icon |
|
4414 | 800 |
constantNamed:#'AbstractFileBrowser class newDirectory20x20Icon' |
801 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3923 | 802 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PDA@PDA@P@@@@@@@@@@@@@@@@@A@ HB@ HA@@@@@@@@@@@@@@@@@PHB@ HB@ HA |
803 |
@@@@@@@@@@@@@@DA@PDA@PDA@P@@@@@@@@@@@@D@@PHB@ HB@ HB@ HB@@@@@ HB@P@A@ HB@ HB@ HB@ @B@@H@@ HA@@DB@ HB@ HB@ H@@ H@@ H@@ D@ |
|
804 |
@PHB@ HB@ HB@@HB@ @B@ H@@P@A@ HB@ HB@ HB@ HB@ HB@ HA@@DB@ HB@ HB@ HB@ HB@ HB@ D@@PHB@ HB@ HB@ HB@ HB@ HB@P@A@ HB@ HB@ HB |
|
805 |
@ HB@ HB@ HA@@DB@ HB@ HB@ HB@ HB@ HB@ D@@PHB@ HB@ HB@ HB@ HB@ HB@P@A@ HB@ HB@ HB@ HB@ HB@ HA@@DA@PDA@PDA@PDA@PDA@PDA@PD@ |
|
806 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[255 0 0 0 0 0 255 255 0]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@DQ@O:R@O9T@_<8@??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? ??? @@@@@@@@') ; yourself); yourself] |
|
807 |
! |
|
808 |
||
3892 | 809 |
pasteIcon |
810 |
<resource: #programImage> |
|
811 |
||
812 |
^ ToolbarIconLibrary paste20x20Icon "/ paste28x28Icon |
|
813 |
! |
|
814 |
||
815 |
rightArrow |
|
816 |
"This resource specification was automatically generated |
|
817 |
by the ImageEditor of ST/X." |
|
818 |
||
819 |
"Do not manually edit this!! If it is corrupted, |
|
820 |
the ImageEditor may not be able to read the specification." |
|
821 |
||
822 |
" |
|
823 |
self rightArrow inspect |
|
824 |
ImageEditor openOnClass:self andSelector:#rightArrow |
|
825 |
" |
|
826 |
||
827 |
<resource: #image> |
|
828 |
||
829 |
^Icon |
|
4414 | 830 |
constantNamed:#'AbstractFileBrowser class rightArrow' |
831 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 832 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
833 |
@@@@@@@@@@@@@@@@@@@@@0PB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PTF@ @@@@@@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@@@@@@A@PDA@PDH@P\I |
|
834 |
@@XB@@@@@@@@@@@@@@@AA0(@@@@@B ,LB @D@ @@@@@@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@@@@@@@@M@@TTEQLQE!!\WD 0K@@PB@@@@@@@@@@@MB <W |
|
835 |
E1\WD!!\WD!!LYDQ(B@@@@@@@@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@@@@@@AA!!(ZF!!(ZE1H^FQDZ@ @@@@@@@@@@@@@A@ HB@ HB@1DYDQ(B@@@@@@@@@@@@ |
|
836 |
@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@@@@@@@0PZ@ @@@@@@@@@@@@@@@@@@@@@@@@@@@Q(B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0H@@@@@@@@@ |
|
837 |
@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
838 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 0 64 96 32 128 160 128 160 192 32 96 128 128 192 192 0 64 64 160 192 192 192 224 224 160 192 224 96 192 224 32 64 96 160 224 224 128 192 224 96 160 192 0 160 192 0 128 192 64 192 192 64 160 192 96 192 192 32 160 192 0 128 160 192 192 192 64 224 224 0 96 128 32 192 192 64 192 224 0 192 224 0 192 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@D@@@F@@@G@@@G @@G0@O?8@O?<@O?>@O??@O??@O?>@O?<@O?8@@G0@@G @@G@@@F@@@D@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
|
839 |
! |
|
840 |
||
841 |
rightArrow20x20Icon |
|
842 |
"This resource specification was automatically generated |
|
843 |
by the ImageEditor of ST/X." |
|
844 |
||
845 |
"Do not manually edit this!! If it is corrupted, |
|
846 |
the ImageEditor may not be able to read the specification." |
|
847 |
||
848 |
" |
|
849 |
self rightArrow20x20Icon inspect |
|
850 |
ImageEditor openOnClass:self andSelector:#rightArrow20x20Icon |
|
851 |
Icon flushCachedIcons |
|
852 |
" |
|
853 |
||
854 |
<resource: #image> |
|
855 |
||
856 |
^Icon |
|
4414 | 857 |
constantNamed:#'AbstractFileBrowser class rightArrow20x20Icon' |
858 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 859 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ H@@ HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB@ HB@ HB@ HB@@H@@ HB@ HB@ HB@ HB@ HB@ H@ |
860 |
@PH@@ HB@ HB@ HB@ HB@ HB@ @A@PH@@ HB@ HB@ H@@@@@@@@@@@DA@PH@@ HB@ HB@ @B@ HB@ HB@PDA@PH@@ HB@ HB@@HA@PDA@PDA@PDA@PH@@ HB |
|
861 |
@ H@@ DA@PDA@PDA@PDA@PH@@ HB@ @B@PDA@PDA@PDA@PDA@ @B@ HB@@HA@PDA@PDA@PDA@PH@@ HB@ H@@ HB@ HB@ DA@PDB@@HB@ HB@ @@@@@@@@@@ |
|
862 |
@PDA@ @B@ HB@ HB@ HB@ HB@ @A@PH@@ HB@ HB@ HB@ HB@ HB@@DB@@HB@ HB@ HB@ HB@ HB@ H@@ @B@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB |
|
863 |
@ HB@ HB@ HB@@HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @a') ; colorMapFromArray:#[0 0 0 100 128 255 128 128 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@D@@@F@H@G@@@G @@G0@O?8AO?<@O?>@O??@O??DO?>DO?<@O?8@@G0@@G @@G@@@F@@@D@J@@@@') ; yourself); yourself] |
|
3892 | 864 |
! |
865 |
||
4094 | 866 |
rightArrowIcon |
867 |
^ self rightArrow20x20Icon |
|
868 |
! |
|
869 |
||
3892 | 870 |
rightArrowPlusMenu |
871 |
"This resource specification was automatically generated |
|
872 |
by the ImageEditor of ST/X." |
|
873 |
||
874 |
"Do not manually edit this!! If it is corrupted, |
|
875 |
the ImageEditor may not be able to read the specification." |
|
876 |
||
877 |
" |
|
878 |
self rightArrowPlusMenu inspect |
|
879 |
ImageEditor openOnClass:self andSelector:#rightArrowPlusMenu |
|
880 |
" |
|
881 |
||
882 |
<resource: #image> |
|
883 |
||
884 |
^Icon |
|
4414 | 885 |
constantNamed:#'AbstractFileBrowser class rightArrowPlusMenu' |
886 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 887 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
888 |
@@@@@@@@@@@@@@@@@@@@@0PB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PTF@ @@@@@@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@@@@@@A@PDA@PDH@P\I |
|
889 |
@@XB@@@@@@@@@@@@@@@AA0(@@@@@B ,LB @D@ @@@@@@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@@@@@@@@M@@TTEQLQE!!\WD 0K@@PB@@@@@@@@@@@MB <W |
|
890 |
E1\WD!!\WD!!LYDQ(B@@@@@@@@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@@@@@@AA!!(ZF!!(ZE1H^FQDZ@ @@@@@@@@@@@@@A@ HB@ HB@1DYDQ(B@@@@@@@@@@@@ |
|
891 |
@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@@@@@@@0PZ@ @@@@@@@@@@@@@@@@@@@@@@@@@@@Q(B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@0H@@@@@@@@@ |
|
892 |
@@@@@@@@@@@@@@@@@@@@@P@@@@@@@@@B@ HB@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@ @@@@@@@@@@@@@@@@@@ |
|
893 |
@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 0 64 96 32 128 160 128 160 192 32 96 128 128 192 192 0 64 64 160 192 192 192 224 224 160 192 224 96 192 224 32 64 96 160 224 224 128 192 224 96 160 192 0 160 192 0 128 192 64 192 192 64 160 192 96 192 192 32 160 192 0 128 160 192 192 192 64 224 224 0 96 128 32 192 192 64 192 224 0 192 224 0 192 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@D@@@F@@@G@@@G @@G0@O?8@O?<@O?>@O??@O??@O?>@O?<@O?8@@G0@@G @@G@@@F@@@DA?@@@>@@@\@@@H@@@@') ; yourself); yourself] |
|
894 |
! |
|
895 |
||
896 |
rightArrowPlusMenu20x20Icon |
|
897 |
"This resource specification was automatically generated |
|
898 |
by the ImageEditor of ST/X." |
|
899 |
||
900 |
"Do not manually edit this!! If it is corrupted, |
|
901 |
the ImageEditor may not be able to read the specification." |
|
902 |
||
903 |
" |
|
904 |
self rightArrowPlusMenu20x20Icon inspect |
|
905 |
ImageEditor openOnClass:self andSelector:#rightArrowPlusMenu20x20Icon |
|
906 |
Icon flushCachedIcons |
|
907 |
" |
|
908 |
||
909 |
<resource: #image> |
|
910 |
||
911 |
^Icon |
|
4414 | 912 |
constantNamed:#'AbstractFileBrowser class rightArrowPlusMenu20x20Icon' |
913 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 914 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@@@@@@@@@@@@@@@@CA@H@@@@@@@@@@@@@@@@@@@@@@@DE |
915 |
A H@@@@@@@@@@@@@@@@@@@@@@0\@A@H@@@@@@@@@@@DA@PDA@P AA0$@A H@@@@@@@@@@P\J@@@@@@(KC@(@A@H@@@@@@@@MB \NB ,ODADRD0(@A H@@@@@ |
|
916 |
@@4@AQPUD1DVE1\RC@,@A@H@@@@@CP(OE1\WE1HWE1HSFQDZ@ @@@@@AB <[D10[GQ8QG!!$QF H@@@@@@@DFF!!(ZF!!(WD!!8YDQ(B@@@@@@@@@PHB@ HB@ LQ |
|
917 |
FQDZ@ @@@@@@@@@@@@@@@@@@@QXQF H@@@@@@@@@@@@@@@@@@@@CAA(B@@@@@@@@@@@@@@@@@@@@@@DZ@ @@@ HB@ HB@ @@@@@@@@@@@0H@@@@@@ HB@ H@ |
|
918 |
@@@@@@@@@@@A@@@@@@@@@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@a') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 0 64 96 32 128 160 128 160 192 32 96 128 128 192 192 0 64 64 160 192 192 192 224 224 160 192 224 96 192 224 32 64 96 160 224 224 128 192 224 96 160 192 0 160 192 0 128 192 64 192 192 64 160 192 96 192 192 32 160 192 0 128 160 192 192 192 64 224 224 0 96 128 32 192 192 64 192 224 0 192 224 0 192 192]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@H@@@L@@@N@@@O@@@O @_?0@_?8@_?<@_?>@_?>@_?<@_?8@_?0@@O @@O@@@N_0@LO @HG@@@B@') ; yourself); yourself] |
|
919 |
! |
|
920 |
||
921 |
rightIcon |
|
922 |
"This resource specification was automatically generated |
|
923 |
by the ImageEditor of ST/X." |
|
924 |
||
925 |
"Do not manually edit this!! If it is corrupted, |
|
926 |
the ImageEditor may not be able to read the specification." |
|
927 |
||
928 |
" |
|
929 |
self rightIcon inspect |
|
930 |
ImageEditor openOnClass:self andSelector:#rightIcon |
|
931 |
" |
|
932 |
||
933 |
<resource: #image> |
|
934 |
||
935 |
^Icon |
|
4414 | 936 |
constantNamed:#'AbstractFileBrowser class rightIcon' |
937 |
ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 938 |
UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUTIUUUUUUUUB%UEUUUUUP*EP@@@@@@J)T@@@@@@B*%B******* |
939 |
*P********(J********B********P********PEUUUUUV*QEUUUUUP*PUUUUUUTJQUUUUUUUBQUUUUUUUPQUUUUUUUPAUUUUUUUTUUUUUUUUUUUUUUUUUUU |
|
940 |
UUUUUUUUUUUUUUUUUUUUUP@a') ; colorMapFromArray:#[255 255 255 0 0 0 50 50 100 255 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
941 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@C@@@@@8@@@@O@@@@C8A????@_???8G????A????0_???<G???>A????@@@@O @@@C0@@@@8@@@@L@@@@ |
|
942 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; yourself); yourself] |
|
943 |
! |
|
944 |
||
945 |
searchIcon |
|
946 |
<resource: #programImage> |
|
947 |
||
4094 | 948 |
^ ToolbarIconLibrary search20x20Icon "/ search28x28Icon |
949 |
"/ ^ ToolbarIconLibrary search16x16Icon "/ search28x28Icon |
|
3892 | 950 |
! |
951 |
||
952 |
shellIcon |
|
953 |
<resource: #programImage> |
|
954 |
||
955 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
4414 | 956 |
^ ToolbarIconLibrary dos20x20Icon |
3892 | 957 |
]. |
958 |
^ ToolbarIconLibrary shell20x20Icon |
|
959 |
! |
|
960 |
||
4094 | 961 |
shellWithoutTextIcon |
962 |
<resource: #programImage> |
|
963 |
||
964 |
OperatingSystem isMSDOSlike ifTrue:[ |
|
4414 | 965 |
^ ToolbarIconLibrary dosWithoutText20x20Icon |
4094 | 966 |
]. |
967 |
^ ToolbarIconLibrary shellWithoutText20x20Icon |
|
968 |
! |
|
969 |
||
3892 | 970 |
upArrow |
971 |
"This resource specification was automatically generated |
|
972 |
by the ImageEditor of ST/X." |
|
973 |
||
974 |
"Do not manually edit this!! If it is corrupted, |
|
975 |
the ImageEditor may not be able to read the specification." |
|
976 |
||
977 |
" |
|
978 |
self upArrow inspect |
|
979 |
ImageEditor openOnClass:self andSelector:#upArrow |
|
980 |
" |
|
981 |
||
982 |
<resource: #image> |
|
983 |
||
984 |
^Icon |
|
4414 | 985 |
constantNamed:#'AbstractFileBrowser class upArrow' |
986 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 987 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
988 |
@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@@@@@@DFA0 DAP@@@@@@@@@@@@@@@@@@@@@@@P$@A0(HA@T@@@@@@@@@@@@@@@@@@@@AB0@@C@4N |
|
989 |
C0PE@@@@@@@@@@@@@@@@@@DF@@@LB@ MD@<DAP@@@@@@@@@@@@@@@PLGDQHHD1LHE@8UA@H@@@@@@@@@@@@AE!!\XA@<SD1LHEPPYF DB@@@@@@@@@@D\@Q0A |
|
990 |
GA4OD1LJEPD\@Q0A@ @@@@@@@@@@@@@@@!!8^C1T_A@T@@@@@@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@@@@@@E @GDQT_A@T@@@@@@@@@@@@@ |
|
991 |
@@@@@@@@@P@!!H!!TJA@T@@@@@@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@@@@@@@QXXFPPDF H@@@@@@@@@@@@@@@@@@@@@@ TEAPTE@ H@@@@@ |
|
992 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
|
993 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 96 128 160 0 96 128 0 0 32 128 160 192 192 224 224 0 160 192 128 128 160 32 192 192 128 160 160 96 192 224 0 192 224 32 192 224 32 160 192 64 224 224 160 192 224 64 192 192 0 128 192 0 192 192 0 128 160 32 64 96 64 96 128 32 96 128 0 64 128 0 64 96 192 192 192 0 32 96 32 128 192 128 192 224 64 192 224 128 192 192 160 224 224 96 192 192 96 160 192 64 160 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@F@@@O@@@_ @@?0@A?8@C?<@G?>@O??@_?? @?0@@?0@@?0@@?0@@?0@@?0@@?0@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself] |
|
994 |
! |
|
995 |
||
996 |
upArrow20x20Icon |
|
997 |
"This resource specification was automatically generated |
|
998 |
by the ImageEditor of ST/X." |
|
999 |
||
1000 |
"Do not manually edit this!! If it is corrupted, |
|
1001 |
the ImageEditor may not be able to read the specification." |
|
1002 |
||
1003 |
" |
|
1004 |
self upArrow20x20Icon inspect |
|
1005 |
ImageEditor openOnClass:self andSelector:#upArrow20x20Icon |
|
1006 |
Icon flushCachedIcons |
|
1007 |
" |
|
1008 |
||
1009 |
<resource: #image> |
|
1010 |
||
1011 |
^Icon |
|
4414 | 1012 |
constantNamed:#'AbstractFileBrowser class upArrow20x20Icon' |
1013 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
4093 | 1014 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @@@ HB@ HB@ HB@ HB@ HB@ H@@ H@@ HB@ HB@ HB@ HB@ HB@@HA |
1015 |
@PH@@ HB@ HB@ HB@ HB@ @B@PDA@PH@@ HB@ HB@ HB@ H@@ DA@PDA@PH@@ HB@ HB@ HB@@HA@PDA@PDA@PH@@ HB@ HB@ @B@PDA@PDA@PDA@PH@@ HB |
|
1016 |
@ H@@ DA@PDA@PDA@PDA@PH@@ HB@@@@@@@@@ DA@PDB@@@@@@@@@ HB@ HB@ @B@PDA@PH@@ HB@ HB@ HB@ HB@@HA@PDA@ @B@ HB@ HB@ HB@ H@@ DA |
|
1017 |
@PDB@@HB@ HB@ HB@ HB@ @B@PDA@PH@@ HB@ HB@ HB@ HB@@HA@PDA@ @B@ HB@ HB@ HB@ H@@ HB@ HB@@HB@ HB@ HB@ HB@ @@@@@@@@@@@ HB@ HB |
|
1018 |
@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ HB@ @a') ; colorMapFromArray:#[0 0 0 100 128 255 128 128 128]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@J@@@@@F@@@O@@@_ O@?0@A?8@C?<@G?>@O??E_??(@?0@@?0@@?0N@?0A@?0@@?0@@?0K@@@A@@@@') ; yourself); yourself] |
|
4084 | 1019 |
! |
1020 |
||
1021 |
upArrow20x20IconOld |
|
1022 |
"This resource specification was automatically generated |
|
1023 |
by the ImageEditor of ST/X." |
|
1024 |
||
1025 |
"Do not manually edit this!! If it is corrupted, |
|
1026 |
the ImageEditor may not be able to read the specification." |
|
1027 |
||
1028 |
" |
|
1029 |
self upArrow20x20IconOld inspect |
|
1030 |
ImageEditor openOnClass:self andSelector:#upArrow20x20IconOld |
|
1031 |
Icon flushCachedIcons |
|
1032 |
" |
|
1033 |
||
1034 |
<resource: #image> |
|
1035 |
||
1036 |
^Icon |
|
4414 | 1037 |
constantNamed:#'AbstractFileBrowser class upArrow20x20IconOld' |
1038 |
ifAbsentPut:[(Depth8Image new) width: 20; height: 20; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 1039 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DB@@@@@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@PXG |
1040 |
B@PE@@@@@@@@@@@@@@@@@@DI@@\JB@PE@@@@@@@@@@@@@@@AB0@@C@4NC0PE@@@@@@@@@@@@@PX@@@0HB@4PC0PE@@@@@@@@@@DCA1DRBALSBAPNEPPB@@@@ |
|
1041 |
@@@AE!!\XA@<SD1LHEPPYF DB@@@@@Q0AG@D\GP<SD0(U@Q0AG@DB@@@@@@@@@@H^G <UG0PE@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@V@@\Q |
|
1042 |
EQ<DAP@@@@@@@@@@@@@@@@D@HRHUB PE@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@AE!! YA@PZ@ @@@@@@@@@@@@@@@@HEAPTEAPHB@@@@@@@@ |
|
1043 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 96 128 160 0 96 128 0 0 32 128 160 192 192 224 224 0 160 192 128 128 160 32 192 192 128 160 160 96 192 224 0 192 224 32 192 224 32 160 192 64 224 224 160 192 224 64 192 192 0 128 192 0 192 192 0 128 160 32 64 96 64 96 128 32 96 128 0 64 128 0 64 96 192 192 192 0 32 96 32 128 192 128 192 224 64 192 224 128 192 192 160 224 224 96 192 192 96 160 192 64 160 192]; mask:((Depth1Image new) width: 20; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@F@@@O@@@_ @@?0@A?8@C?<@G?>@O??@_?? @?0@@?0@@?0@@?0@@?0@@?0@@?0@@@@@@@@@') ; yourself); yourself] |
|
1044 |
! |
|
1045 |
||
4094 | 1046 |
upArrowIcon |
1047 |
^ self upArrow20x20Icon |
|
1048 |
! |
|
1049 |
||
3892 | 1050 |
upArrowPlusMenu |
1051 |
"This resource specification was automatically generated |
|
1052 |
by the ImageEditor of ST/X." |
|
1053 |
||
1054 |
"Do not manually edit this!! If it is corrupted, |
|
1055 |
the ImageEditor may not be able to read the specification." |
|
1056 |
||
1057 |
" |
|
1058 |
self upArrowPlusMenu inspect |
|
1059 |
ImageEditor openOnClass:self andSelector:#upArrowPlusMenu |
|
1060 |
" |
|
1061 |
||
1062 |
<resource: #image> |
|
1063 |
||
1064 |
^Icon |
|
4414 | 1065 |
constantNamed:#'AbstractFileBrowser class upArrowPlusMenu' |
1066 |
ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
3892 | 1067 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@PH@@@@@@@@@ |
1068 |
@@@@@@@@@@@@@@@@@@@A@0PE@@@@@@@@@@@@@@@@@@@@@@@@@@DFA0 DAP@@@@@@@@@@@@@@@@@@@@@@@P$@A0(HA@T@@@@@@@@@@@@@@@@@@@@AB0@@C@4N |
|
1069 |
C0PE@@@@@@@@@@@@@@@@@@DF@@@LB@ MD@<DAP@@@@@@@@@@@@@@@PLGDQHHD1LHE@8UA@H@@@@@@@@@@@@AE!!\XA@<SD1LHEPPYF DB@@@@@@@@@@D\@Q0A |
|
1070 |
GA4OD1LJEPD\@Q0A@ @@@@@@@@@@@@@@@!!8^C1T_A@T@@@@@@@@@@@@@@@@@@@@@E @GHATRA@T@@@@@@@@@@@@@@@@@@@@@E @GDQT_A@T@@@@@@@@@@@@@ |
|
1071 |
@@@@@@@@@P@!!H!!TJA@T@@@@@@@@@@@@@@@@@@@@@@P\#IATTA@T@@@@@@@@@@@@@@@@@@@@@@QXXFPPDF H@@@@@@@@@@@@@@@@@@@@@@ TEAPTE@ H@@@@@ |
|
1072 |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B@ HB@ HB@@@@@@@@@@@@@@@@@@@@@@@@@ HB@ H@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@ @@@@@@@@@@@@@@@@@@ |
|
1073 |
@@@@@@@@@@@B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[224 224 224 0 32 64 0 0 0 96 128 160 0 96 128 0 0 32 128 160 192 192 224 224 0 160 192 128 128 160 32 192 192 128 160 160 96 192 224 0 192 224 32 192 224 32 160 192 64 224 224 160 192 224 64 192 192 0 128 192 0 192 192 0 128 160 32 64 96 64 96 128 32 96 128 0 64 128 0 64 96 192 192 192 0 32 96 32 128 192 128 192 224 64 192 224 128 192 192 160 224 224 96 192 192 96 160 192 64 160 192]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@F@@@O@@@_ @@?0@A?8@C?<@G?>@O??@_?? @?0@@?0@@?0@@?0@@?0@@?0@@?0@@@A?@@@>@@@\@@@H@@@@') ; yourself); yourself] |
|
1074 |
! |
|
1075 |
||
1076 |
vt100Terminal |
|
1077 |
<resource: #programImage> |
|
1078 |
||
1079 |
^ ToolbarIconLibrary shell20x20Icon |
|
1080 |
! ! |
|
1081 |
||
1082 |
!AbstractFileBrowser class methodsFor:'menu specs'! |
|
1083 |
||
1084 |
baseBookmarksMenuSpec |
|
1085 |
"This resource specification was automatically generated |
|
1086 |
by the MenuEditor of ST/X." |
|
1087 |
||
1088 |
"Do not manually edit this!! If it is corrupted, |
|
1089 |
the MenuEditor may not be able to read the specification." |
|
1090 |
||
1091 |
" |
|
1092 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#baseBookmarksMenuSpec |
|
1093 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser baseBookmarksMenuSpec)) startUp |
|
1094 |
" |
|
1095 |
||
1096 |
<resource: #menu> |
|
1097 |
||
1098 |
^ |
|
1099 |
#(#Menu |
|
4414 | 1100 |
#( |
1101 |
#(#MenuItem |
|
1102 |
#label: 'Add Bookmark' |
|
1103 |
#translateLabel: true |
|
1104 |
#value: #addBookmark |
|
1105 |
#enabled: #currentFilesHasDirectories |
|
1106 |
) |
|
1107 |
#(#MenuItem |
|
1108 |
#label: 'Remove Bookmark' |
|
1109 |
#translateLabel: true |
|
1110 |
#value: #removeBookmark |
|
1111 |
#enabled: #hasBookmarksToRemove |
|
1112 |
) |
|
1113 |
) |
|
1114 |
nil |
|
1115 |
nil |
|
3892 | 1116 |
) |
1117 |
! |
|
1118 |
||
4110 | 1119 |
browserMenu |
1120 |
"This resource specification was automatically generated |
|
1121 |
by the MenuEditor of ST/X." |
|
1122 |
||
1123 |
"Do not manually edit this!! If it is corrupted, |
|
1124 |
the MenuEditor may not be able to read the specification." |
|
1125 |
||
1126 |
" |
|
1127 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#browserMenu |
|
1128 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser browserMenu)) startUp |
|
1129 |
" |
|
1130 |
||
1131 |
<resource: #menu> |
|
1132 |
||
1133 |
^ |
|
1134 |
#(#Menu |
|
4201 | 1135 |
#( |
1136 |
#(#MenuItem |
|
1137 |
#label: 'Spawn' |
|
1138 |
#itemValue: #doSpawn |
|
1139 |
#translateLabel: true |
|
1140 |
) |
|
1141 |
#(#MenuItem |
|
4317
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
1142 |
#label: 'Settings...' |
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
1143 |
#itemValue: #doOpenSettings |
4201 | 1144 |
#translateLabel: true |
1145 |
) |
|
1146 |
#(#MenuItem |
|
1147 |
#label: '-' |
|
1148 |
) |
|
1149 |
#(#MenuItem |
|
4392 | 1150 |
#label: 'New Text Editor' |
1151 |
#itemValue: #newTextEditor |
|
1152 |
#translateLabel: true |
|
1153 |
) |
|
1154 |
#(#MenuItem |
|
4201 | 1155 |
#label: 'Search Files' |
1156 |
#itemValue: #doOpenSearchFile |
|
1157 |
#translateLabel: true |
|
1158 |
) |
|
1159 |
#(#MenuItem |
|
1160 |
#label: 'Shell Terminal' |
|
1161 |
#itemValue: #doAddTerminal |
|
1162 |
#translateLabel: true |
|
1163 |
) |
|
1164 |
#(#MenuItem |
|
1165 |
#label: '-' |
|
1166 |
) |
|
1167 |
#(#MenuItem |
|
1168 |
#label: 'Exit' |
|
1169 |
#itemValue: #closeRequest |
|
1170 |
#translateLabel: true |
|
1171 |
) |
|
1172 |
) |
|
1173 |
nil |
|
1174 |
nil |
|
4110 | 1175 |
) |
1176 |
! |
|
1177 |
||
4107 | 1178 |
cvsMenu |
1179 |
"This resource specification was automatically generated |
|
1180 |
by the MenuEditor of ST/X." |
|
1181 |
||
1182 |
"Do not manually edit this!! If it is corrupted, |
|
1183 |
the MenuEditor may not be able to read the specification." |
|
1184 |
||
1185 |
" |
|
1186 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#cvsMenu |
|
1187 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser cvsMenu)) startUp |
|
1188 |
" |
|
1189 |
||
1190 |
<resource: #menu> |
|
1191 |
||
1192 |
^ |
|
1193 |
#(#Menu |
|
4414 | 1194 |
#( |
1195 |
#(#MenuItem |
|
1196 |
#enabled: #hasSelection |
|
1197 |
#label: 'Update selected Files/Directories' |
|
1198 |
#itemValue: #cvsUpdateSelection |
|
1199 |
#translateLabel: true |
|
1200 |
) |
|
1201 |
#(#MenuItem |
|
1202 |
#label: 'Update Directory Local' |
|
1203 |
#itemValue: #cvsUpdateAll |
|
1204 |
#translateLabel: true |
|
1205 |
) |
|
1206 |
#(#MenuItem |
|
1207 |
#label: 'Update Directory Recursive' |
|
1208 |
#itemValue: #cvsUpdateAllRecursive |
|
1209 |
#translateLabel: true |
|
1210 |
) |
|
1211 |
#(#MenuItem |
|
1212 |
#label: '-' |
|
1213 |
) |
|
1214 |
#(#MenuItem |
|
1215 |
#label: 'Commit...' |
|
1216 |
#itemValue: #cvsCommit |
|
1217 |
#translateLabel: true |
|
1218 |
) |
|
1219 |
#(#MenuItem |
|
1220 |
#enabled: #canCvsAddAndCommit |
|
1221 |
#label: 'Add && Commit...' |
|
1222 |
#itemValue: #cvsAddAndCommit |
|
1223 |
#translateLabel: true |
|
1224 |
) |
|
1225 |
#(#MenuItem |
|
1226 |
#label: '-' |
|
1227 |
) |
|
1228 |
#(#MenuItem |
|
1229 |
#enabled: #canRemoveCVSContainer |
|
1230 |
#label: 'Remove File && CVS Container...' |
|
1231 |
#itemValue: #cvsRemoveFileAndCVSContainer |
|
1232 |
#translateLabel: true |
|
1233 |
) |
|
1234 |
) |
|
1235 |
nil |
|
1236 |
nil |
|
4107 | 1237 |
) |
1238 |
! |
|
1239 |
||
3892 | 1240 |
directoryMenu |
1241 |
"This resource specification was automatically generated |
|
1242 |
by the MenuEditor of ST/X." |
|
1243 |
||
1244 |
"Do not manually edit this!! If it is corrupted, |
|
1245 |
the MenuEditor may not be able to read the specification." |
|
1246 |
||
1247 |
" |
|
1248 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#directoryMenu |
|
1249 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser directoryMenu)) startUp |
|
1250 |
" |
|
1251 |
||
1252 |
<resource: #menu> |
|
1253 |
||
1254 |
^ |
|
1255 |
#(#Menu |
|
4414 | 1256 |
#( |
1257 |
#(#MenuItem |
|
1258 |
#label: 'Up' |
|
1259 |
#translateLabel: true |
|
1260 |
#value: #doGoDirectoryUp |
|
1261 |
) |
|
1262 |
#(#MenuItem |
|
1263 |
#label: '-' |
|
1264 |
) |
|
1265 |
#(#MenuItem |
|
1266 |
#label: 'Back' |
|
1267 |
#translateLabel: true |
|
1268 |
#value: #doBack |
|
1269 |
#activeHelpKey: #directoryBack |
|
1270 |
#enabled: #enableBack |
|
1271 |
) |
|
1272 |
#(#MenuItem |
|
1273 |
#label: 'Forward' |
|
1274 |
#translateLabel: true |
|
1275 |
#value: #doForward |
|
1276 |
#activeHelpKey: #directoryBack |
|
1277 |
#enabled: #enableForward |
|
1278 |
) |
|
1279 |
#(#MenuItem |
|
1280 |
#label: '-' |
|
1281 |
) |
|
1282 |
#(#MenuItem |
|
1283 |
#label: 'Default' |
|
1284 |
#translateLabel: true |
|
1285 |
#value: #doGotoDefaultDirectory |
|
1286 |
) |
|
1287 |
#(#MenuItem |
|
1288 |
#label: 'Home' |
|
1289 |
#translateLabel: true |
|
1290 |
#value: #doGotoHomeDirectory |
|
1291 |
) |
|
1292 |
#(#MenuItem |
|
1293 |
#label: 'Visited Directories' |
|
1294 |
#translateLabel: true |
|
1295 |
#submenuChannel: #visitedDirectoriesMenu |
|
1296 |
) |
|
1297 |
#(#MenuItem |
|
1298 |
#label: 'Bookmarks' |
|
1299 |
#translateLabel: true |
|
1300 |
#submenuChannel: #bookmarksMenuSpec |
|
1301 |
) |
|
1302 |
) |
|
1303 |
nil |
|
1304 |
nil |
|
3892 | 1305 |
) |
1306 |
! |
|
1307 |
||
1308 |
editMenu |
|
1309 |
"This resource specification was automatically generated |
|
1310 |
by the MenuEditor of ST/X." |
|
1311 |
||
1312 |
"Do not manually edit this!! If it is corrupted, |
|
1313 |
the MenuEditor may not be able to read the specification." |
|
1314 |
||
1315 |
" |
|
1316 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#editMenu |
|
1317 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser editMenu)) startUp |
|
1318 |
" |
|
1319 |
||
1320 |
<resource: #menu> |
|
1321 |
||
1322 |
^ |
|
1323 |
#(#Menu |
|
4414 | 1324 |
#( |
1325 |
#(#MenuItem |
|
1326 |
#label: 'Copy' |
|
1327 |
#translateLabel: true |
|
4453
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
1328 |
#value: #copyFiles |
4414 | 1329 |
#enabled: #hasSelection |
1330 |
) |
|
1331 |
#(#MenuItem |
|
1332 |
#label: 'Cut' |
|
1333 |
#translateLabel: true |
|
4453
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
1334 |
#value: #cutFiles |
4414 | 1335 |
#enabled: #hasSelection |
1336 |
) |
|
1337 |
#(#MenuItem |
|
1338 |
#label: 'Paste' |
|
1339 |
#translateLabel: true |
|
1340 |
#value: #pasteFiles |
|
1341 |
#enabled: #canPaste |
|
1342 |
) |
|
1343 |
#(#MenuItem |
|
1344 |
#label: 'Delete' |
|
1345 |
#translateLabel: true |
|
4453
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
1346 |
#value: #deleteFiles |
4414 | 1347 |
#enabled: #hasSelection |
1348 |
) |
|
1349 |
#(#MenuItem |
|
1350 |
#label: '-' |
|
1351 |
) |
|
1352 |
#(#MenuItem |
|
1353 |
#label: 'Copy All Filenames' |
|
1354 |
#translateLabel: true |
|
1355 |
#value: #copyFileList |
|
1356 |
#enabled: #fileListIsNotEmpty |
|
1357 |
) |
|
1358 |
#(#MenuItem |
|
1359 |
#label: 'Copy Selected Filenames' |
|
1360 |
#translateLabel: true |
|
1361 |
#value: #copySelectedFilenames |
|
1362 |
#enabled: #hasSelection |
|
1363 |
) |
|
1364 |
) |
|
1365 |
nil |
|
1366 |
nil |
|
3892 | 1367 |
) |
1368 |
! |
|
1369 |
||
1370 |
fileMenu |
|
1371 |
"This resource specification was automatically generated |
|
1372 |
by the MenuEditor of ST/X." |
|
1373 |
||
1374 |
"Do not manually edit this!! If it is corrupted, |
|
1375 |
the MenuEditor may not be able to read the specification." |
|
1376 |
||
1377 |
" |
|
1378 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#fileMenu |
|
1379 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser fileMenu)) startUp |
|
1380 |
" |
|
1381 |
||
1382 |
<resource: #menu> |
|
1383 |
||
1384 |
^ |
|
1385 |
#(#Menu |
|
4414 | 1386 |
#( |
1387 |
#(#MenuItem |
|
1388 |
#label: 'New' |
|
1389 |
#translateLabel: true |
|
1390 |
#submenuChannel: #newMenu |
|
1391 |
) |
|
1392 |
#(#MenuItem |
|
4531 | 1393 |
#enabled: #hasSelection |
4414 | 1394 |
#label: 'Rename' |
4531 | 1395 |
#itemValue: #renameSelection |
4414 | 1396 |
#translateLabel: true |
4531 | 1397 |
#shortcutKey: #Replace |
4414 | 1398 |
) |
1399 |
#(#MenuItem |
|
1400 |
#label: '-' |
|
1401 |
) |
|
1402 |
#(#MenuItem |
|
4531 | 1403 |
#enabled: #hasSelection |
1404 |
#label: 'Properties...' |
|
1405 |
#itemValue: #doShowProperties |
|
4414 | 1406 |
#translateLabel: true |
1407 |
) |
|
1408 |
#(#MenuItem |
|
4531 | 1409 |
#label: 'Truncate' |
1410 |
#itemValue: #truncateSelectedFilesToZeroSize |
|
4414 | 1411 |
#translateLabel: true |
4531 | 1412 |
) |
1413 |
#(#MenuItem |
|
1414 |
#label: '-' |
|
1415 |
) |
|
1416 |
#(#MenuItem |
|
1417 |
#label: 'Edit' |
|
1418 |
#itemValue: #doShowFileContents |
|
1419 |
#translateLabel: true |
|
4414 | 1420 |
) |
1421 |
#(#MenuItem |
|
1422 |
#label: '-' |
|
1423 |
#isVisible: #javaSupportLoaded |
|
1424 |
) |
|
1425 |
#(#MenuItem |
|
4531 | 1426 |
#enabled: #hasSelection |
4414 | 1427 |
#label: 'File in' |
4531 | 1428 |
#itemValue: #fileFileIn |
4414 | 1429 |
#translateLabel: true |
1430 |
) |
|
1431 |
#(#MenuItem |
|
4531 | 1432 |
#enabled: #hasSelection |
4414 | 1433 |
#label: 'File in to Namespace...' |
4531 | 1434 |
#itemValue: #fileFileInToNameSpace |
4414 | 1435 |
#translateLabel: true |
1436 |
) |
|
1437 |
#(#MenuItem |
|
1438 |
#label: '-' |
|
1439 |
#isVisible: #javaSupportLoaded |
|
1440 |
) |
|
1441 |
#(#MenuItem |
|
4531 | 1442 |
#enabled: #canAddToClassPath |
4414 | 1443 |
#label: 'Add to Java Class Path' |
1444 |
#translateLabel: true |
|
1445 |
#isVisible: #javaSupportLoaded |
|
1446 |
) |
|
1447 |
#(#MenuItem |
|
4531 | 1448 |
#enabled: #canRemoveFromClassPath |
4414 | 1449 |
#label: 'Remove from Java Class Path' |
1450 |
#translateLabel: true |
|
1451 |
#isVisible: #javaSupportLoaded |
|
1452 |
) |
|
1453 |
#(#MenuItem |
|
4531 | 1454 |
#enabled: #canAddToSourcePath |
4414 | 1455 |
#label: 'Add to Java Source Path' |
1456 |
#translateLabel: true |
|
1457 |
#isVisible: #javaSupportLoaded |
|
1458 |
) |
|
1459 |
#(#MenuItem |
|
4531 | 1460 |
#enabled: #canRemoveFromSourcePath |
4414 | 1461 |
#label: 'Remove from Java Source Path' |
1462 |
#translateLabel: true |
|
1463 |
#isVisible: #javaSupportLoaded |
|
1464 |
) |
|
1465 |
) |
|
1466 |
nil |
|
1467 |
nil |
|
3892 | 1468 |
) |
1469 |
! |
|
1470 |
||
1471 |
newMenu |
|
1472 |
"This resource specification was automatically generated |
|
1473 |
by the MenuEditor of ST/X." |
|
1474 |
||
1475 |
"Do not manually edit this!! If it is corrupted, |
|
1476 |
the MenuEditor may not be able to read the specification." |
|
1477 |
||
1478 |
" |
|
1479 |
MenuEditor new openOnClass:DirectoryTreeBrowser andSelector:#newMenu |
|
1480 |
(Menu new fromLiteralArrayEncoding:(DirectoryTreeBrowser newMenu)) startUp |
|
1481 |
" |
|
1482 |
||
1483 |
<resource: #menu> |
|
1484 |
||
1485 |
^ |
|
1486 |
#(#Menu |
|
4414 | 1487 |
#( |
1488 |
#(#MenuItem |
|
1489 |
#label: 'Directory...' |
|
1490 |
#translateLabel: true |
|
1491 |
#value: #newDirectory |
|
1492 |
) |
|
1493 |
#(#MenuItem |
|
1494 |
#label: 'File...' |
|
1495 |
#translateLabel: true |
|
1496 |
#value: #newFile |
|
1497 |
) |
|
1498 |
#(#MenuItem |
|
1499 |
#label: 'Hard Link...' |
|
1500 |
#translateLabel: true |
|
1501 |
#isVisible: #systemIsUnix |
|
1502 |
#value: #newHardLink |
|
1503 |
) |
|
1504 |
#(#MenuItem |
|
1505 |
#label: 'Symbolic Link...' |
|
1506 |
#translateLabel: true |
|
1507 |
#isVisible: #systemIsUnix |
|
1508 |
#value: #newSoftLink |
|
1509 |
) |
|
1510 |
) |
|
1511 |
nil |
|
1512 |
nil |
|
3892 | 1513 |
) |
3906 | 1514 |
! |
1515 |
||
4201 | 1516 |
showMenuSpec |
1517 |
"This resource specification was automatically generated |
|
1518 |
by the MenuEditor of ST/X." |
|
1519 |
||
1520 |
"Do not manually edit this!! If it is corrupted, |
|
1521 |
the MenuEditor may not be able to read the specification." |
|
1522 |
||
1523 |
" |
|
1524 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#showMenuSpec |
|
1525 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser showMenuSpec)) startUp |
|
1526 |
" |
|
1527 |
||
1528 |
<resource: #menu> |
|
1529 |
||
1530 |
^ |
|
1531 |
#(#Menu |
|
1532 |
#( |
|
1533 |
#(#MenuItem |
|
1534 |
#label: 'Hidden Files' |
|
1535 |
#translateLabel: true |
|
1536 |
#indication: #showHiddenFiles |
|
1537 |
) |
|
1538 |
#(#MenuItem |
|
1539 |
#label: '-' |
|
1540 |
) |
|
1541 |
#(#MenuItem |
|
1542 |
#label: 'Directory Tree' |
|
1543 |
#translateLabel: true |
|
1544 |
#indication: #showDirectoryTree |
|
1545 |
) |
|
1546 |
#(#MenuItem |
|
1547 |
#label: 'Regular Files in TreeView (Left)' |
|
1548 |
#translateLabel: true |
|
1549 |
#indication: #viewFilesInDirectoryTree |
|
1550 |
) |
|
1551 |
#(#MenuItem |
|
1552 |
#label: 'Directories in ContentsView (Right)' |
|
1553 |
#translateLabel: true |
|
1554 |
#indication: #viewDirsInContentsBrowser |
|
1555 |
) |
|
1556 |
#(#MenuItem |
|
1557 |
#enabled: #enableViewNoteBookApplication |
|
1558 |
#label: 'File Applications' |
|
1559 |
#translateLabel: true |
|
1560 |
#indication: #viewNoteBookApplicationHolder |
|
1561 |
) |
|
1562 |
) |
|
1563 |
nil |
|
1564 |
nil |
|
1565 |
) |
|
1566 |
! |
|
1567 |
||
3906 | 1568 |
sortMenu |
1569 |
"This resource specification was automatically generated |
|
1570 |
by the MenuEditor of ST/X." |
|
1571 |
||
1572 |
"Do not manually edit this!! If it is corrupted, |
|
1573 |
the MenuEditor may not be able to read the specification." |
|
1574 |
||
1575 |
" |
|
3907 | 1576 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#sortMenu |
1577 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser sortMenu)) startUp |
|
3906 | 1578 |
" |
1579 |
||
1580 |
<resource: #menu> |
|
1581 |
||
1582 |
^ |
|
1583 |
#(#Menu |
|
4414 | 1584 |
#( |
1585 |
#(#MenuItem |
|
1586 |
#label: 'By Filename' |
|
1587 |
#translateLabel: true |
|
1588 |
#hideMenuOnActivated: false |
|
1589 |
#choice: #sortBlockProperty |
|
1590 |
#choiceValue: #baseName |
|
1591 |
) |
|
1592 |
#(#MenuItem |
|
1593 |
#label: 'By Type' |
|
1594 |
#translateLabel: true |
|
1595 |
#hideMenuOnActivated: false |
|
1596 |
#choice: #sortBlockProperty |
|
1597 |
#choiceValue: #suffix |
|
1598 |
) |
|
1599 |
#(#MenuItem |
|
1600 |
#label: 'By Permissions' |
|
1601 |
#translateLabel: true |
|
1602 |
#hideMenuOnActivated: false |
|
1603 |
#choice: #sortBlockProperty |
|
1604 |
#choiceValue: #permissions |
|
1605 |
) |
|
1606 |
#(#MenuItem |
|
1607 |
#label: 'By Owner' |
|
1608 |
#translateLabel: true |
|
1609 |
#isVisible: #viewOwner |
|
1610 |
#hideMenuOnActivated: false |
|
1611 |
#choice: #sortBlockProperty |
|
1612 |
#choiceValue: #owner |
|
1613 |
) |
|
1614 |
#(#MenuItem |
|
1615 |
#label: 'By Group' |
|
1616 |
#translateLabel: true |
|
1617 |
#isVisible: #viewOwner |
|
1618 |
#hideMenuOnActivated: false |
|
1619 |
#choice: #sortBlockProperty |
|
1620 |
#choiceValue: #group |
|
1621 |
) |
|
1622 |
#(#MenuItem |
|
1623 |
#label: 'By Size' |
|
1624 |
#translateLabel: true |
|
1625 |
#hideMenuOnActivated: false |
|
1626 |
#choice: #sortBlockProperty |
|
1627 |
#choiceValue: #fileSize |
|
1628 |
) |
|
1629 |
#(#MenuItem |
|
1630 |
#label: 'By Date && Time' |
|
1631 |
#translateLabel: true |
|
1632 |
#hideMenuOnActivated: false |
|
1633 |
#choice: #sortBlockProperty |
|
1634 |
#choiceValue: #modificationTime |
|
1635 |
) |
|
1636 |
#(#MenuItem |
|
1637 |
#label: '-' |
|
1638 |
) |
|
1639 |
#(#MenuItem |
|
1640 |
#label: 'Ignore Case in Sort' |
|
1641 |
#translateLabel: true |
|
1642 |
#hideMenuOnActivated: false |
|
1643 |
#indication: #sortCaseless |
|
1644 |
) |
|
1645 |
#(#MenuItem |
|
1646 |
#label: 'Directories before Files' |
|
1647 |
#translateLabel: true |
|
1648 |
#hideMenuOnActivated: false |
|
1649 |
#indication: #sortDirectoriesBeforeFiles |
|
1650 |
) |
|
1651 |
) |
|
1652 |
nil |
|
1653 |
nil |
|
3906 | 1654 |
) |
4018 | 1655 |
! |
1656 |
||
4164
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1657 |
toolsMenuSpec |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1658 |
"This resource specification was automatically generated |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1659 |
by the MenuEditor of ST/X." |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1660 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1661 |
"Do not manually edit this!! If it is corrupted, |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1662 |
the MenuEditor may not be able to read the specification." |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1663 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1664 |
" |
4367 | 1665 |
MenuEditor new openOnClass:AbstractFileBrowser andSelector:#toolsMenuSpec |
1666 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser toolsMenuSpec)) startUp |
|
4164
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1667 |
" |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1668 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1669 |
<resource: #menu> |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1670 |
|
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1671 |
^ |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1672 |
#(#Menu |
4230 | 1673 |
#( |
1674 |
#(#MenuItem |
|
1675 |
#label: 'Execute Command...' |
|
4367 | 1676 |
#itemValue: #doExecuteCommand |
4230 | 1677 |
#translateLabel: true |
1678 |
) |
|
1679 |
#(#MenuItem |
|
4367 | 1680 |
#enabled: #canDoTerminal |
4230 | 1681 |
#label: 'Shell Terminal' |
4367 | 1682 |
#itemValue: #openTerminal |
4230 | 1683 |
#translateLabel: true |
1684 |
#isVisible: #canDoTerminalAndSystemIsUnix |
|
1685 |
) |
|
1686 |
#(#MenuItem |
|
4367 | 1687 |
#enabled: #canDoTerminal |
4230 | 1688 |
#label: 'DOS Terminal' |
4367 | 1689 |
#itemValue: #openTerminal |
4230 | 1690 |
#translateLabel: true |
1691 |
#isVisible: #canDoTerminalAndSystemIsDOS |
|
1692 |
) |
|
1693 |
#(#MenuItem |
|
1694 |
#label: '-' |
|
1695 |
) |
|
1696 |
#(#MenuItem |
|
4367 | 1697 |
#enabled: #hasSelection |
4230 | 1698 |
#label: 'Changes Browser' |
4367 | 1699 |
#itemValue: #openChangesBrowser |
4230 | 1700 |
#translateLabel: true |
1701 |
) |
|
1702 |
#(#MenuItem |
|
4367 | 1703 |
#enabled: #hasSelection |
4230 | 1704 |
#label: 'ChangeSet Browser' |
4367 | 1705 |
#itemValue: #openChangeSetBrowser |
4230 | 1706 |
#translateLabel: true |
1707 |
) |
|
1708 |
#(#MenuItem |
|
4367 | 1709 |
#enabled: #hasSnapshotSelection |
4230 | 1710 |
#label: 'Snapshot Image Browser' |
4367 | 1711 |
#itemValue: #openSnapshotImageBrowser |
4230 | 1712 |
#translateLabel: true |
1713 |
) |
|
1714 |
#(#MenuItem |
|
4367 | 1715 |
#enabled: #canCreateNewProject |
4230 | 1716 |
#label: 'Create Smalltalk Project' |
4367 | 1717 |
#itemValue: #createProjectAndOpenProjectBrowser |
4230 | 1718 |
#translateLabel: true |
1719 |
) |
|
1720 |
#(#MenuItem |
|
4367 | 1721 |
#enabled: #canReadAbbrevFile |
4230 | 1722 |
#label: 'Install Autoloaded' |
4367 | 1723 |
#itemValue: #readAbbrevFile |
4230 | 1724 |
#translateLabel: true |
1725 |
) |
|
1726 |
#(#MenuItem |
|
4367 | 1727 |
#enabled: #anySTFilesPresent |
4230 | 1728 |
#label: 'Install all as Autoloaded' |
4367 | 1729 |
#itemValue: #installAllAsAutoloaded |
4230 | 1730 |
#translateLabel: true |
1731 |
) |
|
1732 |
#(#MenuItem |
|
4367 | 1733 |
#enabled: #hasSelection |
4230 | 1734 |
#label: 'Editor' |
4367 | 1735 |
#itemValue: #openEditor |
4230 | 1736 |
#translateLabel: true |
4367 | 1737 |
) |
1738 |
#(#MenuItem |
|
4230 | 1739 |
#enabled: #hasSelection |
4367 | 1740 |
#label: 'HTML Reader' |
1741 |
#itemValue: #openHTMLReader |
|
1742 |
#translateLabel: true |
|
4230 | 1743 |
) |
1744 |
#(#MenuItem |
|
4367 | 1745 |
#enabled: #hasASN1AndSelection |
4230 | 1746 |
#label: 'ASN1 Browser' |
4367 | 1747 |
#itemValue: #openASN1Browser |
4230 | 1748 |
#translateLabel: true |
1749 |
#isVisible: #hasASN1 |
|
1750 |
) |
|
1751 |
#(#MenuItem |
|
4367 | 1752 |
#enabled: #hasCBrowser |
4230 | 1753 |
#label: 'C Browser' |
4367 | 1754 |
#itemValue: #openCBrowser |
4230 | 1755 |
#translateLabel: true |
1756 |
#isVisible: #hasCBrowser |
|
1757 |
) |
|
1758 |
#(#MenuItem |
|
4367 | 1759 |
#enabled: #hasJavaAndSelection |
4230 | 1760 |
#label: 'Applet Viewer' |
4367 | 1761 |
#itemValue: #openAppletViewer |
4230 | 1762 |
#translateLabel: true |
1763 |
#isVisible: #hasJava |
|
1764 |
) |
|
1765 |
#(#MenuItem |
|
4367 | 1766 |
#label: 'Image' |
4230 | 1767 |
#translateLabel: true |
4367 | 1768 |
#submenu: |
1769 |
#(#Menu |
|
1770 |
#( |
|
1771 |
#(#MenuItem |
|
1772 |
#enabled: #hasSelection |
|
1773 |
#label: 'Image Editor' |
|
1774 |
#itemValue: #openImageEditor |
|
1775 |
#translateLabel: true |
|
1776 |
) |
|
1777 |
#(#MenuItem |
|
1778 |
#enabled: #hasSelection |
|
1779 |
#label: 'Image Preview' |
|
1780 |
#itemValue: #openImagePreview |
|
1781 |
#translateLabel: true |
|
1782 |
) |
|
1783 |
#(#MenuItem |
|
4531 | 1784 |
#enabled: #hasSelection |
1785 |
#label: 'Image Inspector' |
|
1786 |
#itemValue: #openImageInspector |
|
1787 |
#translateLabel: true |
|
1788 |
) |
|
1789 |
#(#MenuItem |
|
4367 | 1790 |
#label: '-' |
1791 |
) |
|
1792 |
#(#MenuItem |
|
1793 |
#enabled: #hasSelection |
|
1794 |
#label: 'Convert to GIF' |
|
1795 |
#itemValue: #convertImageToGIF |
|
1796 |
#translateLabel: true |
|
1797 |
) |
|
4531 | 1798 |
#(#MenuItem |
1799 |
#enabled: #hasSelection |
|
1800 |
#label: 'Convert to PNG' |
|
1801 |
#itemValue: #convertImageToPNG |
|
1802 |
#translateLabel: true |
|
1803 |
) |
|
4367 | 1804 |
) |
1805 |
nil |
|
1806 |
nil |
|
1807 |
) |
|
4230 | 1808 |
) |
1809 |
#(#MenuItem |
|
4367 | 1810 |
#enabled: #hasMP3PlayerAndSelection |
4230 | 1811 |
#label: 'MP3 Player' |
4367 | 1812 |
#itemValue: #openMP3Player |
4230 | 1813 |
#translateLabel: true |
1814 |
#isVisible: #hasMP3Player |
|
1815 |
) |
|
1816 |
#(#MenuItem |
|
4367 | 1817 |
#enabled: #hasZipFileSelected |
4230 | 1818 |
#label: 'ZipFile Tool' |
4367 | 1819 |
#itemValue: #openZipTool |
4230 | 1820 |
#translateLabel: true |
1821 |
) |
|
1822 |
#(#MenuItem |
|
4367 | 1823 |
#enabled: #currentFilesAreInSameDirectory |
4230 | 1824 |
#label: 'Slide Show' |
4367 | 1825 |
#itemValue: #openSlideShow |
4230 | 1826 |
#translateLabel: true |
1827 |
#isVisible: #hasSlideShow |
|
1828 |
) |
|
1829 |
#(#MenuItem |
|
4367 | 1830 |
#label: 'Find' |
4230 | 1831 |
#translateLabel: true |
4367 | 1832 |
#submenu: |
1833 |
#(#Menu |
|
1834 |
#( |
|
1835 |
#(#MenuItem |
|
1836 |
#label: 'Find a File...' |
|
1837 |
#itemValue: #fileFindFile |
|
1838 |
#translateLabel: true |
|
1839 |
) |
|
1840 |
#(#MenuItem |
|
1841 |
#enabled: #hasSelection |
|
1842 |
#label: 'Find All Duplicate Files (Recursive)' |
|
1843 |
#itemValue: #fileFindAllDuplicates |
|
1844 |
#translateLabel: true |
|
1845 |
) |
|
1846 |
#(#MenuItem |
|
1847 |
#label: 'Find Duplicate Files' |
|
1848 |
#itemValue: #fileFindDuplicates |
|
1849 |
#translateLabel: true |
|
1850 |
) |
|
1851 |
) |
|
1852 |
nil |
|
1853 |
nil |
|
1854 |
) |
|
4230 | 1855 |
) |
1856 |
#(#MenuItem |
|
4367 | 1857 |
#enabled: #hasSelection |
1858 |
#label: 'File Differences...' |
|
1859 |
#itemValue: #openDiffView |
|
4230 | 1860 |
#translateLabel: true |
1861 |
) |
|
1862 |
#(#MenuItem |
|
4367 | 1863 |
#enabled: #hasSelection |
1864 |
#label: 'Hex Dump' |
|
1865 |
#itemValue: #fileHexDump |
|
4230 | 1866 |
#translateLabel: true |
1867 |
) |
|
1868 |
) |
|
1869 |
nil |
|
1870 |
nil |
|
4164
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1871 |
) |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1872 |
! |
81154143d447
move toolsMenuSpec from FileBrowserV2 to AbstractFileBrowser
penk
parents:
4163
diff
changeset
|
1873 |
|
4018 | 1874 |
viewDetailsMenuSpec |
1875 |
"This resource specification was automatically generated |
|
1876 |
by the MenuEditor of ST/X." |
|
1877 |
||
1878 |
"Do not manually edit this!! If it is corrupted, |
|
1879 |
the MenuEditor may not be able to read the specification." |
|
1880 |
||
1881 |
" |
|
1882 |
MenuEditor new openOnClass:DirectoryContentsBrowser andSelector:#viewBrowserMenu |
|
1883 |
(Menu new fromLiteralArrayEncoding:(DirectoryContentsBrowser viewBrowserMenu)) startUp |
|
1884 |
" |
|
1885 |
||
1886 |
<resource: #menu> |
|
1887 |
||
1888 |
^ |
|
1889 |
#(#Menu |
|
4414 | 1890 |
#( |
1891 |
#(#MenuItem |
|
1892 |
#label: 'Suffix' |
|
1893 |
#translateLabel: true |
|
1894 |
#hideMenuOnActivated: false |
|
1895 |
#enabled: #viewDetails |
|
1896 |
#indication: #viewType |
|
1897 |
) |
|
1898 |
#(#MenuItem |
|
1899 |
#label: 'Permissions' |
|
1900 |
#translateLabel: true |
|
1901 |
#hideMenuOnActivated: false |
|
1902 |
#enabled: #viewDetails |
|
1903 |
#indication: #viewPermissions |
|
1904 |
) |
|
1905 |
#(#MenuItem |
|
1906 |
#label: 'Owner' |
|
1907 |
#translateLabel: true |
|
1908 |
#hideMenuOnActivated: false |
|
1909 |
#enabled: #viewDetails |
|
1910 |
#indication: #viewOwner |
|
1911 |
) |
|
1912 |
#(#MenuItem |
|
1913 |
#label: 'Group' |
|
1914 |
#translateLabel: true |
|
1915 |
#hideMenuOnActivated: false |
|
1916 |
#enabled: #viewDetails |
|
1917 |
#indication: #viewGroup |
|
1918 |
) |
|
1919 |
#(#MenuItem |
|
1920 |
#label: 'Size' |
|
1921 |
#translateLabel: true |
|
1922 |
#hideMenuOnActivated: false |
|
1923 |
#enabled: #viewDetails |
|
1924 |
#indication: #viewSize |
|
1925 |
) |
|
1926 |
#(#MenuItem |
|
1927 |
#label: 'Date && Time' |
|
1928 |
#translateLabel: true |
|
1929 |
#hideMenuOnActivated: false |
|
1930 |
#enabled: #viewDetails |
|
1931 |
#indication: #viewTime |
|
1932 |
) |
|
1933 |
#(#MenuItem |
|
1934 |
#label: 'File Info' |
|
1935 |
#translateLabel: true |
|
1936 |
#hideMenuOnActivated: false |
|
1937 |
#enabled: #viewDetails |
|
1938 |
#indication: #viewDescription |
|
1939 |
) |
|
1940 |
#(#MenuItem |
|
1941 |
#label: 'Preview' |
|
1942 |
#translateLabel: true |
|
1943 |
#hideMenuOnActivated: false |
|
1944 |
#enabled: #viewDetails |
|
1945 |
#indication: #viewPreview |
|
1946 |
) |
|
1947 |
#(#MenuItem |
|
1948 |
#label: '-' |
|
1949 |
) |
|
1950 |
#(#MenuItem |
|
1951 |
#label: 'Hidden Files' |
|
1952 |
#translateLabel: true |
|
1953 |
#indication: #showHiddenFiles |
|
1954 |
) |
|
1955 |
) |
|
1956 |
nil |
|
1957 |
nil |
|
4018 | 1958 |
) |
3892 | 1959 |
! ! |
1960 |
||
1961 |
!AbstractFileBrowser class methodsFor:'misc'! |
|
1962 |
||
1963 |
newLock |
|
1964 |
^ CodeExecutionLock new |
|
1965 |
! ! |
|
1966 |
||
1967 |
!AbstractFileBrowser methodsFor:'actions'! |
|
1968 |
||
1969 |
askForCommandFor:fileName thenDo:aBlock |
|
1970 |
"setup and launch a querybox to ask for unix command. |
|
1971 |
Then evaluate aBlock passing the command-string as argument." |
|
1972 |
||
4523 | 1973 |
|box osName commandString| |
3892 | 1974 |
|
1975 |
osName := OperatingSystem platformName. |
|
1976 |
||
1977 |
box := FilenameEnterBox |
|
4414 | 1978 |
title:(resources string:'Execute %1 command:' with:osName) |
1979 |
okText:(resources string:'Execute') |
|
4523 | 1980 |
action:[:cmd | commandString := cmd]. |
3892 | 1981 |
|
1982 |
fileName notNil ifTrue:[ |
|
4414 | 1983 |
self initialCommandFor:fileName into:box. |
3892 | 1984 |
]. |
1985 |
box directory:(self getDirWithoutFileName:fileName). |
|
1986 |
box showAtPointer. |
|
1987 |
box destroy. |
|
1988 |
||
4523 | 1989 |
commandString notNil ifTrue:[ |
1990 |
aBlock value:commandString |
|
1991 |
]. |
|
1992 |
||
3892 | 1993 |
"Modified: / 7.9.1995 / 10:31:54 / claus" |
1994 |
"Modified: / 16.9.1997 / 15:35:10 / stefan" |
|
1995 |
"Modified: / 14.8.1998 / 14:12:52 / cg" |
|
1996 |
! |
|
1997 |
||
1998 |
changeFileBrowserTitleTo:aString |
|
1999 |
||
2000 |
self application:#FileBrowserV2 |
|
4414 | 2001 |
do:#changeFileBrowserTitleTo: |
2002 |
withArg:aString |
|
3892 | 2003 |
! |
2004 |
||
2005 |
copyFileList |
|
2006 |
||
2007 |
| fileList stream| |
|
2008 |
fileList := self application:#DirectoryContentsBrowser do:#descriptions. |
|
2009 |
stream := WriteStream on:''. |
|
2010 |
fileList do:[: item | |
|
4414 | 2011 |
stream nextPutAll:(item fileName asString). |
2012 |
stream cr. |
|
3892 | 2013 |
]. |
2014 |
self window setTextSelection:stream contents. |
|
2015 |
stream close. |
|
2016 |
! |
|
2017 |
||
2018 |
copySelectedFilenames |
|
2019 |
||
2020 |
| fileList stream| |
|
3982 | 2021 |
fileList := self application:#DirectoryContentsBrowser do:#selectedFiles. |
3892 | 2022 |
fileList isEmpty ifTrue:[^ self]. |
2023 |
stream := WriteStream on:''. |
|
2024 |
fileList do:[: file | |
|
4414 | 2025 |
stream nextPutAll:(file asString). |
2026 |
stream cr. |
|
3892 | 2027 |
]. |
2028 |
self window setTextSelection:stream contents. |
|
2029 |
stream close. |
|
2030 |
! |
|
2031 |
||
2032 |
doAddTerminal |
|
2033 |
||
2034 |
| item dir directories| |
|
2035 |
||
2036 |
directories := self currentDirectories value. |
|
2037 |
||
2038 |
directories isEmpty ifTrue:[ |
|
4414 | 2039 |
dir := Filename homeDirectory |
3892 | 2040 |
] ifFalse:[ |
4414 | 2041 |
dir := directories first. |
3892 | 2042 |
]. |
2043 |
||
3982 | 2044 |
item := (DirectoryContentsBrowser itemClass fileName:dir). |
3892 | 2045 |
self fileApplicationDo:#openTerminalApplication: withArg:item. |
2046 |
! |
|
2047 |
||
4431 | 2048 |
doCompareTwoFiles |
4454
c85336c15975
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4453
diff
changeset
|
2049 |
|
c85336c15975
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4453
diff
changeset
|
2050 |
self openDiffView. |
c85336c15975
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4453
diff
changeset
|
2051 |
" |
4431 | 2052 |
|files fileName1 fileName2 stream1 stream2 buffer1 buffer2 n1 n2 idx blockSize blockOffset| |
2053 |
||
2054 |
files := self currentFileNameHolder value. |
|
2055 |
fileName1 := files first. |
|
2056 |
fileName2 := files second. |
|
2057 |
||
2058 |
(fileName1 exists and:[fileName1 isReadable]) ifFalse:[ |
|
2059 |
Dialog warn:(resources string:'Cannot read %1' with:fileName1 pathName allBold). |
|
2060 |
^ self. |
|
2061 |
]. |
|
2062 |
(fileName2 exists and:[fileName2 isReadable]) ifFalse:[ |
|
2063 |
Dialog warn:(resources string:'Cannot read %1' with:fileName2 pathName allBold). |
|
2064 |
^ self. |
|
2065 |
]. |
|
2066 |
[ |
|
2067 |
stream1 := fileName1 readStream. |
|
2068 |
stream2 := fileName2 readStream. |
|
2069 |
||
2070 |
stream1 binary. stream2 binary. |
|
2071 |
||
2072 |
blockSize := 8192. |
|
2073 |
buffer1 := ByteArray new:blockSize. |
|
2074 |
buffer2 := ByteArray new:blockSize. |
|
2075 |
||
2076 |
blockOffset := 0. |
|
2077 |
||
2078 |
[stream1 atEnd] whileFalse:[ |
|
2079 |
n1 := stream1 nextBytes:(buffer1 size) into:buffer1 startingAt:1. |
|
2080 |
n2 := stream2 nextBytes:n1 into:buffer2 startingAt:1. |
|
2081 |
||
2082 |
n1 ~~ n2 ifTrue:[ |
|
2083 |
self halt. |
|
2084 |
] ifFalse:[ |
|
2085 |
buffer1 ~= buffer2 ifTrue:[ |
|
2086 |
idx := (1 to:n1) findFirst:[:idx | (buffer1 at:idx) ~~ (buffer2 at:idx)]. |
|
2087 |
Dialog information:(resources |
|
2088 |
string:'Files differ at position %1 (0x%2 vs. 0x%3)' |
|
2089 |
with:(blockOffset+idx) |
|
2090 |
with:((buffer1 at:idx) hexPrintString:2) |
|
2091 |
with:((buffer2 at:idx) hexPrintString:2) |
|
2092 |
). |
|
2093 |
^ self. |
|
2094 |
] |
|
2095 |
]. |
|
2096 |
blockOffset := blockOffset + n1. |
|
2097 |
]. |
|
2098 |
stream2 atEnd ifFalse:[ |
|
2099 |
self halt. |
|
2100 |
]. |
|
2101 |
] ensure:[ |
|
2102 |
stream1 notNil ifTrue:[stream1 close]. |
|
2103 |
stream2 notNil ifTrue:[stream2 close]. |
|
2104 |
]. |
|
2105 |
||
2106 |
self halt. |
|
4454
c85336c15975
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4453
diff
changeset
|
2107 |
" |
4431 | 2108 |
"/ action := [:command | |
2109 |
"/ self addToCommandHistory:command for:fileName. |
|
2110 |
"/ self executeCommand:command. |
|
2111 |
"/ ]. |
|
2112 |
"/ self askForCommandFor:fileName thenDo:action |
|
2113 |
! |
|
2114 |
||
3892 | 2115 |
doExecuteCommand |
2116 |
||
2117 |
| action fileName| |
|
3982 | 2118 |
fileName := self firstSelectedFile. |
3892 | 2119 |
action := [:command | |
4414 | 2120 |
self addToCommandHistory:command for:fileName. |
2121 |
self executeCommand:command. |
|
2122 |
]. |
|
3892 | 2123 |
self askForCommandFor:fileName thenDo:action |
2124 |
! |
|
2125 |
||
2126 |
doGoDirectoryUp |
|
3906 | 2127 |
| upDir directories rootInTreeView| |
3892 | 2128 |
|
2129 |
self enableDirectoryUp value ifFalse:[ ^ self]. |
|
2130 |
self currentFilesAreInSameDirectory ifTrue:[ |
|
4414 | 2131 |
directories := self currentDirectories value. |
2132 |
upDir := directories first directory. |
|
3906 | 2133 |
] ifFalse:[ |
4414 | 2134 |
rootInTreeView := self application:#DirectoryTreeBrowser do:#rootHolder. |
2135 |
upDir := rootInTreeView value asFilename directory. |
|
3892 | 2136 |
]. |
3906 | 2137 |
self currentFileNameHolder value:(OrderedCollection with:upDir). |
3892 | 2138 |
! |
2139 |
||
2140 |
doGotoDefaultDirectory |
|
2141 |
self gotoFile:(Filename defaultDirectory). |
|
2142 |
! |
|
2143 |
||
2144 |
doGotoHomeDirectory |
|
2145 |
||
2146 |
| home | |
|
2147 |
||
2148 |
home := Filename homeDirectory. |
|
2149 |
self gotoFile:home. |
|
2150 |
! |
|
2151 |
||
2152 |
doOpenSearchFile |
|
2153 |
||
2154 |
|item files| |
|
2155 |
||
4034 | 2156 |
files := self currentFileNameHolder value. |
2157 |
files notEmpty ifTrue:[ |
|
4414 | 2158 |
item := DirectoryContentsBrowser itemClass fileName:(files first). |
4034 | 2159 |
] ifFalse:[ |
4414 | 2160 |
item := DirectoryContentsBrowser itemClass fileName:(Filename homeDirectory asAbsoluteFilename). |
3892 | 2161 |
]. |
2162 |
self openSearchFileOn:item. |
|
2163 |
! |
|
2164 |
||
2165 |
doShowFileContents |
|
2166 |
||
2167 |
^ self application:#DirectoryContentsBrowser do:#doShowFileContents. |
|
2168 |
! |
|
2169 |
||
2170 |
doShowProperties |
|
2171 |
||
2172 |
"show long stat (file)-info" |
|
2173 |
||
2174 |
self fileGetInfo:true |
|
2175 |
! |
|
2176 |
||
2177 |
fileApplicationDo:selector |
|
2178 |
||
2179 |
^ self application:#FileApplicationNoteBook do:selector |
|
2180 |
! |
|
2181 |
||
2182 |
fileApplicationDo:selector withArg:arg |
|
2183 |
^ self application:#FileApplicationNoteBook do:selector withArg:arg |
|
2184 |
! |
|
2185 |
||
2186 |
fileGetInfo:longInfo |
|
2187 |
"get info on selected file - show it in a box" |
|
2188 |
||
2189 |
|string box updater| |
|
2190 |
||
3906 | 2191 |
string := self getFileInfoStringForFirstSelectedFile:longInfo. |
3892 | 2192 |
string notNil ifTrue:[ |
4414 | 2193 |
box := InfoBox title:string. |
2194 |
updater := [ |
|
2195 |
[true] whileTrue:[ |
|
2196 |
Delay waitForSeconds:2. |
|
2197 |
string := self getFileInfoStringForFirstSelectedFile:longInfo. |
|
2198 |
string isNil ifTrue:[ ^ self]. |
|
2199 |
box title:string |
|
2200 |
] |
|
2201 |
] fork. |
|
2202 |
box showAtPointer. |
|
2203 |
updater terminate. |
|
2204 |
box destroy |
|
3892 | 2205 |
] |
2206 |
! |
|
2207 |
||
2208 |
gotoFile:aFilename |
|
2209 |
||
3964 | 2210 |
" select only if the file is not already in selection" |
2211 |
| currentSel | |
|
2212 |
||
2213 |
currentSel := self currentFileNameHolder value. |
|
2214 |
((currentSel findFirst:[:aFile| aFile = aFilename]) == 0) ifTrue:[ |
|
4414 | 2215 |
self currentFileNameHolder value:(OrderedCollection with:(aFilename asAbsoluteFilename)). |
3964 | 2216 |
]. |
3892 | 2217 |
! |
2218 |
||
4392 | 2219 |
newTextEditor |
2220 |
||
2221 |
^ self fileApplicationDo:#newTextEditor |
|
2222 |
! |
|
2223 |
||
3892 | 2224 |
openApplByFileItem:aItem |
2225 |
||
4148 | 2226 |
^ self fileApplicationDo:#openApplByFileItem: withArg:aItem |
3892 | 2227 |
! |
2228 |
||
4392 | 2229 |
openApplForFile:aFilename |
2230 |
^ self openApplByFileItem:(DirectoryContentsBrowser itemClass fileName:aFilename). |
|
2231 |
! |
|
2232 |
||
3892 | 2233 |
openCommandResultApplication |
2234 |
||
2235 |
^ self fileApplicationDo:#openCommandResultApplication |
|
2236 |
! |
|
2237 |
||
2238 |
openSearchFileOn:aItem |
|
2239 |
||
2240 |
^ self fileApplicationDo:#openSearchFileOn: withArg:aItem |
|
2241 |
! |
|
2242 |
||
2243 |
openTextEditorOn:aItem |
|
2244 |
||
2245 |
^ self fileApplicationDo:#openTextEditorOn: withArg:aItem |
|
2246 |
! |
|
2247 |
||
2248 |
updateAndSelect:aColOfFiles |
|
2249 |
||
4420
06c0ac90e2dd
reset cached DirectoryContents to get the new files on remote systems where times are different
penk
parents:
4414
diff
changeset
|
2250 |
DirectoryContents flushCachedDirectoryFor:(self getBestDirectory). |
3892 | 2251 |
self application:#DirectoryContentsBrowser do:#doUpdate. |
2252 |
self application:#DirectoryTreeBrowser do:#doUpdate. |
|
2253 |
||
2254 |
aColOfFiles notNil ifTrue:[ self currentFileNameHolder value:aColOfFiles ]. |
|
2255 |
! |
|
2256 |
||
2257 |
updateCurrentDirectory |
|
2258 |
||
2259 |
self updateAndSelect:nil |
|
4345 | 2260 |
! |
2261 |
||
2262 |
withActivityIndicationDo:aBlock |
|
2263 |
||
2264 |
self activityVisibilityChannel value:true. |
|
2265 |
[ |
|
2266 |
aBlock value. |
|
2267 |
] ensure:[ |
|
2268 |
self activityVisibilityChannel value:false. |
|
2269 |
] |
|
3892 | 2270 |
! ! |
2271 |
||
2272 |
!AbstractFileBrowser methodsFor:'actions bookmarks'! |
|
2273 |
||
2274 |
addBookmark |
|
2275 |
||
2276 |
|directories| |
|
2277 |
||
2278 |
self currentFilesAreInSameDirectory ifFalse:[^ self]. |
|
2279 |
directories := self currentDirectories value. |
|
2280 |
self addBookmark:directories. |
|
2281 |
! |
|
2282 |
||
2283 |
addBookmark:aColOfDirectories |
|
2284 |
|idx bookmarks| |
|
2285 |
||
2286 |
aColOfDirectories do:[ : path | |
|
4414 | 2287 |
bookmarks := self class directoryBookmarks. |
2288 |
idx := bookmarks indexOf:path. |
|
2289 |
idx == 0 ifTrue:[ |
|
2290 |
bookmarks addLast:path. |
|
2291 |
]. |
|
3892 | 2292 |
]. |
2293 |
! |
|
2294 |
||
2295 |
hasBookmarks |
|
2296 |
^ self class directoryBookmarks size > 0 |
|
2297 |
! |
|
2298 |
||
2299 |
hasBookmarksToRemove |
|
2300 |
||
2301 |
|bookmarks directories| |
|
2302 |
||
3982 | 2303 |
directories := self currentSelectedDirectories. |
3892 | 2304 |
bookmarks := self class directoryBookmarks. |
2305 |
^ (bookmarks size > 0 and:[directories notEmpty]) |
|
2306 |
! |
|
2307 |
||
2308 |
removeBookmark |
|
2309 |
||
2310 |
|bookmarks directories| |
|
2311 |
||
2312 |
bookmarks := self class directoryBookmarks. |
|
2313 |
bookmarks isNil ifTrue:[ ^ self]. |
|
3982 | 2314 |
directories := self currentSelectedDirectories. |
3892 | 2315 |
directories isEmpty ifTrue:[^ self]. |
2316 |
directories do:[:dir| |
|
4414 | 2317 |
bookmarks remove:dir ifAbsent:nil. |
3892 | 2318 |
]. |
2319 |
! ! |
|
2320 |
||
2321 |
!AbstractFileBrowser methodsFor:'actions history'! |
|
2322 |
||
2323 |
addToCommandHistory:aCommandString for:aFilename |
|
2324 |
|cmd suffix cmdHist| |
|
2325 |
||
2326 |
cmdHist := self class commandHistory. |
|
2327 |
(aCommandString notNil and:[aCommandString notEmpty]) ifTrue:[ |
|
4414 | 2328 |
cmdHist notNil ifTrue:[ |
2329 |
cmdHist addFirst:aCommandString. |
|
2330 |
cmdHist size > self class commandHistorySize ifTrue:[ |
|
2331 |
cmdHist removeLast |
|
2332 |
] |
|
2333 |
]. |
|
2334 |
aFilename notNil ifTrue:[ |
|
2335 |
cmd := aCommandString copyTo:(aCommandString indexOf:Character space ifAbsent:[aCommandString size + 1])-1. |
|
2336 |
DefaultCommandPerSuffix isNil ifTrue:[ |
|
2337 |
DefaultCommandPerSuffix := Dictionary new. |
|
2338 |
]. |
|
2339 |
suffix := aFilename asFilename suffix. |
|
2340 |
suffix notNil ifTrue:[ |
|
2341 |
DefaultCommandPerSuffix at:suffix put:cmd. |
|
2342 |
] |
|
2343 |
] |
|
3892 | 2344 |
] |
2345 |
! |
|
2346 |
||
2347 |
doBack |
|
2348 |
||
4022 | 2349 |
| fileName| |
2350 |
||
4347 | 2351 |
fileName := self dirHistory goBackward. |
3892 | 2352 |
fileName notNil ifTrue:[ |
4347 | 2353 |
self gotoFile:(fileName asFilename). |
3892 | 2354 |
] |
2355 |
! |
|
2356 |
||
2357 |
doForward |
|
2358 |
||
3964 | 2359 |
| fileName| |
2360 |
||
3952 | 2361 |
fileName := self dirHistory goForward. |
3892 | 2362 |
fileName notNil ifTrue:[ |
4414 | 2363 |
self gotoFile:(fileName asFilename). |
4022 | 2364 |
] ifFalse:[ |
4414 | 2365 |
self enableForward value:false. |
4022 | 2366 |
|
2367 |
]. |
|
3892 | 2368 |
! ! |
2369 |
||
2370 |
!AbstractFileBrowser methodsFor:'applications'! |
|
2371 |
||
2372 |
application:aApplication do:aMethod |
|
2373 |
||
4191 | 2374 |
" perform a Method for a application " |
3892 | 2375 |
|appl| |
2376 |
||
2377 |
appl := self applications at:aApplication ifAbsent:nil. |
|
2378 |
appl notNil ifTrue:[ |
|
4414 | 2379 |
^ appl perform:aMethod. |
3892 | 2380 |
]. |
2381 |
^ nil. |
|
2382 |
! |
|
2383 |
||
2384 |
application:aApplication do:aMethod withArg:arg |
|
2385 |
|appl| |
|
2386 |
||
2387 |
appl := self applications at:aApplication ifAbsent:nil. |
|
2388 |
appl notNil ifTrue:[ |
|
4414 | 2389 |
^ appl perform:aMethod with:arg |
3892 | 2390 |
]. |
2391 |
^ nil |
|
2392 |
! |
|
2393 |
||
2394 |
application:aApplication do:aMethod withArg:arg1 withArg:arg2 |
|
2395 |
|appl| |
|
2396 |
||
2397 |
appl := self applications at:aApplication ifAbsent:nil. |
|
2398 |
appl notNil ifTrue:[ |
|
4414 | 2399 |
(arg1 notNil and:[arg2 notNil]) ifTrue:[ |
2400 |
^ appl perform:aMethod with:arg1 with:arg2 |
|
2401 |
] |
|
3892 | 2402 |
]. |
2403 |
^ nil |
|
4004 | 2404 |
! |
2405 |
||
2406 |
directoryContentsBrowser |
|
2407 |
^ self applications at:#DirectoryContentsBrowser ifAbsent:nil. |
|
3892 | 2408 |
! ! |
2409 |
||
2410 |
!AbstractFileBrowser methodsFor:'aspects'! |
|
2411 |
||
2412 |
applications |
|
2413 |
"returns the list of registered applications |
|
2414 |
" |
|
2415 |
^ aspects at:#applications |
|
2416 |
! |
|
2417 |
||
2418 |
backgroundProcesses |
|
2419 |
||
2420 |
^ self aspectFor:#backgroundProcesses ifAbsent:[List new] |
|
2421 |
! |
|
2422 |
||
4230 | 2423 |
canMake |
2424 |
||
2425 |
^ self aspectFor:#hasSelection ifAbsent:[ false asValue ]. |
|
2426 |
! |
|
2427 |
||
3892 | 2428 |
currentDirectories |
2429 |
||
2430 |
" returns a Ordered Collection of all directories currently selected |
|
2431 |
if only a file is selected currentDirectories holds the directory of the file |
|
2432 |
" |
|
2433 |
||
2434 |
^ self aspectFor:#currentDirectories ifAbsent:[ (OrderedCollection new) asValue ]. |
|
2435 |
! |
|
2436 |
||
2437 |
currentFileNameHolder |
|
2438 |
||
2439 |
" returns a OrderedCollection of all files that are selected |
|
2440 |
if no file but a directory is selected it contains the directories |
|
2441 |
in contrast to currentDirectories wich have only the directories |
|
2442 |
" |
|
4213
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2443 |
^ self aspectFor:#currentFileNameHolder ifAbsent:[ |
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2444 |
self class currentSelection notEmpty ifTrue:[ |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2445 |
self class currentSelection asValue |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2446 |
] ifFalse:[ |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2447 |
(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) asValue |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2448 |
] |
4213
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2449 |
] notPresentDo:[:holder| |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2450 |
| filenames newFilenames| |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2451 |
filenames := holder value. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2452 |
newFilenames := Set new. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2453 |
filenames do:[ : filename | | fn | |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2454 |
fn := filename. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2455 |
[fn exists not] whileTrue:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2456 |
fn := fn directory. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2457 |
]. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2458 |
newFilenames add:fn. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2459 |
]. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2460 |
newFilenames asOrderedCollection. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2461 |
] |
3892 | 2462 |
! |
2463 |
||
2464 |
enableDirectoryUp |
|
2465 |
||
2466 |
^ self aspectFor:#enableDirectoryUp ifAbsent:[false asValue] |
|
2467 |
! |
|
2468 |
||
2469 |
enableHome |
|
2470 |
||
2471 |
^ self aspectFor:#enableHome ifAbsent:[ true asValue ]. |
|
2472 |
! |
|
2473 |
||
2474 |
enableViewNoteBookApplication |
|
2475 |
||
2476 |
^ self aspectFor:#enableViewNoteBookApplication ifAbsent:[false asValue] |
|
2477 |
! |
|
2478 |
||
2479 |
hasSelection |
|
2480 |
||
2481 |
^ self aspectFor:#hasSelection ifAbsent:[ false asValue ]. |
|
2482 |
! |
|
2483 |
||
4414 | 2484 |
hasTwoFilesSelectedHolder |
2485 |
^ self |
|
2486 |
aspectFor:#hasTwoFilesSelectedHolder |
|
2487 |
ifAbsent:[ BlockValue with:[self hasTwoFilesSelected] argument:self currentFileNameHolder]. |
|
2488 |
! |
|
2489 |
||
4523 | 2490 |
notify:aString |
2491 |
aString = 'nil' ifTrue:[self halt]. |
|
2492 |
self notifyChannel value:aString |
|
2493 |
! |
|
2494 |
||
3892 | 2495 |
notifyChannel |
2496 |
||
2497 |
^ self aspectFor:#notifyChannel ifAbsent:['' asValue] |
|
4071 | 2498 |
! |
2499 |
||
2500 |
rootHolder |
|
2501 |
"holder, which keeps the rootHolder of the treeView |
|
2502 |
" |
|
2503 |
||
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2504 |
^ self aspectFor:#rootHolder ifAbsent:[ |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2505 |
self class rootHolder asValue. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2506 |
]. |
3892 | 2507 |
! ! |
2508 |
||
2509 |
!AbstractFileBrowser methodsFor:'aspects handling'! |
|
2510 |
||
2511 |
aspectFor:something ifAbsent:aBlock |
|
2512 |
"returns the model for an aspect |
|
2513 |
" |
|
4201 | 2514 |
|holder saveAspectItem aspect| |
3892 | 2515 |
|
4213
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2516 |
holder := aspects at:something ifAbsent:[ |
4201 | 2517 |
saveAspectItem := self runtimeAspectValueFor:something. |
2518 |
saveAspectItem notNil ifTrue:[ |
|
2519 |
saveAspectItem isHolder ifTrue:[ |
|
2520 |
holder := ValueHolder with:saveAspectItem value |
|
2521 |
] ifFalse:[ |
|
2522 |
holder := saveAspectItem value |
|
2523 |
]. |
|
2524 |
] ifFalse:[ |
|
2525 |
aspect := self userPreferencesAspectValueFor:something. |
|
2526 |
aspect notNil ifTrue:[ |
|
2527 |
holder := aspect asValue |
|
2528 |
] ifFalse:[ |
|
2529 |
holder := aBlock value. |
|
2530 |
] |
|
2531 |
]. |
|
2532 |
holder notNil ifTrue:[ |
|
2533 |
aspects at:something put:holder |
|
2534 |
] |
|
3892 | 2535 |
]. |
2536 |
^ holder |
|
2537 |
! |
|
2538 |
||
4213
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2539 |
aspectFor:something ifAbsent:aBlock notPresentDo:notPresentBlock |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2540 |
"returns the model for an aspect |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2541 |
" |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2542 |
|holder saveAspectItem aspect| |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2543 |
|
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2544 |
holder := aspects at:something ifAbsent:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2545 |
saveAspectItem := self runtimeAspectValueFor:something. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2546 |
saveAspectItem notNil ifTrue:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2547 |
saveAspectItem isHolder ifTrue:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2548 |
holder := ValueHolder with:saveAspectItem value |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2549 |
] ifFalse:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2550 |
holder := saveAspectItem value |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2551 |
]. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2552 |
] ifFalse:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2553 |
aspect := self userPreferencesAspectValueFor:something. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2554 |
aspect notNil ifTrue:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2555 |
holder := aspect asValue |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2556 |
] ifFalse:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2557 |
holder := aBlock value. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2558 |
] |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2559 |
]. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2560 |
holder notNil ifTrue:[ |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2561 |
holder value:(notPresentBlock value:holder). |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2562 |
aspects at:something put:holder |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2563 |
] |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2564 |
]. |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2565 |
^ holder |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2566 |
! |
b8e7d4276a33
startup if old filename not present - go up to first directory in path
penk
parents:
4203
diff
changeset
|
2567 |
|
3892 | 2568 |
aspects |
2569 |
^ aspects |
|
2570 |
! |
|
2571 |
||
2572 |
runtimeAspectValueFor:something |
|
2573 |
"returns the default aspect item from the class variable RuntimeAspects |
|
2574 |
" |
|
2575 |
^ self class runtimeAspects at:something ifAbsent:nil. |
|
2576 |
! |
|
2577 |
||
4201 | 2578 |
saveAspectValues |
2579 |
|saveAspects aspectValue| |
|
2580 |
||
2581 |
||
2582 |
saveAspects := self class userPreferencesAspectList. |
|
2583 |
saveAspects do:[ : aspectKey | |
|
2584 |
aspectValue := (self perform:aspectKey) value. |
|
2585 |
UserPreferences current perform:((aspectKey asString, ':') asSymbol) with:aspectValue. |
|
2586 |
]. |
|
2587 |
! |
|
2588 |
||
3892 | 2589 |
saveRuntimeAspectValues |
2590 |
|savedAspects dictionary value isHolder aspect| |
|
2591 |
||
2592 |
savedAspects := self class listOfRuntimeValuesToRemark. |
|
2593 |
dictionary := Dictionary new. |
|
2594 |
savedAspects do:[ : aspectKey | |
|
4414 | 2595 |
aspect := self perform:aspectKey. |
2596 |
isHolder := aspect isValueModel. |
|
2597 |
isHolder ifTrue:[value:= aspect value] ifFalse:[ value := aspect]. |
|
2598 |
dictionary at:aspectKey |
|
2599 |
put:(SaveAspectItem withValue:value isHolder:isHolder) |
|
3892 | 2600 |
]. |
2601 |
||
2602 |
RuntimeAspects := dictionary. |
|
2603 |
! |
|
2604 |
||
4201 | 2605 |
userPreferencesAspectValueFor:something |
2606 |
"returns the default aspect from the Userpreferences |
|
3892 | 2607 |
" |
4201 | 2608 |
|
2609 |
(self class userPreferencesAspectList includes:something) not ifTrue:[ ^ nil]. |
|
2610 |
^ UserPreferences current perform:something. |
|
3892 | 2611 |
! ! |
2612 |
||
4011 | 2613 |
!AbstractFileBrowser methodsFor:'aspects-filter'! |
2614 |
||
4018 | 2615 |
filterBackgroundColor |
2616 |
||
2617 |
^ self aspectFor:#filterBackgroundColor ifAbsent:[Color white asValue] |
|
2618 |
! |
|
2619 |
||
4011 | 2620 |
filterBlockHolder |
2621 |
||
2622 |
^ self aspectFor:#filterBlockHolder ifAbsent:[self getFilter asValue] |
|
2623 |
! |
|
2624 |
||
2625 |
filterListModel |
|
2626 |
||
2627 |
^ self aspectFor:#filterListModel ifAbsent:[self class defaultFilterList] |
|
2628 |
! |
|
2629 |
||
2630 |
filterModel |
|
2631 |
||
2632 |
^ self aspectFor:#filterModel ifAbsent:[(self filterListModel at:1) asValue] |
|
2633 |
! |
|
2634 |
||
4018 | 2635 |
filterValueBox |
2636 |
||
2637 |
^ self aspectFor:#filterValueBox ifAbsent:[ValueHolder new] |
|
2638 |
! |
|
2639 |
||
4011 | 2640 |
getFilter |
2641 |
| filter showHidden| |
|
2642 |
||
2643 |
filter := self filterModel value. |
|
2644 |
filter = '' ifTrue:[filter := '*']. |
|
2645 |
showHidden := self showHiddenFiles value. |
|
2646 |
showHidden ifTrue:[ |
|
4414 | 2647 |
^ [: el | filter match:el]. |
4011 | 2648 |
] ifFalse:[ |
4414 | 2649 |
^ [: el | ((el asString startsWith:'.') not) and:[filter match:el]]. |
4011 | 2650 |
] |
4018 | 2651 |
! |
2652 |
||
2653 |
shownFiles |
|
2654 |
||
2655 |
^ self aspectFor:#shownFiles ifAbsent:['-/-' asValue] |
|
4011 | 2656 |
! ! |
2657 |
||
3892 | 2658 |
!AbstractFileBrowser methodsFor:'aspects-history'! |
2659 |
||
2660 |
dirHistory |
|
2661 |
||
3952 | 2662 |
^ self class directoryHistory |
3892 | 2663 |
! |
2664 |
||
2665 |
enableBack |
|
2666 |
||
2667 |
^ self aspectFor:#enableBack ifAbsent:[false asValue] |
|
2668 |
! |
|
2669 |
||
2670 |
enableFileHistory |
|
2671 |
||
2672 |
^ self aspectFor:#enableFileHistory ifAbsent:[false asValue] |
|
2673 |
! |
|
2674 |
||
2675 |
enableForward |
|
2676 |
||
2677 |
^ self aspectFor:#enableForward ifAbsent:[false asValue] |
|
2678 |
! |
|
2679 |
||
2680 |
fileHistory |
|
2681 |
||
2682 |
^ self aspectFor:#fileHistory ifAbsent:[FilenameHistory new] |
|
2683 |
! ! |
|
2684 |
||
2685 |
!AbstractFileBrowser methodsFor:'aspects-visibility'! |
|
2686 |
||
4345 | 2687 |
activityVisibilityChannel |
2688 |
" activityVisibilityChannel switches the activity indicator on/off |
|
2689 |
" |
|
2690 |
||
2691 |
^ self aspectFor:#activityVisibilityChannel ifAbsent:[ false asValue ]. |
|
2692 |
! |
|
2693 |
||
4110 | 2694 |
openAlwaysInTextEditor |
4201 | 2695 |
" aspect for open every file in TextEditor dont use e.g. HtmlEditor for *.html'" |
4110 | 2696 |
|
2697 |
^ self aspectFor:#openAlwaysInTextEditor ifAbsent:[ false asValue ]. |
|
2698 |
! |
|
2699 |
||
3892 | 2700 |
openMultipleApplicationsForType |
2701 |
||
4201 | 2702 |
" aspect for open more applications for e.g. TextEditor and not change the contents of already |
2703 |
open TextEditor " |
|
2704 |
||
3892 | 2705 |
^ self aspectFor:#openMultipleApplicationsForType ifAbsent:[ false asValue ]. |
2706 |
! |
|
2707 |
||
4201 | 2708 |
showDirectoryTree |
2709 |
||
2710 |
^ self aspectFor:#showDirectoryTree ifAbsent:[ true asValue ] |
|
3892 | 2711 |
! |
2712 |
||
2713 |
showHiddenFiles |
|
2714 |
||
2715 |
^ self aspectFor:#showHiddenFiles ifAbsent:[ true asValue ]. |
|
2716 |
! |
|
2717 |
||
2718 |
viewDescription |
|
4201 | 2719 |
"get the user preferences for show file description row in DirectoryContentsBrowser" |
3892 | 2720 |
|
2721 |
^ self aspectFor:#viewDescription ifAbsent:[ false asValue ]. |
|
2722 |
! |
|
2723 |
||
2724 |
viewDetails |
|
4201 | 2725 |
"get the user preferences for view more file properties in rows in DirectoryContentsBrowser |
2726 |
" |
|
3892 | 2727 |
|
2728 |
^ self aspectFor:#viewDetails ifAbsent:[ false asValue ]. |
|
2729 |
! |
|
2730 |
||
2731 |
viewDirectoryDescription |
|
2732 |
||
4201 | 2733 |
" aspect for auto open a TextView for Readme and other see getInfoItem Method files |
2734 |
on change directory " |
|
2735 |
||
3892 | 2736 |
^ self aspectFor:#viewDirectoryDescription ifAbsent:[ true asValue ]. |
2737 |
! |
|
2738 |
||
4201 | 2739 |
viewDirsInContentsBrowser |
2740 |
||
2741 |
^ self aspectFor:#viewDirsInContentsBrowser ifAbsent:[ false asValue ]. |
|
2742 |
! |
|
2743 |
||
3892 | 2744 |
viewFilesInDirectoryTree |
2745 |
||
4201 | 2746 |
" aspect for view files in tree view (not only directories) " |
2747 |
||
3892 | 2748 |
^ self aspectFor:#viewFilesInDirectoryTree ifAbsent:[ false asValue ]. |
2749 |
! |
|
2750 |
||
2751 |
viewGroup |
|
2752 |
||
4201 | 2753 |
" aspect for show group information row in DirectoryContentsBrowser " |
2754 |
||
3892 | 2755 |
^ self aspectFor:#viewGroup ifAbsent:[ false asValue ]. |
2756 |
! |
|
2757 |
||
2758 |
viewNoteBookApplicationHolder |
|
2759 |
||
2760 |
^ self aspectFor:#viewNoteBookApplicationHolder ifAbsent:[ false asValue]. |
|
2761 |
! |
|
2762 |
||
2763 |
viewOwner |
|
2764 |
||
4201 | 2765 |
" aspect for show owner information row in DirectoryContentsBrowser " |
2766 |
||
3892 | 2767 |
^ self aspectFor:#viewOwner ifAbsent:[ false asValue ]. |
2768 |
! |
|
2769 |
||
2770 |
viewPermissions |
|
2771 |
||
4201 | 2772 |
" aspect for show permission information row in DirectoryContentsBrowser " |
2773 |
||
3892 | 2774 |
^ self aspectFor:#viewPermissions ifAbsent:[ false asValue ]. |
2775 |
! |
|
2776 |
||
2777 |
viewPreview |
|
2778 |
||
4201 | 2779 |
" aspect for show image previev row in DirectoryContentsBrowser " |
2780 |
||
3892 | 2781 |
^ self aspectFor:#viewPreview ifAbsent:[ false asValue ]. |
2782 |
! |
|
2783 |
||
2784 |
viewSize |
|
2785 |
||
4201 | 2786 |
" aspect for show size information row in DirectoryContentsBrowser " |
2787 |
||
3892 | 2788 |
^ self aspectFor:#viewSize ifAbsent:[ false asValue ]. |
2789 |
! |
|
2790 |
||
2791 |
viewTime |
|
2792 |
||
4201 | 2793 |
" aspect for show time information row in DirectoryContentsBrowser " |
2794 |
||
3892 | 2795 |
^ self aspectFor:#viewTime ifAbsent:[ false asValue ]. |
2796 |
! |
|
2797 |
||
2798 |
viewType |
|
4201 | 2799 |
" aspect for show suffix (type) information row in DirectoryContentsBrowser " |
3892 | 2800 |
|
2801 |
^ self aspectFor:#viewType ifAbsent:[ false asValue ]. |
|
2802 |
! ! |
|
2803 |
||
2804 |
!AbstractFileBrowser methodsFor:'background processing'! |
|
2805 |
||
2806 |
executeCommand:cmd |
|
2807 |
||
2808 |
self executeCommand:cmd inDirectory:nil |
|
2809 |
! |
|
2810 |
||
2811 |
executeCommand:cmd inDirectory:aDir |
|
2812 |
||
2813 |
| nameString executionBlock| |
|
2814 |
||
2815 |
executionBlock := self getExecutionBlockForCommand:cmd inDirectory:aDir. |
|
4516
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2816 |
nameString := 'Execute: ', cmd. |
3892 | 2817 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
2818 |
! |
|
2819 |
||
2820 |
getExecutionBlockForCommand:cmd |
|
2821 |
||
2822 |
^ self getExecutionBlockForCommand:cmd inDirectory:nil |
|
2823 |
! |
|
2824 |
||
2825 |
getExecutionBlockForCommand:cmd inDirectory:aDir |
|
2826 |
||
2827 |
| dir dirs| |
|
2828 |
||
2829 |
dir := aDir. |
|
2830 |
aDir isNil ifTrue:[ |
|
4414 | 2831 |
dirs := self currentSelectedDirectories. |
2832 |
dirs size ~= 1 ifTrue:[ ^ self]. |
|
2833 |
dir := dirs anElement. |
|
3892 | 2834 |
]. |
4523 | 2835 |
|
2836 |
^ [:stream| |
|
2837 |
stream notNil ifTrue:[ |
|
4414 | 2838 |
OperatingSystem |
2839 |
executeCommand:cmd |
|
2840 |
inputFrom:nil |
|
2841 |
outputTo:stream |
|
2842 |
errorTo:stream |
|
2843 |
inDirectory:dir |
|
2844 |
onError:[:status| false]. |
|
2845 |
] |
|
4523 | 2846 |
]. |
3892 | 2847 |
! |
2848 |
||
2849 |
killAllRunningBackgroundProcesses |
|
2850 |
||
2851 |
self backgroundProcesses do:[ : process | |
|
4523 | 2852 |
self notify:'kill ', process name. |
4414 | 2853 |
process terminate. |
3892 | 2854 |
]. |
2855 |
! |
|
2856 |
||
2857 |
makeExecutionResultProcessFor:aBlock withName:aString |
|
2858 |
| stream process appl nameString| |
|
2859 |
||
2860 |
appl := self openCommandResultApplication. |
|
2861 |
stream := appl resultStream. |
|
2862 |
nameString := aString ? 'Execution Result'. |
|
2863 |
appl changeTabTo:nameString. |
|
4523 | 2864 |
|
4516
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2865 |
process := [ [aBlock value:stream] |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2866 |
valueNowOrOnUnwindDo:[ |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2867 |
self backgroundProcesses remove:process ifAbsent:[]. |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2868 |
appl process value:nil. |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2869 |
|
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2870 |
"/ close automatically, if there was no output. |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2871 |
appl resultStream contents isEmpty ifTrue:[ |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2872 |
appl doClose. |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2873 |
] |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2874 |
] |
dc3b7a89598a
close command view if no output was generated
Claus Gittinger <cg@exept.de>
parents:
4496
diff
changeset
|
2875 |
] newProcess. |
3892 | 2876 |
process priority:(Processor userBackgroundPriority). |
2877 |
process name:nameString. |
|
2878 |
self backgroundProcesses add:process. |
|
2879 |
appl process value:process. |
|
2880 |
process resume. |
|
2881 |
! ! |
|
2882 |
||
2883 |
!AbstractFileBrowser methodsFor:'change & update'! |
|
2884 |
||
4011 | 2885 |
abstractCurrentFileNameHolderChanged |
2886 |
" do here all the things that have to be done for every part of the FileBrowserV2 |
|
2887 |
and the things that have to be done if it runs standalone " |
|
2888 |
||
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2889 |
| newDirectories oldDirectories size rootInTreeView selection | |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2890 |
|
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2891 |
selection := self currentFileNameHolder value. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2892 |
self class currentSelection:selection. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2893 |
self hasSelection value:(selection notEmpty). |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2894 |
newDirectories := self directoriesForFiles:selection. |
4011 | 2895 |
oldDirectories := self currentDirectories value. |
2896 |
oldDirectories ~= newDirectories ifTrue:[ |
|
4347 | 2897 |
self currentDirectories value:newDirectories. |
2898 |
size := newDirectories size. |
|
2899 |
rootInTreeView := self application:#DirectoryTreeBrowser do:#rootHolder. |
|
2900 |
rootInTreeView := rootInTreeView notNil ifTrue:[rootInTreeView value]. |
|
2901 |
self enableDirectoryUp value:(((size == 1) and:[newDirectories first isRootDirectory not]) or:[(rootInTreeView notNil and:[rootInTreeView value asFilename isRootDirectory not])]). |
|
2902 |
newDirectories notEmpty ifTrue:[ |
|
2903 |
self dirHistory addToHistory:(newDirectories first asString). |
|
2904 |
]. |
|
2905 |
self enableHome value:((newDirectories includes:(Filename homeDirectory))not). |
|
4011 | 2906 |
]. |
4022 | 2907 |
self enableForward value:self canForward. |
4347 | 2908 |
self enableBack value:self canBackward. |
4011 | 2909 |
^ self |
2910 |
! |
|
2911 |
||
2912 |
filterModelChanged |
|
2913 |
||
2914 |
self filterBlockHolder value:(self getFilter). |
|
2915 |
! |
|
2916 |
||
3892 | 2917 |
update:something with:aParameter from:changedObject |
2918 |
||
2919 |
" do here all the things that have to be done for every part of the FileBrowserV2 |
|
2920 |
and the things that have to be done if it runs standalone " |
|
2921 |
||
2922 |
changedObject == self currentFileNameHolder ifTrue:[ |
|
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2923 |
self abstractCurrentFileNameHolderChanged. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2924 |
^ self |
3892 | 2925 |
]. |
3989 | 2926 |
changedObject == self sortCaseless ifTrue:[ |
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2927 |
self sortFileListsBy:#baseName withReverse:false. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2928 |
^ self |
3989 | 2929 |
]. |
4011 | 2930 |
(changedObject == self filterModel or:[changedObject == self showHiddenFiles]) ifTrue:[ |
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2931 |
self filterModelChanged. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2932 |
^ self |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2933 |
]. |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2934 |
changedObject == self rootHolder ifTrue:[ |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2935 |
self class rootHolder:(self rootHolder value). |
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
2936 |
^ self |
4004 | 2937 |
]. |
3989 | 2938 |
|
3892 | 2939 |
super update:something with:aParameter from:changedObject |
2940 |
! ! |
|
2941 |
||
2942 |
!AbstractFileBrowser methodsFor:'clipboard'! |
|
2943 |
||
2944 |
canPaste |
|
2945 |
||
2946 |
^ self aspectFor:#canPaste ifAbsent:[ false asValue ]. |
|
2947 |
! |
|
2948 |
||
2949 |
clipboard |
|
2950 |
||
2951 |
^ self aspectFor:#clipboard ifAbsent:[Clipboard new] |
|
2952 |
! |
|
2953 |
||
2954 |
copyFilesToClipBoard:colOfFiles |
|
2955 |
"defete current selected files/directories |
|
2956 |
" |
|
2957 |
self putInClipBoard:colOfFiles as:#copy. |
|
2958 |
! |
|
2959 |
||
2960 |
cutFilesToClipBoard:colOfFiles |
|
2961 |
"defete current selected files/directories |
|
2962 |
" |
|
2963 |
self putInClipBoard:colOfFiles as:#cut. |
|
2964 |
! |
|
2965 |
||
2966 |
emptyClipBoard |
|
2967 |
||
2968 |
self clipboard files:nil. |
|
2969 |
self canPaste value:false. |
|
2970 |
! |
|
2971 |
||
2972 |
putInClipBoard:colOfFiles as:aSymbol |
|
2973 |
||
2974 |
| stream clp| |
|
2975 |
||
2976 |
colOfFiles isEmpty ifTrue:[ ^ self]. |
|
2977 |
clp := self clipboard. |
|
2978 |
clp files:nil. |
|
2979 |
clp method:aSymbol. |
|
2980 |
stream := WriteStream on:''. |
|
2981 |
stream nextPutAll:aSymbol asString. |
|
2982 |
stream nextPutAll:' <'. |
|
2983 |
stream nextPutAll:colOfFiles first asString. |
|
2984 |
colOfFiles size > 1 ifTrue:[ |
|
4414 | 2985 |
stream nextPutAll:' ...'. |
3892 | 2986 |
]. |
2987 |
stream nextPutAll:'> to clipboard'. |
|
2988 |
||
4523 | 2989 |
self notify:stream contents. |
3892 | 2990 |
stream close. |
2991 |
clp files:colOfFiles. |
|
2992 |
self canPaste value:true. |
|
2993 |
! ! |
|
2994 |
||
2995 |
!AbstractFileBrowser methodsFor:'drag & drop'! |
|
2996 |
||
2997 |
canDropArchiv:dropedObjects for:filename |
|
2998 |
||
2999 |
(filename isDirectory |
|
3000 |
and:[filename isWritable and:[dropedObjects notEmpty]]) ifTrue:[ |
|
4414 | 3001 |
^ true |
3892 | 3002 |
]. |
3003 |
^ false |
|
3004 |
! |
|
3005 |
||
3006 |
canDropFiles:dropedObjects for:filename |
|
3007 |
| checkObject filenameDirString checkObjectString filenameDir| |
|
3008 |
||
3009 |
dropedObjects isEmpty ifTrue:[^ false]. |
|
3010 |
filenameDir := self getDirWithoutFileName:filename. |
|
3011 |
filenameDir isWritable not ifTrue:[^ false]. |
|
3012 |
filenameDirString := filenameDir asString. |
|
3013 |
dropedObjects do:[:aObject | |
|
4414 | 3014 |
checkObject := aObject theObject. |
3015 |
checkObjectString := checkObject asString. |
|
3016 |
checkObject isDirectory ifTrue:[ |
|
3017 |
(self fileName:filenameDirString startsWith:checkObjectString) ifTrue:[ |
|
3018 |
" can not drop a directory in his parents " |
|
3019 |
^ false |
|
3020 |
] |
|
3021 |
] ifFalse:[ |
|
3022 |
(filenameDirString = checkObject directory asString |
|
3023 |
or:[ filenameDirString = checkObject physicalPathName asFilename directory asString ]) ifTrue:[ |
|
3024 |
" can not drop a file in same directory " |
|
3025 |
^ false |
|
3026 |
] |
|
3027 |
] |
|
3892 | 3028 |
]. |
3029 |
^ true |
|
3030 |
! |
|
3031 |
||
3032 |
doStartDrag:aDropSource in:aView |
|
3033 |
"set the cursors before starting the drag & drop operation |
|
3034 |
" |
|
3035 |
|hdl| |
|
3036 |
||
3037 |
||
3038 |
hdl := DragAndDropManager new. |
|
3039 |
||
4337
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
3040 |
hdl disabledCursor:self class disabledCursorImage. |
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
3041 |
hdl enabledCursor:self class enabledCursorImage. |
3892 | 3042 |
hdl alienCursor:nil. |
3043 |
||
3044 |
hdl startDragFrom:aView dropSource:aDropSource offset:#topLeft |
|
3045 |
! ! |
|
3046 |
||
3047 |
!AbstractFileBrowser methodsFor:'file operations'! |
|
3048 |
||
3049 |
copyFile:aSourceFile to:aDestFile |
|
3050 |
"copy to |
|
3051 |
" |
|
3052 |
|copy| |
|
3053 |
||
3054 |
copy := FileOperation copy copyFile:aSourceFile to:aDestFile withOverWriteWarning:true copyFileIfSame:true. |
|
3055 |
copy result ifTrue:[ |
|
4523 | 3056 |
self notify:('copy ', aSourceFile baseName, ' to:,', aDestFile baseName). |
3892 | 3057 |
] ifFalse:[ |
4523 | 3058 |
self notify:copy errorString. |
3892 | 3059 |
]. |
3060 |
^ copy result |
|
3061 |
! |
|
3062 |
||
3063 |
copyFiles:aColOfSourceFiles to:aDirectory |
|
3064 |
"copy aColOfSourceFiles to aDirectory |
|
3065 |
" |
|
3066 |
|copy| |
|
3067 |
||
3068 |
copy := FileOperation copy copyFiles:aColOfSourceFiles to:aDirectory. |
|
3069 |
copy result ifFalse:[ |
|
4523 | 3070 |
self notify:copy errorString. |
3892 | 3071 |
]. |
3072 |
self updateCurrentDirectory. |
|
3073 |
^ copy colOfCopiedFiles |
|
3074 |
! |
|
3075 |
||
3076 |
copyOrMoveDialog:aCol |
|
3077 |
||
3078 |
| size stream dialog| |
|
3079 |
||
3080 |
size := aCol size. |
|
3081 |
stream := WriteStream on:''. |
|
3082 |
stream nextPutAll:'copy or move file'. |
|
3083 |
size == 1 ifFalse:[ |
|
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3084 |
stream nextPutAll:'s'. |
3892 | 3085 |
]. |
3086 |
stream nextPutAll:': '. |
|
3087 |
stream nextPutAll:aCol first baseName asString. |
|
3088 |
size == 1 ifFalse:[ |
|
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3089 |
stream nextPutAll:' ... '. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3090 |
stream nextPutAll:aCol last baseName asString. |
3892 | 3091 |
]. |
3092 |
||
3093 |
dialog := OptionBox |
|
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3094 |
request:stream contents |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3095 |
label:'Move or Copy' |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3096 |
form:(WarningBox iconBitmap) |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3097 |
buttonLabels:#('Cancel' 'Move' 'Copy' 'Copy As...') |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3098 |
values:#(#cancel #move #copy #copyAs) |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3099 |
default:#copy. |
3892 | 3100 |
dialog isNil ifTrue:[dialog := #cancel]. |
3101 |
^ dialog. |
|
3102 |
! |
|
3103 |
||
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3104 |
copyOrMoveFiles:aColOfSourceFiles to:aDestinationDirectory |
3892 | 3105 |
"copy aColOfSourceFiles to aDirectory |
3106 |
" |
|
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3107 |
|dialog lastOld lastNew| |
3892 | 3108 |
|
3109 |
dialog := self copyOrMoveDialog:aColOfSourceFiles. |
|
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3110 |
dialog == #copyAs ifTrue:[ |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3111 |
aColOfSourceFiles do:[:eachSourceFile | |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3112 |
|initial destFile srcBase dstBase| |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3113 |
|
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3114 |
srcBase := eachSourceFile asFilename baseName. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3115 |
lastOld isNil ifTrue:[ |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3116 |
initial := srcBase |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3117 |
] ifFalse:[ |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3118 |
initial := DoWhatIMeanSupport |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3119 |
goodRenameDefaultForFile:srcBase lastOld:lastOld lastNew:lastNew. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3120 |
]. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3121 |
dstBase := Dialog request:('Copy %1 as:' bindWith:srcBase) initialAnswer:initial. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3122 |
dstBase isNil ifTrue:[^ self]. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3123 |
self copyFile:eachSourceFile to:(aDestinationDirectory construct:dstBase). |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3124 |
lastOld := srcBase. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3125 |
lastNew := dstBase. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3126 |
]. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3127 |
|
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3128 |
^ self. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3129 |
]. |
3892 | 3130 |
dialog == #copy ifTrue:[ |
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3131 |
self copyFiles:aColOfSourceFiles to:aDestinationDirectory. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3132 |
^ self. |
3892 | 3133 |
]. |
3134 |
dialog == #move ifTrue:[ |
|
4354
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3135 |
self moveFiles:aColOfSourceFiles to:aDestinationDirectory. |
0a1239cd339d
added copyAs in drag and drop
Claus Gittinger <cg@exept.de>
parents:
4347
diff
changeset
|
3136 |
^ self. |
3892 | 3137 |
]. |
3138 |
! |
|
3139 |
||
3140 |
deleteFile:aFile |
|
3141 |
"delete current selected files/directories |
|
3142 |
" |
|
3143 |
||
3144 |
^ self deleteFiles:(OrderedCollection with:aFile). |
|
3145 |
! |
|
3146 |
||
3147 |
deleteFiles:colOfFiles |
|
3148 |
"delete current selected files/directories |
|
3149 |
" |
|
3150 |
|delete| |
|
3151 |
||
4394 | 3152 |
self withWaitCursorDo:[ |
3153 |
delete := FileOperation delete deleteFiles:colOfFiles. |
|
3154 |
delete result ifFalse:[ |
|
4523 | 3155 |
self notify:delete errorString. |
4394 | 3156 |
]. |
3157 |
self updateCurrentDirectory. |
|
3892 | 3158 |
]. |
3159 |
^ delete result. |
|
3160 |
! |
|
3161 |
||
3162 |
moveFile:aSourceFile to:aDestFile |
|
3163 |
"defete current selected files/directories |
|
3164 |
" |
|
3165 |
||
3166 |
|move| |
|
3167 |
||
3168 |
move := FileOperation move moveFile:aSourceFile to:aDestFile. |
|
3169 |
move result ifTrue:[ |
|
4523 | 3170 |
self notify:('move ', aSourceFile asString, ' to ', aDestFile asString). |
3892 | 3171 |
] ifFalse:[ |
4523 | 3172 |
self notify:move errorString. |
3892 | 3173 |
]. |
3174 |
self updateCurrentDirectory. |
|
3175 |
^ move result |
|
3176 |
! |
|
3177 |
||
3178 |
moveFiles:aColOfSourceFiles to:aDirectory |
|
3179 |
"move aColOfSourceFiles to aDirectory |
|
3180 |
" |
|
3181 |
|move| |
|
3182 |
||
3183 |
move := FileOperation move moveFiles:aColOfSourceFiles to:aDirectory. |
|
3184 |
move result ifFalse:[ |
|
4523 | 3185 |
self notify:move errorString. |
3892 | 3186 |
]. |
3187 |
self updateCurrentDirectory. |
|
3188 |
^ move colOfMovedFiles |
|
3189 |
! |
|
3190 |
||
3191 |
newDirectory |
|
3192 |
"ask for and create a new directory" |
|
3193 |
||
4521 | 3194 |
|selectedFiles singleSelectedFile defaultAnswer directories directory createOp newFile mime| |
3892 | 3195 |
|
3196 |
directories := self currentDirectories value. |
|
3197 |
(directories size ~= 1) ifTrue:[^ self]. |
|
3198 |
directory := directories first. |
|
4521 | 3199 |
|
3200 |
"/ clever default if selection is an archive... |
|
3201 |
selectedFiles := self selectedFiles. |
|
3202 |
selectedFiles size == 1 ifTrue:[ |
|
3203 |
singleSelectedFile := selectedFiles first. |
|
3204 |
||
3205 |
mime := MIMETypes mimeTypeForFilename:singleSelectedFile. |
|
3206 |
(mime notNil and:[mime isArchive]) ifTrue:[ |
|
3207 |
defaultAnswer := singleSelectedFile asFilename withoutSuffix baseName. |
|
3208 |
||
3209 |
mime := MIMETypes mimeTypeForFilename:defaultAnswer. |
|
3210 |
mime isArchive ifTrue:[ |
|
3211 |
defaultAnswer := defaultAnswer asFilename withoutSuffix baseName |
|
3212 |
]. |
|
3213 |
]. |
|
3214 |
]. |
|
3215 |
||
3216 |
createOp := FileOperation create new. |
|
3217 |
defaultAnswer notNil ifTrue:[ |
|
3218 |
createOp createDirectoryIn:directory initialAnswer:defaultAnswer. |
|
3219 |
] ifFalse:[ |
|
3220 |
createOp createDirectoryIn:directory. |
|
3221 |
]. |
|
3222 |
createOp result ifFalse:[ ^ self]. |
|
3223 |
newFile := createOp createdFile. |
|
3892 | 3224 |
newFile notNil ifTrue:[ |
4414 | 3225 |
self updateCurrentDirectory. |
3892 | 3226 |
] |
3227 |
! |
|
3228 |
||
3229 |
newFile |
|
3230 |
"ask for and create a new file" |
|
3231 |
||
3232 |
| curFile directories directory create file| |
|
3233 |
||
3234 |
directories := self currentDirectories value. |
|
3235 |
(directories size ~= 1) ifTrue:[^ self]. |
|
3236 |
directory := directories first. |
|
3982 | 3237 |
curFile := self firstSelectedFile. |
3892 | 3238 |
curFile notNil ifTrue:[ |
4414 | 3239 |
file := curFile. |
3892 | 3240 |
] ifFalse:[ |
4414 | 3241 |
file := directory. |
3892 | 3242 |
]. |
3243 |
create := FileOperation create createFileIn:file. |
|
3244 |
create result ifFalse:[ ^ self]. |
|
3245 |
self updateAndSelect:(OrderedCollection with:(create createdFile)). |
|
3246 |
! |
|
3247 |
||
3248 |
newHardLink |
|
3249 |
"ask for and create a hard link (unix only)" |
|
3250 |
||
3251 |
self newLink:false. |
|
3252 |
! |
|
3253 |
||
3254 |
newLink:symbolic |
|
3255 |
||
3256 |
"ask for and create a symbolic if symbolic is true otherwise a hard link (unix only)" |
|
3257 |
||
3258 |
| sel create createdFile| |
|
3259 |
||
3260 |
sel := self currentFileNameHolder value. |
|
3261 |
(sel size ~= 1) ifTrue:[^ self]. |
|
3262 |
symbolic ifTrue:[ |
|
4414 | 3263 |
create := FileOperation create createSoftLinkIn:(sel first). |
3892 | 3264 |
] ifFalse:[ |
4414 | 3265 |
create := FileOperation create createHardLinkIn:(sel first). |
3892 | 3266 |
]. |
3267 |
create result ifFalse:[ ^ self]. |
|
3268 |
createdFile := create createdFile. |
|
3269 |
createdFile notNil ifTrue:[ |
|
4414 | 3270 |
self updateAndSelect:(OrderedCollection with:createdFile). |
3892 | 3271 |
]. |
3272 |
! |
|
3273 |
||
3274 |
newSoftLink |
|
3275 |
"ask for and create a soft link (unix only)" |
|
3276 |
||
3277 |
self newLink:true. |
|
3278 |
! |
|
3279 |
||
3280 |
pasteFiles |
|
3281 |
"defete current selected files/directories |
|
3282 |
" |
|
3283 |
| buffer destination files directories copiedFiles| |
|
3284 |
||
3285 |
files := self clipboard files. |
|
3286 |
(files isNil or:[files isEmpty]) ifTrue:[ ^ self ]. |
|
3287 |
buffer := self clipboard copy. |
|
3982 | 3288 |
directories := self currentSelectedDirectories. |
3892 | 3289 |
directories isEmpty ifTrue:[ |
4414 | 3290 |
|box dirStringCol| |
3291 |
dirStringCol := directories collect:[:aDir| aDir asString]. |
|
3292 |
box := ListSelectionBox new. |
|
3293 |
box title:'In which directory you want to paste ?'. |
|
3294 |
box list:dirStringCol. |
|
3295 |
box okAction:[:sel | destination := sel asFilename]. |
|
3296 |
box showAtPointer |
|
3892 | 3297 |
] ifFalse:[ |
4414 | 3298 |
destination := directories first. |
3892 | 3299 |
]. |
3300 |
copiedFiles := self copyFiles:(buffer files) to:destination. |
|
3301 |
||
3302 |
(self clipboard method == #cut) ifTrue:[ |
|
4414 | 3303 |
self deleteFiles:copiedFiles. |
3892 | 3304 |
] |
3305 |
! |
|
3306 |
||
3307 |
renameFile:aFile |
|
3308 |
"rename the selected file(s)" |
|
3309 |
||
3310 |
^ self renameFiles:(OrderedCollection with:aFile). |
|
3311 |
! |
|
3312 |
||
4230 | 3313 |
renameFile:filename to:newFileString update:aBoolean |
3892 | 3314 |
"rename filename to newFileString" |
3315 |
||
3316 |
|rename| |
|
3317 |
||
3318 |
rename := FileOperation rename renameFile:filename to:newFileString. |
|
3319 |
rename result ifTrue:[ |
|
4230 | 3320 |
aBoolean ifTrue:[ |
3321 |
self updateAndSelect:(rename renamedFiles). |
|
3322 |
]. |
|
3892 | 3323 |
] ifFalse:[ |
4523 | 3324 |
self notify:rename errorString. |
3892 | 3325 |
]. |
3326 |
^ rename result |
|
3327 |
! |
|
3328 |
||
3329 |
renameFiles:aColOfFiles |
|
3330 |
"rename the selected file(s)" |
|
3331 |
||
3332 |
|rename| |
|
3333 |
||
3334 |
rename := FileOperation rename renameFiles:aColOfFiles. |
|
3335 |
rename result ifFalse:[ |
|
4523 | 3336 |
self notify:rename errorString |
3892 | 3337 |
] ifTrue:[ |
4230 | 3338 |
"/ self updateAndSelect:(rename renamedFiles) |
3892 | 3339 |
]. |
3340 |
^ rename result |
|
3341 |
! |
|
3342 |
||
3343 |
renameSelection |
|
3344 |
"rename the selected file(s)" |
|
3345 |
||
4230 | 3346 |
self renameFiles:self currentFileNameHolder value |
3892 | 3347 |
! ! |
3348 |
||
4080 | 3349 |
!AbstractFileBrowser methodsFor:'menu accessing'! |
3892 | 3350 |
|
3952 | 3351 |
bookmarksMenuSpec |
3352 |
"This resource specification was automatically generated |
|
3353 |
by the MenuEditor of ST/X." |
|
3354 |
||
3355 |
"Do not manually edit this!! If it is corrupted, |
|
3356 |
the MenuEditor may not be able to read the specification." |
|
3357 |
||
3358 |
" |
|
3359 |
MenuEditor new openOnClass:FileBrowser andSelector:#bookmarksMenuSpec |
|
3360 |
(Menu new fromLiteralArrayEncoding:(AbstractFileBrowser bookmarksMenuSpec)) startUp |
|
3361 |
" |
|
3362 |
<resource: #programMenu> |
|
3363 |
||
4080 | 3364 |
|menuSpec menu bookmarks| |
3365 |
||
3366 |
menuSpec := self class baseBookmarksMenuSpec. |
|
3367 |
menu := menuSpec decodeAsLiteralArray. |
|
3368 |
menu findGuiResourcesIn:self. |
|
3952 | 3369 |
menu receiver:self. |
3370 |
bookmarks := self class directoryBookmarks. |
|
3371 |
"/ add the history items ... |
|
3372 |
||
3373 |
bookmarks size > 0 ifTrue:[ |
|
4414 | 3374 |
menu addItem:(MenuItem labeled:'-'). |
3375 |
bookmarks do:[:dirName | |
|
3376 |
menu addItem:((MenuItem label:dirName asString value:[ |
|
3377 |
(self currentDirectories value includes:dirName) ifFalse:[ |
|
3378 |
self currentFileNameHolder value:(OrderedCollection with:dirName). |
|
3379 |
]. |
|
3380 |
])). |
|
3381 |
]. |
|
3952 | 3382 |
]. |
3383 |
^ menu |
|
3384 |
||
3385 |
"Modified: / 17.8.1998 / 10:13:05 / cg" |
|
3386 |
! |
|
3387 |
||
4347 | 3388 |
canBackward |
3389 |
||
3390 |
||
3391 |
^ self dirHistory canBackward. |
|
3906 | 3392 |
! |
3393 |
||
3394 |
canForward |
|
3395 |
||
3964 | 3396 |
"/ | currentSelection | |
3397 |
"/ |
|
3398 |
"/ currentSelection := self currentDirectories value. |
|
3399 |
"/ currentSelection size ~~ 1 ifTrue:[ ^ false]. |
|
3400 |
||
3906 | 3401 |
^ self dirHistory canForward. |
3402 |
! |
|
3403 |
||
3892 | 3404 |
menuDirHistory:backOrForward |
3405 |
"initialize the directory menu |
|
3406 |
" |
|
3407 |
<resource: #programMenu > |
|
3408 |
||
3964 | 3409 |
|menu pathList currentSel currentPath| |
3892 | 3410 |
|
3411 |
menu := Menu new. |
|
3412 |
menu receiver:self. |
|
3413 |
||
3414 |
self dirHistory isEmpty ifTrue:[^ nil]. |
|
3415 |
backOrForward == #back ifTrue:[ |
|
4347 | 3416 |
currentSel := self currentDirectories value. |
3417 |
currentSel size == 1 ifTrue:[ |
|
3418 |
currentPath := currentSel first asString. |
|
3419 |
] ifFalse:[ |
|
3420 |
currentPath := nil. |
|
3421 |
]. |
|
3422 |
pathList := self dirHistory getBackCollection. |
|
3892 | 3423 |
] ifFalse:[ |
4347 | 3424 |
pathList := self dirHistory getForwardCollection. |
3892 | 3425 |
]. |
4022 | 3426 |
pathList isEmpty ifTrue:[ ^ nil]. |
3964 | 3427 |
pathList do:[:aPath| |
4347 | 3428 |
| menuItem | |
3429 |
menuItem := MenuItem new. |
|
3430 |
menuItem label:aPath. |
|
3431 |
menuItem value:[ |
|
3432 |
self currentFileNameHolder value:(OrderedCollection with:(aPath asFilename)). |
|
3433 |
]. |
|
3434 |
menu addItem:menuItem. |
|
3952 | 3435 |
]. |
3892 | 3436 |
^ menu |
3437 |
! |
|
3438 |
||
3439 |
menuDirHistoryBack |
|
3440 |
"initialize the directory menu |
|
3441 |
" |
|
3442 |
<resource: #programMenu > |
|
3443 |
||
3444 |
^ self menuDirHistory:#back. |
|
3445 |
! |
|
3446 |
||
3447 |
menuDirHistoryForward |
|
3448 |
"initialize the directory menu |
|
3449 |
" |
|
3450 |
<resource: #programMenu > |
|
3451 |
||
3452 |
^ self menuDirHistory:#forward. |
|
3906 | 3453 |
! |
3454 |
||
3455 |
menuFileHistory |
|
3456 |
"initialize the file history menu |
|
3457 |
" |
|
3458 |
<resource: #programMenu > |
|
3459 |
||
3460 |
|menu hist text removeItem removeCol| |
|
3461 |
||
3462 |
menu := Menu new. |
|
4080 | 3463 |
menu findGuiResourcesIn:self. |
3906 | 3464 |
menu receiver:self. |
3465 |
||
3466 |
hist := self fileHistory. |
|
3467 |
hist isEmpty ifTrue:[^ nil]. |
|
4391
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3468 |
|
3906 | 3469 |
removeCol := OrderedCollection new. |
3470 |
hist do:[:aFileItem| |
|
4391
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3471 |
aFileItem fileName exists ifTrue:[ |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3472 |
menu addItem:(MenuItem label: aFileItem fileName asString value:[ |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3473 |
self currentFileNameHolder value:(OrderedCollection with:(aFileItem fileName)). |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3474 |
self openApplByFileItem:aFileItem |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3475 |
]). |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3476 |
] ifFalse:[ |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3477 |
removeCol add:aFileItem. |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3478 |
] |
3906 | 3479 |
]. |
3480 |
"/ remove all not existing history entries |
|
3481 |
removeCol do:[ : el | |
|
4391
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3482 |
hist remove:el. |
3906 | 3483 |
]. |
4080 | 3484 |
removeItem := MenuItem new. |
3485 |
removeItem translateLabel:true. |
|
4391
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3486 |
text := resources string:'Clear History'. |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3487 |
"/ text := LabelAndIcon icon:(self class clearHistoryIcon) string:text. |
4080 | 3488 |
removeItem label:text. |
3489 |
removeItem value:[ |
|
4391
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3490 |
self fileHistory removeAll. |
05ad03de6f3c
no icon in clearHistory menuItem
Claus Gittinger <cg@exept.de>
parents:
4368
diff
changeset
|
3491 |
self enableFileHistory value:false. |
3906 | 3492 |
]. |
3493 |
menu addItem:(MenuItem label:'-'). |
|
3494 |
menu addItem:removeItem. |
|
3495 |
^ menu |
|
3952 | 3496 |
! |
3497 |
||
4080 | 3498 |
sortMenu |
3499 |
||
3500 |
<resource: #programMenu > |
|
3501 |
||
3502 |
|menu| |
|
3503 |
||
3504 |
menu := Menu new fromLiteralArrayEncoding:self class sortMenu. |
|
3505 |
menu ifNil:[ ^ nil ]. |
|
3506 |
menu findGuiResourcesIn:self. |
|
3507 |
menu receiver:self. |
|
3508 |
^ menu |
|
3509 |
! |
|
3510 |
||
3511 |
viewDetailsMenuSpec |
|
3512 |
^self class viewDetailsMenuSpec |
|
3513 |
! |
|
3514 |
||
3515 |
viewInContentsBrowserMenu |
|
3516 |
||
3517 |
^ self application:#DirectoryContentsBrowser do:#viewBrowserMenu |
|
3518 |
! |
|
3519 |
||
3952 | 3520 |
visitedDirectoriesMenu |
3521 |
||
3522 |
<resource: #programMenu > |
|
3523 |
||
3524 |
|menu histCopy text removeItem| |
|
3525 |
||
3526 |
menu := Menu new. |
|
3527 |
menu receiver:self. |
|
3528 |
||
3529 |
self dirHistory isEmpty ifTrue:[^ nil]. |
|
4040 | 3530 |
text := LabelAndIcon icon:(self class clearHistoryIcon) string:(resources string:'Clear History'). |
3952 | 3531 |
removeItem := MenuItem new. |
4040 | 3532 |
removeItem translateLabel:true. |
3952 | 3533 |
removeItem label:text. |
3534 |
removeItem value:[ |
|
4347 | 3535 |
self dirHistory removeAll. |
3536 |
self enableForward value:self canForward. |
|
3537 |
self enableBack value:self canBackward. |
|
3952 | 3538 |
]. |
3539 |
histCopy := self dirHistory. |
|
3540 |
histCopy do:[:aFile| |
|
4347 | 3541 |
menu addItem:(MenuItem label:aFile asString value:[ |
3542 |
self currentFileNameHolder value:(OrderedCollection with:(aFile path asFilename)). |
|
3543 |
]). |
|
3952 | 3544 |
]. |
3545 |
menu addItem:(MenuItem label:'-'). |
|
3546 |
menu addItem:removeItem. |
|
3547 |
^ menu |
|
3892 | 3548 |
! ! |
3549 |
||
4358 | 3550 |
!AbstractFileBrowser methodsFor:'menu actions - cvs'! |
3892 | 3551 |
|
3552 |
cvsAddAndCommit |
|
3553 |
||
4046
2f096def132b
commit in after add checks now only the added files in not all
penk
parents:
4040
diff
changeset
|
3554 |
|sel log cmd dir executionBlock nameString block| |
3892 | 3555 |
|
3556 |
log := Dialog |
|
4414 | 3557 |
requestText:(resources string:'enter initial log message') |
3558 |
lines:10 |
|
3559 |
columns:70 |
|
3560 |
initialAnswer:nil. |
|
3892 | 3561 |
|
3982 | 3562 |
sel := self currentSelectedFiles. |
3892 | 3563 |
executionBlock := [ : stream | |
4414 | 3564 |
log notNil ifTrue:[ |
3565 |
sel size > 0 ifTrue:[ |
|
3566 |
sel do:[:fn | |
|
3567 |
dir := self getDirWithoutFileName:fn. |
|
3568 |
cmd := ('cvs add -m ''' , log , ''' ' , fn baseName). |
|
3569 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir. |
|
3570 |
block value:stream. |
|
3571 |
cmd := ('cvs commit -l -m ''' , log , ''' ' , fn baseName). |
|
3572 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir. |
|
3573 |
block value:stream. |
|
3574 |
] |
|
3575 |
] |
|
3576 |
] |
|
3892 | 3577 |
]. |
4107 | 3578 |
nameString := 'Command> cvs add and commit'. |
3892 | 3579 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
3580 |
! |
|
3581 |
||
3582 |
cvsCommit |
|
3583 |
||
4107 | 3584 |
|nSel log msg cmd selectedFiles sel executionBlock nameString| |
3892 | 3585 |
|
3982 | 3586 |
selectedFiles:= self currentSelectedFiles. |
3892 | 3587 |
nSel := selectedFiles size. |
3588 |
||
3589 |
nSel == 1 ifTrue:[ |
|
4414 | 3590 |
msg := resources string:'enter log message for checkIn of ''%1''' with:(selectedFiles first baseName) |
3892 | 3591 |
] ifFalse:[ |
4414 | 3592 |
nSel > 1 ifTrue:[ |
3593 |
msg := resources string:'enter log message for %1 files to checkIn' with:nSel printString |
|
3594 |
] ifFalse:[ |
|
3595 |
msg := resources string:'enter log message for checkIn' |
|
3596 |
] |
|
3892 | 3597 |
]. |
3598 |
||
3599 |
log := Dialog |
|
4414 | 3600 |
requestText:msg |
3601 |
lines:10 |
|
3602 |
columns:70 |
|
3603 |
initialAnswer:nil. |
|
3892 | 3604 |
|
3605 |
log notNil ifTrue:[ |
|
4414 | 3606 |
sel := self currentFileNameHolder value. |
3607 |
sel isEmpty ifTrue:[ ^ self ]. |
|
3608 |
executionBlock := [ : stream | |
|
3609 |
log notNil ifTrue:[ |
|
3610 |
sel size > 0 ifTrue:[ |
|
3611 |
sel do:[:fn | |
|
3612 |
| dir block | |
|
3613 |
dir := fn directory. |
|
3614 |
cmd := ('cvs commit -m ''' , log , ''' ' , fn baseName). |
|
3615 |
block := self getExecutionBlockForCommand:cmd inDirectory:dir. |
|
3616 |
block value:stream. |
|
3617 |
] |
|
3618 |
] |
|
3619 |
] |
|
3620 |
]. |
|
4107 | 3621 |
]. |
3622 |
nameString := 'Command> cvs commit'. |
|
3623 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
|
3892 | 3624 |
! |
3625 |
||
3626 |
cvsRemoveAndRemoveFromCVS:filesToRemove |
|
3627 |
"remove the selected file(s) and their CVS containers - no questions asked" |
|
3628 |
||
3629 |
|msg toRemove updateRunning cmd executionBlock nameString| |
|
3630 |
||
3631 |
updateRunning := self backgroundProcesses value notEmpty. |
|
3632 |
self killAllRunningBackgroundProcesses. |
|
3633 |
toRemove := OrderedCollection new. |
|
3634 |
||
3635 |
executionBlock := [ : stream | |
|
4414 | 3636 |
| block | |
3637 |
filesToRemove do:[:fileName | |
|
3638 |
OperatingSystem accessDeniedErrorSignal handle:[:ex| |
|
3639 |
"was not able to remove it" |
|
3640 |
| lastError | |
|
3641 |
lastError := OperatingSystem lastErrorString. |
|
3642 |
msg := (resources string:'cannot remove ''%1'' !!' with:fileName). |
|
3643 |
lastError isNil ifFalse:[ |
|
3644 |
msg := msg , '\\(' , lastError , ')' |
|
3645 |
]. |
|
3646 |
Dialog warn:msg withCRs |
|
3647 |
] do:[ |
|
3648 |
|answer contents| |
|
3649 |
||
3650 |
(fileName isSymbolicLink not) ifTrue:[ |
|
3651 |
fileName remove. |
|
3652 |
cmd := ('cvs remove -f ' , fileName baseName). |
|
3653 |
block := self getExecutionBlockForCommand:cmd. |
|
3654 |
block value:stream. |
|
3655 |
] |
|
3656 |
]. |
|
3657 |
]. |
|
3658 |
||
3659 |
cmd := ('cvs commit -m ''removed via FileBrowser'''). |
|
3660 |
block := self getExecutionBlockForCommand:cmd. |
|
3661 |
block value:stream. |
|
3892 | 3662 |
]. |
4107 | 3663 |
nameString := 'Command> cvs remove and commit ', filesToRemove first baseName. |
3892 | 3664 |
filesToRemove size > 1 ifTrue:[ |
4414 | 3665 |
nameString := nameString, ' ...'. |
3892 | 3666 |
]. |
3667 |
self makeExecutionResultProcessFor:executionBlock withName:nameString. |
|
3668 |
! |
|
3669 |
||
3670 |
cvsRemoveFileAndCVSContainer |
|
3671 |
||
3672 |
|sel question aswer| |
|
3673 |
||
4294 | 3674 |
sel := self currentSelectedFiles copy. |
3892 | 3675 |
sel size > 0 ifTrue:[ |
4294 | 3676 |
sel size > 1 ifTrue:[ |
3677 |
question := resources string:'Remove %1 selected files and their CVS containers ?' with:(sel size) |
|
3678 |
] ifFalse:[ |
|
3679 |
question := resources string:'Remove ''%1'' and its CVS container ?' with:(sel first baseName allBold) |
|
3680 |
]. |
|
3681 |
||
3682 |
aswer := Dialog |
|
3683 |
confirm:question withCRs |
|
3684 |
yesLabel:(resources at:'Remove') |
|
3685 |
noLabel:(resources at:'Cancel'). |
|
3686 |
aswer ifTrue:[ |
|
3687 |
self withCursor:(Cursor wait) do:[ |
|
3688 |
self cvsRemoveAndRemoveFromCVS:sel |
|
3689 |
] |
|
3690 |
] |
|
3892 | 3691 |
] |
3692 |
! |
|
3693 |
||
3694 |
cvsUpdateAll |
|
3695 |
||
3696 |
| cmd | |
|
3697 |
||
3698 |
cmd := 'cvs upd -l'. |
|
3699 |
self executeCommand:cmd. |
|
3700 |
! |
|
3701 |
||
3702 |
cvsUpdateAllRecursive |
|
3703 |
||
3704 |
| cmd | |
|
3705 |
||
3706 |
cmd := 'cvs upd -d'. |
|
3707 |
self executeCommand:cmd. |
|
3708 |
! |
|
3709 |
||
3710 |
cvsUpdateSelection |
|
3711 |
||
3712 |
| selectedFiles stream| |
|
3713 |
||
3714 |
||
3982 | 3715 |
selectedFiles:= self currentSelectedFiles. |
3892 | 3716 |
stream := WriteStream on:''. |
3717 |
stream nextPutAll:'cvs upd '. |
|
3718 |
selectedFiles do:[: file | |
|
4414 | 3719 |
stream nextPutAll:file baseName. |
3720 |
stream space. |
|
3892 | 3721 |
]. |
3722 |
self executeCommand:stream contents. |
|
3723 |
stream close. |
|
3724 |
! ! |
|
3725 |
||
3726 |
!AbstractFileBrowser methodsFor:'menu actions edit'! |
|
3727 |
||
4453
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3728 |
copyFiles |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3729 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3730 |
| files dirs| |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3731 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3732 |
files := self currentSelectedFiles. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3733 |
files notEmpty ifTrue:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3734 |
self copyFilesToClipBoard:(files). |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3735 |
] ifFalse:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3736 |
dirs := self currentSelectedDirectories. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3737 |
dirs notEmpty ifTrue:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3738 |
self copyFilesToClipBoard:(dirs). |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3739 |
]. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3740 |
]. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3741 |
! |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3742 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3743 |
cutFiles |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3744 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3745 |
| files dirs| |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3746 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3747 |
files := self currentSelectedFiles. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3748 |
files notEmpty ifTrue:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3749 |
self cutFilesToClipBoard:(files). |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3750 |
] ifFalse:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3751 |
dirs := self currentSelectedDirectories. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3752 |
dirs notEmpty ifTrue:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3753 |
self cutFilesToClipBoard:(dirs). |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3754 |
]. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3755 |
]. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3756 |
! |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3757 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3758 |
deleteFiles |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3759 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3760 |
| files dirs| |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3761 |
|
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3762 |
files := self currentSelectedFiles. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3763 |
files notEmpty ifTrue:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3764 |
self deleteFiles:(files). |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3765 |
] ifFalse:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3766 |
dirs := self currentSelectedDirectories. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3767 |
dirs notEmpty ifTrue:[ |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3768 |
self deleteFiles:(dirs). |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3769 |
]. |
00e639bf2723
cut and copy files in toolbarmenu goes not to contentsbrowser only
penk
parents:
4432
diff
changeset
|
3770 |
]. |
3892 | 3771 |
! ! |
3772 |
||
3773 |
!AbstractFileBrowser methodsFor:'menu actions tools'! |
|
3774 |
||
4367 | 3775 |
convertImageToGIF |
4531 | 3776 |
self |
3777 |
convertImageUsingChain: |
|
3778 |
(Array |
|
3779 |
with:('ppm' -> 'xpmtoppm') |
|
3780 |
with:('gif' -> 'ppmtogif') |
|
3781 |
) |
|
3782 |
||
3783 |
"/ |img tempFileXPM tempFilePPM tempFileGIF| |
|
3784 |
"/ |
|
3785 |
"/ [ |
|
3786 |
"/ self withActivityIndicationDo:[ |
|
3787 |
"/ self currentFileNameHolder value do:[:fileName | |
|
3788 |
"/ fileName isDirectory ifFalse:[ |
|
3789 |
"/ self notify:('Convert to GIF:', fileName baseName). |
|
3790 |
"/ img := Image fromFile:(fileName pathName). |
|
3791 |
"/ img notNil ifTrue:[ |
|
3792 |
"/ tempFileXPM := Filename newTemporary withSuffix:'xpm'. |
|
3793 |
"/ tempFilePPM := tempFileXPM withSuffix:'ppm'. |
|
3794 |
"/ tempFileGIF := tempFileXPM withSuffix:'gif'. |
|
3795 |
"/ [ |
|
3796 |
"/ img saveOn:tempFileXPM using:XPMReader. |
|
3797 |
"/ |
|
3798 |
"/ |
|
3799 |
"/ (OperatingSystem |
|
3800 |
"/ executeCommand:('xpmtoppm %1 > %2' |
|
3801 |
"/ bindWith:tempFileXPM pathName |
|
3802 |
"/ with:tempFilePPM pathName)) |
|
3803 |
"/ ifFalse:[ |
|
3804 |
"/ self warn:'Cannot convert to ppm format'. |
|
3805 |
"/ ] ifTrue:[ |
|
3806 |
"/ (OperatingSystem |
|
3807 |
"/ executeCommand:('ppmtogif %1 > %2' |
|
3808 |
"/ bindWith:tempFilePPM pathName |
|
3809 |
"/ with:tempFileGIF pathName)) |
|
3810 |
"/ ifFalse:[ |
|
3811 |
"/ self warn:'Cannot convert to gif format'. |
|
3812 |
"/ ] ifTrue:[ |
|
3813 |
"/ tempFileGIF moveTo:(fileName withSuffix:'gif'). |
|
3814 |
"/ self updateAndSelect:nil. |
|
3815 |
"/ ]. |
|
3816 |
"/ ]. |
|
3817 |
"/ ] ensure:[ |
|
3818 |
"/ tempFileXPM delete. |
|
3819 |
"/ tempFilePPM delete. |
|
3820 |
"/ tempFileGIF delete. |
|
3821 |
"/ ] |
|
3822 |
"/ ] ifFalse:[ |
|
3823 |
"/ self warn:'Unknown format/not an image: ' , fileName asString |
|
3824 |
"/ ] |
|
3825 |
"/ ] |
|
3826 |
"/ ]. |
|
3827 |
"/ self notify:''. |
|
3828 |
"/ ] |
|
3829 |
"/ ] fork. |
|
3830 |
! |
|
3831 |
||
3832 |
convertImageToPNG |
|
3833 |
self |
|
3834 |
convertImageUsingChain: |
|
3835 |
(Array |
|
3836 |
with:('ppm' -> 'xpmtoppm') |
|
3837 |
with:('png' -> 'ppmtopng') |
|
3838 |
) |
|
3839 |
||
3840 |
"/ |img tempFileXPM tempFilePPM tempFilePNG| |
|
3841 |
"/ |
|
3842 |
"/ [ |
|
3843 |
"/ self withActivityIndicationDo:[ |
|
3844 |
"/ self currentFileNameHolder value do:[:fileName | |
|
3845 |
"/ fileName isDirectory ifFalse:[ |
|
3846 |
"/ self notify:('Convert to PNG:', fileName baseName). |
|
3847 |
"/ img := Image fromFile:(fileName pathName). |
|
3848 |
"/ img notNil ifTrue:[ |
|
3849 |
"/ tempFileXPM := Filename newTemporary withSuffix:'xpm'. |
|
3850 |
"/ tempFilePPM := tempFileXPM withSuffix:'ppm'. |
|
3851 |
"/ tempFilePNG := tempFileXPM withSuffix:'png'. |
|
3852 |
"/ [ |
|
3853 |
"/ img saveOn:tempFileXPM using:XPMReader. |
|
3854 |
"/ |
|
3855 |
"/ |
|
3856 |
"/ (OperatingSystem |
|
3857 |
"/ executeCommand:('xpmtoppm %1 > %2' |
|
3858 |
"/ bindWith:tempFileXPM pathName |
|
3859 |
"/ with:tempFilePPM pathName)) |
|
3860 |
"/ ifFalse:[ |
|
3861 |
"/ self warn:'Cannot convert to ppm format'. |
|
3862 |
"/ ] ifTrue:[ |
|
3863 |
"/ (OperatingSystem |
|
3864 |
"/ executeCommand:('ppmtopng %1 > %2' |
|
3865 |
"/ bindWith:tempFilePPM pathName |
|
3866 |
"/ with:tempFilePNG pathName)) |
|
3867 |
"/ ifFalse:[ |
|
3868 |
"/ self warn:'Cannot convert to gif format'. |
|
3869 |
"/ ] ifTrue:[ |
|
3870 |
"/ tempFilePNG moveTo:(fileName withSuffix:'png'). |
|
3871 |
"/ self updateAndSelect:nil. |
|
3872 |
"/ ]. |
|
3873 |
"/ ]. |
|
3874 |
"/ ] ensure:[ |
|
3875 |
"/ tempFileXPM delete. |
|
3876 |
"/ tempFilePPM delete. |
|
3877 |
"/ tempFilePNG delete. |
|
3878 |
"/ ] |
|
3879 |
"/ ] ifFalse:[ |
|
3880 |
"/ self warn:'Unknown format/not an image: ' , fileName asString |
|
3881 |
"/ ] |
|
3882 |
"/ ] |
|
3883 |
"/ ]. |
|
3884 |
"/ self notify:''. |
|
3885 |
"/ ] |
|
3886 |
"/ ] fork. |
|
3887 |
! |
|
3888 |
||
3889 |
convertImageUsingChain:chainOfConversions |
|
3890 |
|img tempFileXPM| |
|
4367 | 3891 |
|
3892 |
[ |
|
3893 |
self withActivityIndicationDo:[ |
|
3894 |
self currentFileNameHolder value do:[:fileName | |
|
4531 | 3895 |
|inFile outFile| |
3896 |
||
3897 |
self notify:('Converting:', fileName baseName). |
|
4367 | 3898 |
fileName isDirectory ifFalse:[ |
3899 |
img := Image fromFile:(fileName pathName). |
|
3900 |
img notNil ifTrue:[ |
|
3901 |
tempFileXPM := Filename newTemporary withSuffix:'xpm'. |
|
4531 | 3902 |
|
4367 | 3903 |
[ |
3904 |
img saveOn:tempFileXPM using:XPMReader. |
|
3905 |
||
4531 | 3906 |
inFile := tempFileXPM. |
3907 |
chainOfConversions do:[:eachConversionSuffixCommandPair | |
|
3908 |
|eachConversionSuffix eachConversionCommand| |
|
3909 |
||
3910 |
eachConversionSuffix := eachConversionSuffixCommandPair key. |
|
3911 |
eachConversionCommand := eachConversionSuffixCommandPair value. |
|
3912 |
||
3913 |
self notify:('Converting to ', eachConversionSuffix , '...'). |
|
3914 |
outFile := Filename newTemporary withSuffix:eachConversionSuffix. |
|
4367 | 3915 |
(OperatingSystem |
4531 | 3916 |
executeCommand:('%1 %2 > %3' |
3917 |
bindWith:eachConversionCommand |
|
3918 |
with:inFile pathName |
|
3919 |
with:outFile pathName)) |
|
4367 | 3920 |
ifFalse:[ |
4531 | 3921 |
inFile delete. |
3922 |
outFile delete. |
|
3923 |
self warn:('Conversion to %1 using %2 failed.' |
|
3924 |
bindWith:eachConversionSuffix |
|
3925 |
with:eachConversionCommand allBold). |
|
3926 |
^ self. |
|
4367 | 3927 |
]. |
4531 | 3928 |
inFile delete. |
3929 |
inFile := outFile. |
|
4367 | 3930 |
]. |
3931 |
] ensure:[ |
|
4531 | 3932 |
inFile delete. |
3933 |
outFile delete. |
|
3934 |
]. |
|
3935 |
||
3936 |
outFile moveTo:(fileName withSuffix:(chainOfConversions last key)). |
|
3937 |
self updateAndSelect:nil. |
|
4367 | 3938 |
] ifFalse:[ |
3939 |
self warn:'Unknown format/not an image: ' , fileName asString |
|
3940 |
] |
|
3941 |
] |
|
3942 |
]. |
|
4523 | 3943 |
self notify:''. |
4367 | 3944 |
] |
3945 |
] fork. |
|
3946 |
! |
|
3947 |
||
3892 | 3948 |
createProjectAndOpenProjectBrowser |
3949 |
|nm f s directory| |
|
3950 |
||
3951 |
self currentFilesAreInSameDirectory ifFalse:[^ self]. |
|
3952 |
directory := self currentDirectories value first. |
|
3953 |
nm := directory baseName. |
|
3954 |
f := (directory construct:nm) withSuffix:'prj'. |
|
3955 |
f exists ifTrue:[ |
|
4414 | 3956 |
Dialog warn:'A file named ' , f baseName , ' already exists.'. |
3957 |
^ self. |
|
3892 | 3958 |
]. |
3959 |
s := f writeStream. |
|
3960 |
s nextPutAll:' |
|
3961 |
name ''' , nm , ''' |
|
3962 |
type #classLibrary |
|
3963 |
package #''private:' , nm , ''' |
|
3964 |
prerequisites nil |
|
3965 |
||
3966 |
classes #( ) |
|
3967 |
'. |
|
3968 |
s close. |
|
3969 |
ProjectBrowser openOnFile:f. |
|
3970 |
! |
|
3971 |
||
4230 | 3972 |
doMake |
3973 |
||
3974 |
| cmd | |
|
3975 |
||
3976 |
cmd := 'make'. |
|
3977 |
self executeCommand:cmd. |
|
3978 |
! |
|
3979 |
||
4317
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3980 |
doOpenSettings |
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3981 |
|
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3982 |
| inst | |
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3983 |
|
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3984 |
inst := FileBrowserV2SettingsFrame new. |
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3985 |
inst requestor:self. |
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3986 |
inst open. |
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3987 |
! |
bf3f150809c2
settings is a new application now and will be inserted under tools in
penk
parents:
4294
diff
changeset
|
3988 |
|
3892 | 3989 |
fileFileIn |
3990 |
"fileIn the selected file(s)" |
|
3991 |
||
3992 |
self fileFileInLazy:false |
|
3993 |
! |
|
3994 |
||
3995 |
fileFileInLazy |
|
3996 |
"fileIn the selected file(s). Do a quick load (no compilation)" |
|
3997 |
||
3998 |
self fileFileInLazy:true |
|
3999 |
! |
|
4000 |
||
4001 |
fileFileInLazy:lazy |
|
4002 |
"fileIn the selected file(s)" |
|
4003 |
||
4345 | 4004 |
|
4005 |
[ |
|
4006 |
self withActivityIndicationDo:[ |
|
4007 |
| selectedFiles| |
|
4008 |
selectedFiles:= self currentSelectedFiles. |
|
4009 |
selectedFiles do:[:fileName | |
|
4523 | 4010 |
self notify:('File in:', fileName baseName). |
4345 | 4011 |
self singleFileFileIn:fileName lazy:lazy |
4012 |
]. |
|
4523 | 4013 |
self notify:''. |
4345 | 4014 |
] |
4015 |
] fork. |
|
3892 | 4016 |
! |
4017 |
||
4018 |
fileFileInToNameSpace |
|
4019 |
"fileIn the selected file(s)<into a nameSpace" |
|
4020 |
||
4021 |
|ns listOfKnownNameSpaces| |
|
4022 |
||
4023 |
listOfKnownNameSpaces := Set new. |
|
4024 |
NameSpace |
|
4414 | 4025 |
allNamespaces |
4026 |
do:[:eachNameSpace | |
|
4027 |
listOfKnownNameSpaces add:eachNameSpace name |
|
4028 |
]. |
|
3892 | 4029 |
listOfKnownNameSpaces := listOfKnownNameSpaces asOrderedCollection sort. |
4030 |
||
4031 |
ns := Dialog |
|
4414 | 4032 |
request:'During fileIn, new classes are created in nameSpace:' |
4033 |
initialAnswer:(LastEnforcedNameSpace ? Class nameSpaceQuerySignal query name) |
|
4034 |
list:listOfKnownNameSpaces. |
|
3892 | 4035 |
ns isEmptyOrNil ifTrue:[^ self]. |
4036 |
||
4037 |
LastEnforcedNameSpace := ns. |
|
4038 |
ns := NameSpace name:ns. |
|
4039 |
||
4040 |
Class nameSpaceQuerySignal |
|
4414 | 4041 |
answer:ns |
4042 |
do:[ |
|
4043 |
self fileFileInLazy:false |
|
4044 |
] |
|
3892 | 4045 |
! |
4046 |
||
4047 |
fileFindAllDuplicates |
|
4048 |
"scan directory and all subdirs for duplicate files" |
|
4049 |
||
4050 |
|fileNames dir infoDir filesBySize |
|
4051 |
result info dirPrefix myName stream textBox maxLength directories| |
|
4052 |
||
4053 |
||
4054 |
self withWaitCursorDo:[ |
|
4414 | 4055 |
result := Dictionary new. |
4056 |
myName := self class name asString. |
|
4057 |
directories := self currentSelectedDirectories. |
|
4058 |
directories isEmpty ifTrue:[^ self]. |
|
3892 | 4059 |
|
4414 | 4060 |
dir := directories first. |
3892 | 4061 |
"/ self label: myName, '- gathering file names ...'. |
4414 | 4062 |
fileNames := dir recursiveDirectoryContents. |
4063 |
fileNames := fileNames collect:[:fn | dir construct:fn]. |
|
4064 |
fileNames := fileNames select:[:fn | fn isDirectory not]. |
|
3892 | 4065 |
|
4066 |
"/ self label:myName , '- gathering sizes ...'. |
|
4414 | 4067 |
infoDir := Dictionary new. |
4068 |
fileNames do:[:fn | |
|
4069 |
infoDir at:fn put:(fn fileSize) |
|
4070 |
]. |
|
4071 |
||
4072 |
"/ for each, get the files size. |
|
4073 |
"/ in a first pass, look for files of the same size and |
|
4074 |
"/ compare them ... |
|
3892 | 4075 |
|
4076 |
"/ self label:myName , '- preselect possible duplicates ...'. |
|
4414 | 4077 |
filesBySize := Dictionary new. |
4078 |
infoDir keysAndValuesDo:[:fn :sz | |
|
4079 |
|entry| |
|
4080 |
||
4081 |
entry := filesBySize at:sz ifAbsentPut:[Set new]. |
|
4082 |
entry add:fn. |
|
4083 |
]. |
|
4084 |
||
4085 |
"/ any of same size ? |
|
3892 | 4086 |
|
4087 |
"/ self label:myName , '- checking for duplicates ...'. |
|
4414 | 4088 |
filesBySize do:[:entry | |
4089 |
|files| |
|
4090 |
||
4091 |
entry size > 1 ifTrue:[ |
|
4092 |
files := entry asArray. |
|
4093 |
1 to:files size-1 do:[:idx1 | |
|
4094 |
idx1+1 to:files size do:[:idx2 | |
|
4095 |
|fn1 fn2| |
|
4096 |
||
4097 |
fn1 := files at:idx1. |
|
4098 |
fn2 := files at:idx2. |
|
3892 | 4099 |
|
4100 |
"/ self label:myName , '- checking ' , fn1 baseName , ' vs. ' , fn2 baseName , ' ...'. |
|
4414 | 4101 |
(result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[ |
4102 |
"/ compare the files |
|
4103 |
(fn1 sameContentsAs:fn2) ifTrue:[ |
|
3892 | 4104 |
"/ Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName. |
4414 | 4105 |
result at:fn1 put:fn2. |
4106 |
] |
|
4107 |
] |
|
4108 |
] |
|
4109 |
] |
|
4110 |
] |
|
4111 |
]. |
|
3892 | 4112 |
|
4113 |
"/ self label:myName , '- sorting ...'. |
|
4414 | 4114 |
dirPrefix := dir pathName. |
4115 |
result := result associations. |
|
4116 |
result := result collect:[:assoc | |
|
4117 |
|f1 f2| |
|
4118 |
||
4119 |
f1 := assoc key name. |
|
4120 |
f2 := assoc value name. |
|
4121 |
(f1 startsWith:dirPrefix) ifTrue:[ |
|
4122 |
f1 := f1 copyFrom:dirPrefix size + 2. |
|
4123 |
]. |
|
4124 |
(f2 startsWith:dirPrefix) ifTrue:[ |
|
4125 |
f2 := f2 copyFrom:dirPrefix size + 2. |
|
4126 |
]. |
|
4127 |
f1 < f2 ifTrue:[ |
|
4128 |
f2 -> f1 |
|
4129 |
] ifFalse:[ |
|
4130 |
f1 -> f2 |
|
4131 |
] |
|
4132 |
]. |
|
4133 |
result sort:[:f1 :f2 | f2 value < f1 value]. |
|
4134 |
||
4135 |
info := OrderedCollection new. |
|
4136 |
result do:[:assoc | |
|
4137 |
info add:(assoc key , ' same as ' , assoc value) |
|
4138 |
]. |
|
4139 |
info isEmpty ifTrue:[ |
|
4140 |
info := 'No duplicate files found.' |
|
4141 |
]. |
|
3892 | 4142 |
]. |
4143 |
||
4144 |
stream := WriteStream on:''. |
|
4145 |
info do:[:el| |
|
4414 | 4146 |
stream nextPutAll:el. |
4147 |
stream cr. |
|
3892 | 4148 |
]. |
4149 |
textBox := TextBox new. |
|
4150 |
textBox initialText:(stream contents). |
|
4151 |
textBox title:'File dublicates in directory: ', dir asString. |
|
4152 |
textBox readOnly:true. |
|
4153 |
textBox noCancel. |
|
4154 |
textBox label:'Dublicates in ', dir asString. |
|
4155 |
maxLength := 10. |
|
4156 |
info do:[: el | |
|
4414 | 4157 |
maxLength := maxLength max:(el size). |
3892 | 4158 |
]. |
4159 |
textBox extent:((maxLength * 5)@(info size * 20)); sizeFixed:false. |
|
4160 |
textBox showAtPointer. |
|
4161 |
stream close. |
|
4162 |
"/ subView contents:info. |
|
4163 |
"/ self label:myName. |
|
4164 |
! |
|
4165 |
||
4166 |
fileFindDuplicates |
|
4167 |
"scan directory for duplicate files" |
|
4168 |
||
4050 | 4169 |
|fileNames infoDir filesBySize |
3892 | 4170 |
result info stream textBox maxLength directories allFiles titleStream size| |
4171 |
||
4172 |
"/ (self askIfModified:'contents has not been saved.\\Modifications will be lost when you proceed.' |
|
4173 |
"/ yesButton:'proceed') ifFalse:[^ self]. |
|
4174 |
||
4175 |
self withWaitCursorDo:[ |
|
4355 | 4176 |
result := Dictionary new. |
4177 |
||
4178 |
directories := self currentSelectedDirectories. |
|
4179 |
directories isEmpty ifTrue:[^ self]. |
|
4180 |
||
4181 |
allFiles := OrderedCollection new. |
|
4182 |
directories do:[ : dir| |
|
4183 |
fileNames := dir directoryContents. |
|
4184 |
fileNames := fileNames collect:[:fn | dir construct:fn]. |
|
4185 |
fileNames := fileNames select:[:fn | fn isDirectory not]. |
|
4186 |
allFiles addAll:fileNames. |
|
4187 |
]. |
|
4188 |
||
4189 |
infoDir := Dictionary new. |
|
4190 |
allFiles do:[:fn | |
|
4191 |
infoDir at:fn put:(fn info) |
|
4192 |
]. |
|
4193 |
||
4194 |
"/ for each, get the files size. |
|
4195 |
"/ in a first pass, look for files of the same size and |
|
4196 |
"/ compare them ... |
|
4197 |
||
4198 |
filesBySize := Dictionary new. |
|
4199 |
infoDir keysAndValuesDo:[:fn :info | |
|
4200 |
|sz entry| |
|
4201 |
||
4202 |
sz := info size. |
|
4203 |
entry := filesBySize at:sz ifAbsentPut:[Set new]. |
|
4204 |
entry add:fn. |
|
4205 |
]. |
|
4206 |
||
4207 |
"/ any of same size ? |
|
4208 |
||
4209 |
filesBySize do:[:entry | |
|
4210 |
|files| |
|
4211 |
||
4212 |
entry size > 1 ifTrue:[ |
|
4213 |
files := entry asArray. |
|
4214 |
1 to:files size-1 do:[:idx1 | |
|
4215 |
idx1+1 to:files size do:[:idx2 | |
|
4216 |
|fn1 fn2| |
|
4217 |
||
4218 |
fn1 := files at:idx1. |
|
4219 |
fn2 := files at:idx2. |
|
4220 |
||
4221 |
(result at:fn2 ifAbsent:nil) ~= fn1 ifTrue:[ |
|
4222 |
"/ compare the files |
|
4223 |
(fn1 sameContentsAs:fn2) ifTrue:[ |
|
3892 | 4224 |
"/ Transcript show:'Same: '; show:fn1 baseName; show:' and '; showCR:fn2 baseName. |
4355 | 4225 |
result at:fn1 put:fn2. |
4226 |
] |
|
4227 |
] |
|
4228 |
] |
|
4229 |
] |
|
4230 |
] |
|
4231 |
]. |
|
4232 |
||
4233 |
result := result associations. |
|
4234 |
result := result collect:[:assoc | |
|
4235 |
|f1 f2| |
|
4236 |
||
4237 |
f1 := assoc key asString. |
|
4238 |
f2 := assoc value asString. |
|
4239 |
f1 < f2 ifTrue:[ |
|
4240 |
f2 -> f1 |
|
4241 |
] ifFalse:[ |
|
4242 |
f1 -> f2 |
|
4243 |
] |
|
4244 |
]. |
|
4245 |
result sort:[:f1 :f2 | f2 value < f1 value]. |
|
4246 |
||
4247 |
info := OrderedCollection new. |
|
4248 |
size := self getBestDirectory asString size. |
|
4249 |
result do:[:assoc | |
|
4250 |
|fn1 fn2| |
|
4251 |
||
4252 |
fn1 := assoc key. |
|
4253 |
fn2 := assoc value. |
|
4254 |
size > 1 ifTrue:[ |
|
4255 |
fn1 := ('..', (fn1 copyFrom:(size + 1))). |
|
4256 |
fn2 := ('..', (fn2 copyFrom:(size + 1))). |
|
4257 |
]. |
|
4258 |
(fn1 includes:Character space) ifTrue:[ |
|
4259 |
fn1 := '"' , fn1 , '"' |
|
4260 |
]. |
|
4261 |
(fn2 includes:Character space) ifTrue:[ |
|
4262 |
fn2 := '"' , fn2 , '"' |
|
4263 |
]. |
|
4264 |
info add:(fn1 , ' same as ' , fn2) |
|
4265 |
]. |
|
4266 |
info isEmpty ifTrue:[ |
|
4267 |
info add:'No duplicate files found.' |
|
4268 |
]. |
|
3892 | 4269 |
]. |
4270 |
stream := WriteStream on:''. |
|
4271 |
info do:[:el| |
|
4355 | 4272 |
stream nextPutAll:el. |
4273 |
stream cr. |
|
3892 | 4274 |
]. |
4275 |
titleStream := WriteStream on:''. |
|
4276 |
titleStream nextPutAll:'File dublicates in director'. |
|
4277 |
directories size == 1 ifTrue:[ |
|
4355 | 4278 |
titleStream nextPutAll:'y: ', directories first asString. |
3892 | 4279 |
] ifFalse:[ |
4355 | 4280 |
titleStream nextPutAll:'ies: '. |
4281 |
titleStream cr. |
|
4282 |
directories do:[:dir| |
|
4283 |
size > 1 ifTrue:[ |
|
4284 |
titleStream nextPutAll:'..'. |
|
4285 |
titleStream nextPutAll:((dir asString) copyFrom:(size + 1)). |
|
4286 |
] ifFalse:[ |
|
4287 |
titleStream nextPutAll:(dir asString). |
|
4288 |
]. |
|
4289 |
titleStream cr. |
|
4290 |
] |
|
3892 | 4291 |
]. |
4292 |
||
4293 |
textBox := TextBox new. |
|
4294 |
textBox initialText:(stream contents). |
|
4295 |
textBox title:(titleStream contents). |
|
4296 |
textBox readOnly:true. |
|
4297 |
textBox noCancel. |
|
4170 | 4298 |
stream := WriteStream on:'Dublicates in '. |
4299 |
directories do:[ :aDirectory | |
|
4355 | 4300 |
stream nextPutAll:aDirectory baseName. |
4301 |
stream space. |
|
4050 | 4302 |
]. |
4170 | 4303 |
textBox label:stream contents. |
3892 | 4304 |
maxLength := 10. |
4305 |
info do:[: el | |
|
4355 | 4306 |
maxLength := maxLength max:(el size). |
3892 | 4307 |
]. |
4308 |
textBox extent:((maxLength * 5)@(info size * 10)); sizeFixed:false. |
|
4355 | 4309 |
textBox openModeless. "/ showAtPointer. |
3892 | 4310 |
! |
4311 |
||
4312 |
fileFindFile |
|
4313 |
|filename files| |
|
4314 |
||
4315 |
files := self currentFileNameHolder value. |
|
4316 |
files notEmpty ifTrue:[ |
|
4414 | 4317 |
filename := files first. |
3892 | 4318 |
] ifFalse:[ |
4414 | 4319 |
filename := (Filename homeDirectory). |
3892 | 4320 |
]. |
4101 | 4321 |
FindFileApplication openOnFileName:filename for:self. |
3892 | 4322 |
! |
4323 |
||
4324 |
installAllAsAutoloaded |
|
4325 |
"install all classes found here as autoloaded classes" |
|
4326 |
||
4345 | 4327 |
[ |
4328 |
self withActivityIndicationDo:[ |
|
4343 | 4329 |
self allItemsOfCurrentDirectory do:[:fileItem | |
4330 |
(fileItem hasMimeType and:[fileItem mimeType isSmalltalkSource]) ifTrue:[ |
|
4523 | 4331 |
self notify:('Install as Autoloaded:', fileItem baseName). |
4343 | 4332 |
self installAsAutoloaded:(fileItem fileName). |
4333 |
] |
|
4334 |
]. |
|
4523 | 4335 |
self notify:''. |
4345 | 4336 |
] |
4337 |
] fork. |
|
3892 | 4338 |
! |
4339 |
||
4340 |
installAsAutoloaded:aFilename |
|
4341 |
"install aFilename as autoloaded class" |
|
4342 |
||
4343 |
|chunks s| |
|
4344 |
||
4345 |
chunks := ChangeSet fromStream:(s := aFilename asFilename readStream). s close. |
|
4346 |
chunks |
|
4414 | 4347 |
select:[:eachChunk | eachChunk isClassDefinitionChange] |
4348 |
thenDo:[:eachClassChunk | eachClassChunk installAsAutoloadedClassIfNotPrivate]. |
|
3892 | 4349 |
! |
4350 |
||
4351 |
loadImageAndPerform:aSelectorOrBlock |
|
4352 |
||
4353 |
|img path files| |
|
4354 |
||
3982 | 4355 |
files := self currentSelectedFiles. |
3892 | 4356 |
files isEmpty ifTrue:[ ^ self]. |
4357 |
files do:[:fileName | |
|
4414 | 4358 |
path := fileName. |
4359 |
path isDirectory ifFalse:[ |
|
4360 |
img := Image fromFile:(path pathName). |
|
4361 |
img notNil ifTrue:[ |
|
4362 |
aSelectorOrBlock isSymbol ifTrue:[ |
|
4363 |
img perform:aSelectorOrBlock |
|
4364 |
] ifFalse:[ |
|
4365 |
aSelectorOrBlock value:img |
|
4366 |
] |
|
4367 |
] ifFalse:[ |
|
4368 |
Dialog warn:'unknown format: ' , fileName asString |
|
4369 |
] |
|
4370 |
] |
|
3892 | 4371 |
]. |
4372 |
! |
|
4373 |
||
4374 |
openASN1Browser |
|
4375 |
||
4376 |
self openTool:OSI::ASN1Browser |
|
4377 |
! |
|
4378 |
||
4379 |
openAppletViewer |
|
4380 |
|numItems files| |
|
4381 |
||
3982 | 4382 |
files := self currentSelectedFiles. |
3892 | 4383 |
(numItems := files size) > 2 ifTrue:[ |
4414 | 4384 |
(self |
4385 |
confirm:(resources string:'open for each of the %1 items ?' |
|
4386 |
with:numItems)) ifFalse:[^ self]. |
|
3892 | 4387 |
]. |
4388 |
||
4389 |
Java startupJavaSystem. |
|
4390 |
"/ Java markAllClassesUninitialized. |
|
4391 |
"/ Java initAllStaticFields. |
|
4392 |
"/ Java initAllClasses. |
|
4393 |
||
4394 |
files do:[:fileName | |
|
4414 | 4395 |
|p path| |
4396 |
||
4397 |
path := fileName. |
|
4398 |
path isDirectory ifFalse:[ |
|
4399 |
p := Java |
|
4400 |
javaProcessForMainOf:(Java classForName:'sun.applet.AppletViewer') |
|
4401 |
argumentString:path pathName. |
|
4402 |
p resume. |
|
4403 |
] |
|
3892 | 4404 |
]. |
4405 |
! |
|
4406 |
||
4407 |
openCBrowser |
|
4408 |
||
4409 |
|directories| |
|
4410 |
||
3982 | 4411 |
directories := self currentSelectedDirectories. |
3892 | 4412 |
directories isEmpty ifTrue:[ ^ self]. |
4413 |
self withWaitCursorDo:[ |
|
4414 | 4414 |
CBrowser::Browser openIn:directories first. |
3892 | 4415 |
] |
4416 |
! |
|
4417 |
||
4230 | 4418 |
openChangeSetBrowser |
4419 |
self |
|
4420 |
openTool:ChangeSetBrowser |
|
4421 |
with:#openOnFile: |
|
4422 |
ignoreDirectories:true |
|
4423 |
! |
|
4424 |
||
3892 | 4425 |
openChangesBrowser |
4426 |
"open a change browser on the selected file(s)" |
|
4427 |
||
4428 |
self openTool:(UserPreferences current changesBrowserClass) |
|
4429 |
! |
|
4430 |
||
4431 |
openDiffView |
|
4432 |
"open a diff-view" |
|
4433 |
||
4170 | 4434 |
| name1 name2 text1 text2 d err nm l1 files title defaultName lastFile| |
3892 | 4435 |
|
3982 | 4436 |
files := self currentSelectedFiles. |
3892 | 4437 |
files isEmpty ifTrue:[ |
4414 | 4438 |
Dialog warn:'you have to select a file first'. |
4439 |
^ self. |
|
3892 | 4440 |
]. |
4441 |
(files size == 2) ifTrue:[ |
|
4414 | 4442 |
name1 := files last. |
4443 |
name2 := files first. |
|
3892 | 4444 |
] ifFalse:[ |
4414 | 4445 |
LastFileDiffFile notNil ifTrue:[ |
4446 |
| directories | |
|
4447 |
directories := self currentDirectories value. |
|
4448 |
directories notEmpty ifTrue:[ |
|
4449 |
lastFile := directories first asFilename construct:(LastFileDiffFile baseName). |
|
4450 |
(lastFile exists and:[lastFile isReadable]) ifTrue:[ |
|
4451 |
name1 := lastFile. |
|
4452 |
] |
|
4453 |
] |
|
4454 |
]. |
|
4455 |
name2 := files first. |
|
4432 | 4456 |
title := 'Show differences between ', name2 baseName, ' and:'. |
4414 | 4457 |
defaultName := name1 notNil ifTrue:[name1 baseName] ifFalse:[nil]. |
4458 |
name1 := DialogBox |
|
4459 |
requestFileName:title |
|
4460 |
default:defaultName |
|
4461 |
ok:'OK' |
|
4462 |
abort:'Use File List' |
|
4463 |
pattern:'*' |
|
4464 |
fromDirectory:(name2 asFilename directory). |
|
4060 | 4465 |
|
4466 |
||
4467 |
||
3892 | 4468 |
]. |
4469 |
||
4470 |
(name1 isNil or:[name1 asString isEmpty]) ifTrue:[ |
|
4414 | 4471 |
text1 := self getAllFilesAsStringCollection asStringCollection withTabs. |
4472 |
text1 := text1 collect:[:l | l isNil ifTrue:[' '] ifFalse:[l]]. |
|
4473 |
name1 := nil. |
|
4474 |
l1 := 'browser contents' |
|
3892 | 4475 |
] ifFalse:[ |
4414 | 4476 |
name1 := name1 asFilename. |
4477 |
LastFileDiffFile := name1. |
|
4478 |
name1 asFilename isReadable ifFalse:[ |
|
4479 |
nm := name1. |
|
4480 |
name1 asFilename exists ifFalse:[ |
|
4481 |
err := '%1 does not exist'. |
|
4482 |
] ifTrue:[ |
|
4483 |
err := '%1 is not readable' |
|
4484 |
]. |
|
4485 |
]. |
|
4486 |
l1 := name1 |
|
3892 | 4487 |
]. |
4488 |
||
4489 |
err isNil ifTrue:[ |
|
4414 | 4490 |
name2 isReadable ifFalse:[ |
4491 |
nm := name2. |
|
4492 |
name2 exists ifFalse:[ |
|
4493 |
err := '%1 does not exist'. |
|
4494 |
] ifTrue:[ |
|
4495 |
err := '%1 is not readable' |
|
4496 |
]. |
|
4497 |
]. |
|
3892 | 4498 |
]. |
4499 |
err notNil ifTrue:[ |
|
4414 | 4500 |
Dialog warn:(resources string:err with:nm pathName). |
4501 |
^ self |
|
3892 | 4502 |
]. |
4503 |
||
4504 |
self withWaitCursorDo:[ |
|
4414 | 4505 |
name1 notNil ifTrue:[ |
4506 |
text1 := name1 contents. |
|
4507 |
]. |
|
4508 |
text2 := name2 contents. |
|
4509 |
text1 = text2 ifTrue:[ |
|
4510 |
self information:'same contents' |
|
4511 |
] ifFalse:[ |
|
4512 |
d := DiffTextView |
|
4513 |
openOn:text1 label:l1 |
|
4514 |
and:text2 label:name2 pathName. |
|
4515 |
d topView label:'file differences'. |
|
4516 |
] |
|
3892 | 4517 |
] |
4518 |
! |
|
4519 |
||
4520 |
openEditor |
|
4521 |
self openTool:EditTextView |
|
4522 |
! |
|
4523 |
||
4524 |
openHTMLReader |
|
4525 |
||
4526 |
self openTool:HTMLDocumentView ignoreDirectories:false |
|
4527 |
! |
|
4528 |
||
4529 |
openImageEditor |
|
4530 |
||
4531 |
[self loadImageAndPerform:#edit] fork |
|
4532 |
! |
|
4533 |
||
4534 |
openImageInspector |
|
4535 |
[self loadImageAndPerform:#inspect] fork |
|
4536 |
! |
|
4537 |
||
4538 |
openImagePreview |
|
4539 |
||
4540 |
[self loadImageAndPerform:[:img | |
|
4414 | 4541 |
|i top viewer| |
4542 |
||
4543 |
top := StandardSystemView new. |
|
4544 |
||
4545 |
viewer := ImageView origin:0.0@0.0 corner:1.0@1.0 in:top. |
|
4546 |
i := img. |
|
4547 |
top extent:200@200. |
|
4548 |
top label:(img fileName asFilename directoryName asFilename baseName , '/' , img fileName asFilename baseName). |
|
4549 |
top openAndWait. |
|
4550 |
||
4551 |
(i width > 200 or:[i height > 200]) ifTrue:[ |
|
4552 |
i := i magnifiedPreservingRatioTo:200@200. |
|
4553 |
]. |
|
4554 |
viewer image:i. |
|
4555 |
]. |
|
3892 | 4556 |
] fork |
4557 |
! |
|
4558 |
||
4559 |
openMP3Player |
|
4560 |
|file| |
|
4561 |
||
3982 | 4562 |
file := self currentSelectedFiles. |
3892 | 4563 |
(file isEmpty) ifTrue:[ |
4414 | 4564 |
^ self. |
3892 | 4565 |
]. |
4566 |
file := file first. |
|
4567 |
(MP3PlayerApplication ? SaugFix::MP3PlayerApplication) playSong:file. |
|
4568 |
! |
|
4569 |
||
4570 |
openSlideShow |
|
4571 |
||
4572 |
|directories dir| |
|
4573 |
||
3982 | 4574 |
directories := self currentSelectedDirectories. |
3892 | 4575 |
directories isEmpty ifTrue:[^ self]. |
4576 |
||
4577 |
dir := directories first. |
|
4578 |
CodingExamples_GUI::SlideShow openIn:dir. |
|
4579 |
! |
|
4580 |
||
4581 |
openSnapshotImageBrowser |
|
4491 | 4582 |
"Sorry, for now, only the old browser can handle snapShotImages." |
4583 |
||
3892 | 4584 |
^ self openTool:SystemBrowser with:#openOnSnapShotImage: ignoreDirectories:true |
4585 |
! |
|
4586 |
||
4587 |
openTerminal |
|
4588 |
||
4589 |
|directories dir| |
|
4590 |
||
3982 | 4591 |
directories := self currentSelectedDirectories. |
3892 | 4592 |
directories isEmpty ifTrue:[ |
4414 | 4593 |
dir := Filename homeDirectory. |
3892 | 4594 |
] ifFalse:[ |
4414 | 4595 |
dir := directories first. |
3892 | 4596 |
]. |
4597 |
||
4598 |
VT100TerminalView openShellIn:dir. |
|
4599 |
! |
|
4600 |
||
4601 |
openTool:aToolClass |
|
4602 |
"open a tool on the selected file(s)" |
|
4603 |
||
4604 |
^ self openTool:aToolClass ignoreDirectories:true |
|
4605 |
! |
|
4606 |
||
4607 |
openTool:aToolClass ignoreDirectories:ignoreDirs |
|
4608 |
"open a tool on the selected file(s)" |
|
4609 |
||
4610 |
^ self |
|
4414 | 4611 |
openTool:aToolClass |
4612 |
with:#openOn: |
|
4613 |
ignoreDirectories:ignoreDirs |
|
3892 | 4614 |
! |
4615 |
||
4616 |
openTool:aToolClass with:aSelector ignoreDirectories:ignoreDirs |
|
4617 |
"open a tool on the selected file(s)" |
|
4618 |
||
4619 |
|numItems path tool files| |
|
4620 |
||
4621 |
aToolClass isNil ifTrue:[ |
|
4414 | 4622 |
Dialog warn:'Sorry, that tool seems to be not available'. |
4623 |
^ nil. |
|
3892 | 4624 |
]. |
3982 | 4625 |
files := self currentSelectedFiles. |
3892 | 4626 |
|
4627 |
(numItems := files size) > 2 ifTrue:[ |
|
4414 | 4628 |
(self |
4629 |
confirm:(resources string:'open for each of the %1 items ?' |
|
4630 |
with:numItems)) ifFalse:[^ self]. |
|
3892 | 4631 |
]. |
4632 |
||
4633 |
self withWaitCursorDo:[ |
|
4414 | 4634 |
files do:[:fileName | |
4635 |
(ignoreDirs not or:[fileName isDirectory not]) ifTrue:[ |
|
4636 |
fileName isAbsolute ifTrue:[ |
|
4637 |
path := fileName getName. |
|
4638 |
] ifFalse:[ |
|
4639 |
path := fileName pathName. |
|
4640 |
]. |
|
4641 |
tool := aToolClass perform:aSelector with:path. |
|
4642 |
] |
|
4643 |
]. |
|
3892 | 4644 |
]. |
4645 |
^ tool |
|
4646 |
! |
|
4647 |
||
4648 |
openZipTool |
|
4649 |
|zipTool directories dir| |
|
4650 |
||
4651 |
(zipTool := self openTool:ZipTool) notNil ifTrue:[ |
|
4414 | 4652 |
directories := self currentSelectedDirectories. |
4653 |
directories isEmpty ifTrue:[ |
|
4654 |
dir := directories first. |
|
4655 |
] ifFalse:[ |
|
4656 |
dir := Filename homeDirectory. |
|
4657 |
]. |
|
4658 |
||
4659 |
zipTool initialExtractDirectory:dir. |
|
3892 | 4660 |
]. |
4661 |
! |
|
4662 |
||
4663 |
readAbbrevFile |
|
4664 |
"read the abbrev file and install classes found there as autoloaded classes" |
|
4665 |
||
4666 |
| directories dir| |
|
4667 |
||
3982 | 4668 |
directories := self currentSelectedDirectories. |
3892 | 4669 |
directories isEmpty ifTrue:[^ self]. |
4670 |
||
4671 |
dir := directories first. |
|
4672 |
Smalltalk installAutoloadedClassesFrom:(dir construct:'abbrev.stc'). |
|
4673 |
! |
|
4674 |
||
4675 |
singleFileFileIn:fileName lazy:lazy |
|
4676 |
"fileIn the selected file(s)" |
|
4677 |
||
4345 | 4678 |
|aStream wasLazy notifyString| |
3892 | 4679 |
|
4680 |
fileName type == #regular ifTrue:[ |
|
4681 |
||
4345 | 4682 |
(ObjectFileLoader notNil |
4683 |
and:[ObjectFileLoader hasValidBinaryExtension:fileName]) ifTrue:[ |
|
4684 |
AbortOperationRequest catch:[ |
|
4685 |
|p| |
|
4686 |
||
4687 |
"/ |
|
4688 |
"/ look if already loaded ... then unload first |
|
4689 |
"/ |
|
4690 |
p := fileName pathName. |
|
4691 |
(ObjectFileLoader loadedObjectFiles includes:p) ifTrue:[ |
|
4692 |
(Dialog confirm:(resources |
|
4693 |
string:'%1 is already loaded; load anyway ?' |
|
4694 |
with:p)) ifFalse:[ |
|
4695 |
^ self |
|
4696 |
]. |
|
4697 |
notifyString := 'unloading old ' , p , ' ...'. |
|
4698 |
Transcript showCR:notifyString. |
|
4523 | 4699 |
self notify:notifyString. |
4345 | 4700 |
ObjectFileLoader unloadObjectFile:p. |
4701 |
]. |
|
4702 |
||
4703 |
notifyString := 'loading ' , p , ' ...'. |
|
4704 |
Transcript showCR:notifyString. |
|
4523 | 4705 |
self notify:notifyString. |
4345 | 4706 |
ObjectFileLoader loadObjectFile:p. |
4707 |
Class addInfoRecord:('fileIn ' , fileName asFilename pathName) |
|
4708 |
] |
|
4709 |
] ifFalse:[ ((fileName hasSuffix:'cls') |
|
4710 |
and:[((fileName mimeTypeOfContents ? '') startsWith:'application/x-smalltalk-source') not ]) ifTrue:[ |
|
4711 |
"/ loading a binary class file |
|
4712 |
aStream := fileName readStream. |
|
4713 |
aStream notNil ifTrue:[ |
|
4714 |
aStream fileInBinary. |
|
4715 |
] |
|
4716 |
] ifFalse:[ |
|
4717 |
((fileName hasSuffix:'class') |
|
4718 |
or:[(fileName hasSuffix:'cla')]) ifTrue:[ |
|
4719 |
"/ loading a java class file |
|
4720 |
JavaClassReader notNil ifTrue:[ |
|
4721 |
JavaClassReader loadFile:(fileName pathName) |
|
4722 |
] |
|
4723 |
] ifFalse:[ (fileName hasSuffix:'sif') ifTrue:[ |
|
4724 |
"/ loading a sif (smalltalk interchange format) file |
|
4725 |
SmalltalkInterchangeSTXFileInManager autoload. |
|
4726 |
SmalltalkInterchangeFileManager newForFileIn |
|
4727 |
fileName: fileName pathName; |
|
4728 |
fileIn. |
|
4729 |
] ifFalse:[ (fileName hasSuffix:'pcl') ifTrue:[ |
|
4730 |
Parcel isNil ifTrue:[ |
|
4731 |
Dialog warn:'Parcel support not loaded.' |
|
4732 |
] ifFalse:[ |
|
4733 |
Parcel loadParcelFrom: fileName pathName |
|
4734 |
] |
|
4735 |
] ifFalse:[ |
|
4736 |
"/ loading a regular (chunk) or xml source file |
|
4737 |
aStream := fileName readStream. |
|
4738 |
aStream notNil ifTrue:[ |
|
4739 |
Error handle:[ : ex | |
|
4740 |
Dialog warn:'Error on file in: ', ex errorString. |
|
4741 |
] do:[ |
|
4742 |
[ |
|
4743 |
Class withoutUpdatingChangesDo:[ |
|
4744 |
wasLazy := Compiler compileLazy:lazy. |
|
4745 |
aStream fileIn. |
|
4746 |
]. |
|
4747 |
Class addInfoRecord:('fileIn ' , fileName asString) |
|
4748 |
] ensure:[ |
|
4749 |
Compiler compileLazy:wasLazy. |
|
4750 |
aStream close |
|
4751 |
] |
|
4752 |
] |
|
4753 |
] |
|
4754 |
]]] |
|
4755 |
]] |
|
3892 | 4756 |
]. |
4531 | 4757 |
! |
4758 |
||
4759 |
truncateSelectedFilesToZeroSize |
|
4760 |
|selectedFiles| |
|
4761 |
||
4762 |
selectedFiles := self currentFileNameHolder value. |
|
4763 |
selectedFiles size == 0 ifTrue:[^ self]. |
|
4764 |
||
4765 |
(Dialog |
|
4766 |
confirm:('Really truncate %1 files ?\\WARNING: contents of file(s) is lost !!\This cannot be undone.' bindWith:selectedFiles size) withCRs |
|
4767 |
initialAnswer:false |
|
4768 |
) ifFalse:[ |
|
4769 |
^ self |
|
4770 |
]. |
|
4771 |
||
4772 |
selectedFiles do:[:fileName | |
|
4773 |
|s| |
|
4774 |
||
4775 |
self notify:('Truncating:', fileName baseName). |
|
4776 |
fileName isDirectory ifFalse:[ |
|
4777 |
s := fileName writeStream. |
|
4778 |
s isNil ifTrue:[ |
|
4779 |
self warn:('Cannot truncate "%1".' bindWith:fileName baseName allBold). |
|
4780 |
] ifFalse:[ |
|
4781 |
s close. |
|
4782 |
] |
|
4783 |
] |
|
4784 |
]. |
|
4785 |
self notify:''. |
|
3892 | 4786 |
! ! |
4787 |
||
4788 |
!AbstractFileBrowser methodsFor:'menu queries cvs'! |
|
4789 |
||
4790 |
canCvsAddAndCommit |
|
4791 |
||
3982 | 4792 |
|selectedFiles| |
4793 |
||
4794 |
selectedFiles := self currentSelectedFiles. |
|
4795 |
^ (selectedFiles notEmpty and:[self currentFilesAreInSameDirectory]). |
|
3892 | 4796 |
! |
4797 |
||
4798 |
canRemoveCVSContainer |
|
4799 |
||
3982 | 4800 |
|selectedFiles dirOfFile cvsDir| |
4801 |
||
4802 |
selectedFiles := self currentSelectedFiles. |
|
4803 |
selectedFiles isEmpty ifTrue:[^ false]. |
|
4804 |
^ ((selectedFiles detect:[:fileName| |
|
4414 | 4805 |
dirOfFile := self getDirWithoutFileName:fileName. |
4806 |
cvsDir := dirOfFile construct:'CVS'. |
|
4807 |
(cvsDir isDirectory and:[cvsDir exists]) |
|
3892 | 4808 |
] ifNone:[nil]) notNil). |
4809 |
! ! |
|
4810 |
||
4811 |
!AbstractFileBrowser methodsFor:'menu queries tools'! |
|
4812 |
||
4813 |
anySTFilesPresent |
|
4814 |
||
4815 |
^ self anyFilesPresentWithSuffix:'st' |
|
4816 |
! |
|
4817 |
||
4818 |
canCreateNewProject |
|
4819 |
||
3982 | 4820 |
| selectedFiles | |
3892 | 4821 |
|
4822 |
self currentFilesAreInSameDirectory ifFalse:[^ false]. |
|
3982 | 4823 |
selectedFiles := self currentSelectedFiles. |
3892 | 4824 |
^ [ |
4414 | 4825 |
((selectedFiles detect:[:fileName| | suffix| |
4826 |
suffix := fileName suffix asLowercase. |
|
4827 |
(suffix = 'prj' or:[suffix = 'st']) |
|
4828 |
] ifNone:[nil]) notNil) |
|
3982 | 4829 |
] |
3892 | 4830 |
! |
4831 |
||
4832 |
canDoTerminal |
|
4833 |
||
4834 |
^ OperatingSystem isUNIXlike |
|
4835 |
or:[OperatingSystem isMSWINDOWSlike] |
|
4836 |
! |
|
4837 |
||
4838 |
canDoTerminalAndSystemIsDOS |
|
4839 |
||
4840 |
^ self canDoTerminal and:[OperatingSystem isMSWINDOWSlike] |
|
4841 |
! |
|
4842 |
||
4843 |
canDoTerminalAndSystemIsUnix |
|
4844 |
||
4845 |
^ self canDoTerminal and:[OperatingSystem isUNIXlike] |
|
4846 |
! |
|
4847 |
||
4848 |
canReadAbbrevFile |
|
4849 |
||
4850 |
||
4851 |
self currentFilesAreInSameDirectory ifFalse:[^ false]. |
|
4852 |
^ (self currentDirectories value first construct:'abbrev.stc') exists |
|
4853 |
! |
|
4854 |
||
4855 |
canRemoveFromSourcePath |
|
4856 |
||
4857 |
^ false |
|
4858 |
! |
|
4859 |
||
4860 |
hasASN1 |
|
4861 |
^ [ OSI::ASN1Parser notNil |
|
4414 | 4862 |
and:[OSI::ASN1Parser isLoaded]] |
3892 | 4863 |
|
4864 |
! |
|
4865 |
||
4866 |
hasASN1AndSelection |
|
4867 |
^ [ self hasSelection value |
|
4414 | 4868 |
and:[self currentSelectedFiles size > 0 |
4869 |
and:[OSI::ASN1Parser notNil |
|
4870 |
and:[OSI::ASN1Parser isLoaded]]]] |
|
3892 | 4871 |
! |
4872 |
||
4873 |
hasCBrowser |
|
4874 |
^ [ CBrowser::Browser notNil ] |
|
4875 |
! |
|
4876 |
||
4877 |
hasJava |
|
4878 |
||
4879 |
^ [ JavaClassReader notNil |
|
4414 | 4880 |
and:[JavaClassReader isLoaded]] |
3892 | 4881 |
! |
4882 |
||
4883 |
hasJavaAndSelection |
|
4884 |
||
3982 | 4885 |
^ [ self currentSelectedFiles size > 0 |
4414 | 4886 |
and:[JavaClassReader notNil |
4887 |
and:[JavaClassReader isLoaded]]] |
|
3892 | 4888 |
! |
4889 |
||
4890 |
hasMP3Player |
|
4891 |
||
4892 |
^ [ MP3PlayerApplication notNil |
|
4414 | 4893 |
or:[SaugFix::MP3PlayerApplication notNil ]] |
3892 | 4894 |
! |
4895 |
||
4896 |
hasMP3PlayerAndSelection |
|
4897 |
||
3982 | 4898 |
^ [ self currentSelectedFiles size > 0 |
4414 | 4899 |
and:[ self hasMP3Player value]] |
3892 | 4900 |
! |
4901 |
||
4902 |
hasSlideShow |
|
4903 |
||
4904 |
^ [CodingExamples_GUI::SlideShow notNil] |
|
4905 |
! |
|
4906 |
||
4907 |
hasSnapshotSelection |
|
4908 |
||
4909 |
^ [ |
|
4414 | 4910 |
| files | |
4911 |
files := self currentSelectedFiles. |
|
4912 |
((files size == 1) |
|
4913 |
and:[ files first hasSuffix:'img' ]) |
|
3892 | 4914 |
] |
4915 |
! |
|
4916 |
||
4917 |
hasZipFileSelected |
|
4918 |
||
3982 | 4919 |
^ [|sel fileName fn suff| |
4920 |
||
4414 | 4921 |
sel := self currentSelectedFiles. |
4922 |
sel size == 1 ifTrue:[ |
|
4923 |
fileName := sel first. |
|
4924 |
fileName notNil ifTrue:[ |
|
4925 |
suff := fileName suffix asLowercase. |
|
4926 |
suff = 'zip' or:[suff = 'jar'] |
|
4927 |
] ifFalse:[ |
|
4928 |
false |
|
4929 |
] |
|
4930 |
] ifFalse:[ |
|
4931 |
false |
|
4932 |
] |
|
3892 | 4933 |
] |
4934 |
! |
|
4935 |
||
4936 |
javaSupportLoaded |
|
4937 |
||
4938 |
^ false |
|
4939 |
! ! |
|
4940 |
||
3906 | 4941 |
!AbstractFileBrowser methodsFor:'presentation'! |
4942 |
||
4943 |
getModeString:modeBits |
|
4944 |
"convert file-mode bits into a more user-friendly string. |
|
4945 |
This is wrong here - should be moved into OperatingSystem." |
|
4946 |
||
4947 |
^ self getModeString:modeBits |
|
4414 | 4948 |
with:#( 'owner:' $r $w $x |
4949 |
' group:' $r $w $x |
|
4950 |
' others:' $r $w $x ) |
|
3906 | 4951 |
! |
4952 |
||
4953 |
getModeString:modeBits with:texts |
|
4954 |
"convert file-mode bits into a more user-friendly string. |
|
4955 |
This is wrong here - should be moved into OperatingSystem." |
|
4956 |
||
4957 |
|bits modeString| |
|
4958 |
||
4959 |
bits := modeBits bitAnd:8r777. |
|
4960 |
modeString := ''. |
|
4961 |
||
4962 |
#( nil 8r400 8r200 8r100 nil 8r040 8r020 8r010 nil 8r004 8r002 8r001 ) |
|
4963 |
with: texts do:[:bitMask :access | |
|
4414 | 4964 |
|ch| |
4965 |
||
4966 |
bitMask isNil ifTrue:[ |
|
4967 |
modeString := modeString , access |
|
4968 |
] ifFalse:[ |
|
4969 |
(bits bitAnd:bitMask) == 0 ifTrue:[ |
|
4970 |
ch := $- |
|
4971 |
] ifFalse:[ |
|
4972 |
ch := access |
|
4973 |
]. |
|
4974 |
modeString := modeString copyWith:ch |
|
4975 |
] |
|
3906 | 4976 |
]. |
4977 |
^ modeString |
|
4978 |
! ! |
|
4979 |
||
3892 | 4980 |
!AbstractFileBrowser methodsFor:'queries'! |
4981 |
||
3906 | 4982 |
getFileInfoStringForFirstSelectedFile:longInfo |
4983 |
"get stat info on selected file - return a string which can be |
|
4984 |
shown in a box" |
|
4985 |
||
4986 |
| selFiles filename text fileOutput type modeBits modeString s ts isLink info| |
|
4987 |
||
4988 |
selFiles := self currentFileNameHolder value. |
|
4989 |
((selFiles size == 1) not) ifTrue:[ ^ nil]. |
|
4990 |
filename := selFiles first. |
|
4991 |
||
4992 |
text := StringCollection new. |
|
4993 |
||
4994 |
text add:('filename: ', filename asString). |
|
4995 |
isLink := filename isSymbolicLink. |
|
4996 |
isLink ifTrue:[ |
|
4414 | 4997 |
text add:('symbolic link to: ', (filename linkInfo path)) |
3906 | 4998 |
]. |
4999 |
||
5000 |
info := filename info. |
|
5001 |
type := info type. |
|
5002 |
(longInfo and:[type == #regular]) ifTrue:[ |
|
4414 | 5003 |
fileOutput := filename fileType. |
3906 | 5004 |
]. |
5005 |
||
5006 |
s := ('type: '). |
|
5007 |
fileOutput isNil ifTrue:[ |
|
4414 | 5008 |
s := s , type asString |
3906 | 5009 |
] ifFalse:[ |
4414 | 5010 |
s := s , 'regular (' , fileOutput , ')' |
3906 | 5011 |
]. |
5012 |
text add:s. |
|
5013 |
isLink = true ifTrue:[ |
|
4414 | 5014 |
info := filename linkInfo |
3906 | 5015 |
] ifFalse:[ |
4414 | 5016 |
info := filename info |
3906 | 5017 |
]. |
5018 |
||
4000 | 5019 |
text add:('size: ', (info fileSize) printString). |
3906 | 5020 |
|
5021 |
modeBits := info mode. |
|
5022 |
modeString := self getModeString:modeBits. |
|
5023 |
longInfo ifTrue:[ |
|
4414 | 5024 |
text add:('access: ', modeString,' ', (modeBits printStringRadix:8)). |
3906 | 5025 |
] ifFalse:[ |
4414 | 5026 |
text add:('access: ', modeString) |
3906 | 5027 |
]. |
5028 |
text add:('owner: ', |
|
4414 | 5029 |
(OperatingSystem getUserNameFromID:(info uid))). |
3906 | 5030 |
longInfo ifTrue:[ |
4414 | 5031 |
text add:('group: ', |
5032 |
(OperatingSystem getGroupNameFromID:(info gid))). |
|
5033 |
||
5034 |
ts := info accessTime. |
|
5035 |
text add:('last access: ',ts asTime printString ,' ', ts asDate printString). |
|
5036 |
||
5037 |
ts := info modificationTime. |
|
5038 |
text add:('last modification: ', ts asTime printString, ' ', ts asDate printString). |
|
3906 | 5039 |
]. |
5040 |
^ text asString |
|
5041 |
! |
|
5042 |
||
3892 | 5043 |
initialCommandFor:fileName into:aBox |
5044 |
"set a useful initial command for execute box." |
|
5045 |
||
4496
513e99a8621b
defaultCommandPerMIME moved to MIMETypes
Claus Gittinger <cg@exept.de>
parents:
4491
diff
changeset
|
5046 |
self class initialCommandFor:fileName in:Filename currentDirectory intoBox:aBox |
3892 | 5047 |
! |
5048 |
||
5049 |
isAbstractFileBrowser |
|
5050 |
||
5051 |
^ true |
|
5052 |
! |
|
5053 |
||
5054 |
systemIsDOS |
|
5055 |
||
5056 |
^ OperatingSystem isMSDOSlike |
|
5057 |
! |
|
5058 |
||
5059 |
systemIsUnix |
|
5060 |
^ OperatingSystem isUNIXlike |
|
5061 |
! ! |
|
5062 |
||
5063 |
!AbstractFileBrowser methodsFor:'queries-file'! |
|
5064 |
||
5065 |
allItemsOfCurrentDirectory |
|
5066 |
||
5067 |
^ self application:#DirectoryContentsBrowser do:#allItemsOfCurrentDirectory. |
|
5068 |
! |
|
5069 |
||
5070 |
anyFilesPresentWithSuffix:suffix |
|
5071 |
||
5072 |
| directories | |
|
5073 |
||
5074 |
directories := self currentDirectories value. |
|
5075 |
directories do:[ : dir| |
|
4414 | 5076 |
(dir directoryContents do:[:f| (f asFilename suffix = suffix) ifTrue:[ ^ true]]) |
3892 | 5077 |
]. |
5078 |
^ false. |
|
5079 |
! |
|
5080 |
||
5081 |
currentFilesAreInSameDirectory |
|
5082 |
||
5083 |
^ (self currentDirectories value size == 1). |
|
5084 |
! |
|
5085 |
||
5086 |
currentFilesHasDirectories |
|
5087 |
||
5088 |
^ self currentDirectories value notEmpty. |
|
5089 |
! |
|
5090 |
||
3982 | 5091 |
directoriesForFiles:aFileCol |
5092 |
||
5093 |
^ ((aFileCol collect:[:file| self getDirWithoutFileName:file]) asSet). |
|
5094 |
! |
|
5095 |
||
3892 | 5096 |
fileListIsEmpty |
5097 |
||
5098 |
^ self application:#DirectoryContentsBrowser do:#fileListIsEmpty. |
|
5099 |
! |
|
5100 |
||
5101 |
fileListIsNotEmpty |
|
5102 |
||
5103 |
^ self fileListIsEmpty not. |
|
5104 |
! |
|
5105 |
||
5106 |
fileName:aFilename1 startsWith:aFilename2 |
|
5107 |
||
5108 |
" check if aFilename2 starts with the same directories like aFilename1 " |
|
5109 |
||
5110 |
| file1 file2 | |
|
5111 |
||
5112 |
aFilename2 isNil ifTrue:[ ^ false]. |
|
3982 | 5113 |
aFilename1 isNil ifTrue:[ ^ false]. |
3892 | 5114 |
file1 := aFilename1 asFilename. |
5115 |
file2 := aFilename2 asFilename. |
|
5116 |
file2 isRootDirectory ifTrue:[ ^ true]. |
|
5117 |
((file1 isDirectory) |
|
5118 |
and:[(file2 isDirectory) |
|
5119 |
and:[file1 directory = file2 directory]]) ifTrue:[ |
|
4414 | 5120 |
^ file1 baseName = file2 baseName |
3892 | 5121 |
]. |
3982 | 5122 |
^ (file1 pathName) startsWith:(file2 pathName) |
3892 | 5123 |
! |
5124 |
||
5125 |
getAllFilesAsStringCollection |
|
5126 |
||
5127 |
^ self application:#DirectoryContentsBrowser do:#getAllFilesAsStringCollection. |
|
5128 |
! |
|
5129 |
||
5130 |
getBestDirectory |
|
5131 |
||
5132 |
|selFiles stringCol firstPre| |
|
5133 |
||
5134 |
selFiles := self currentDirectories value. |
|
5135 |
selFiles isEmpty ifTrue:[^ nil]. |
|
5136 |
selFiles size == 1 ifTrue:[^ selFiles first]. |
|
4486 | 5137 |
stringCol := (selFiles collect:[:file| file asString]) asOrderedCollection. |
3892 | 5138 |
firstPre := stringCol at:1. |
5139 |
stringCol from:2 do:[:el| |
|
4414 | 5140 |
firstPre := firstPre commonPrefixWith:el. |
3892 | 5141 |
]. |
5142 |
(firstPre endsWith:(OperatingSystem fileSeparator)) ifTrue:[ |
|
4414 | 5143 |
firstPre removeLast. |
3892 | 5144 |
]. |
5145 |
^ firstPre asFilename |
|
5146 |
! |
|
5147 |
||
3982 | 5148 |
getCommonForCurrentFiles |
3892 | 5149 |
|
5150 |
|selFiles stringCol firtsPre| |
|
5151 |
||
5152 |
selFiles := self currentFileNameHolder value. |
|
5153 |
selFiles isEmpty ifTrue:[^ nil]. |
|
5154 |
stringCol := selFiles collect:[: file| file asString]. |
|
5155 |
firtsPre := stringCol at:1. |
|
5156 |
stringCol from:2 do:[:el| |
|
4414 | 5157 |
firtsPre := firtsPre commonPrefixWith:el. |
3892 | 5158 |
]. |
5159 |
^ firtsPre asFilename |
|
5160 |
! |
|
5161 |
||
5162 |
getDirWithoutFileName:aFileName |
|
5163 |
||
5164 |
| dir | |
|
5165 |
aFileName isNil ifTrue:[ |
|
4414 | 5166 |
^ aFileName. |
3892 | 5167 |
]. |
5168 |
dir := aFileName asFilename. |
|
5169 |
dir isDirectory ifFalse:[ |
|
4414 | 5170 |
dir := dir directory. |
3892 | 5171 |
]. |
5172 |
^ dir. |
|
5173 |
! |
|
5174 |
||
5175 |
getInfoItem |
|
5176 |
"get filename of a description-file (.dir.info, README etc.); |
|
5177 |
This file is automatically shown when a directory is enterred. |
|
5178 |
You can add more names below if you like." |
|
5179 |
||
5180 |
|directories| |
|
5181 |
||
3982 | 5182 |
directories := self currentSelectedDirectories. |
3892 | 5183 |
(directories size ~= 1) ifTrue:[ ^ nil]. |
5184 |
||
5185 |
#( |
|
5186 |
'.dir.info' |
|
5187 |
'README' |
|
5188 |
'ReadMe' |
|
5189 |
'Readme' |
|
5190 |
'readme' |
|
5191 |
'read.me' |
|
5192 |
'Read.me' |
|
5193 |
'READ.ME' |
|
5194 |
'README.TXT' |
|
5195 |
'readme.txt' |
|
5196 |
'Readme.txt' |
|
5197 |
'Info.txt' |
|
5198 |
'info.txt' |
|
5199 |
'INFO.TXT' |
|
5200 |
) do:[:f | |
|
4414 | 5201 |
|n dir| |
5202 |
||
5203 |
n := (directories first) construct:f. |
|
5204 |
(n isReadable and:[n isDirectory not]) ifTrue:[ |
|
5205 |
^ DirectoryContentsBrowser itemClass fileName:n |
|
5206 |
] |
|
3892 | 5207 |
]. |
5208 |
^ nil |
|
3982 | 5209 |
! ! |
5210 |
||
5211 |
!AbstractFileBrowser methodsFor:'selection'! |
|
5212 |
||
5213 |
currentSelectedDirectories |
|
5214 |
||
5215 |
^ self currentDirectories value. |
|
5216 |
! |
|
5217 |
||
5218 |
currentSelectedFiles |
|
5219 |
||
5220 |
| files | |
|
5221 |
files := self currentFileNameHolder value. |
|
5222 |
^ (files select:[: file | file isDirectory not]). |
|
5223 |
! |
|
5224 |
||
5225 |
firstSelectedFile |
|
5226 |
||
5227 |
| files | |
|
5228 |
files := self currentFileNameHolder value. |
|
5229 |
^ (files detect:[: file | file isDirectory not] ifNone:[nil]). |
|
4414 | 5230 |
! |
5231 |
||
5232 |
hasOnlyFilesSelected |
|
5233 |
| files | |
|
5234 |
files := self currentFileNameHolder value. |
|
5235 |
^ (files conform:[: file | file isDirectory not]). |
|
5236 |
! |
|
5237 |
||
5238 |
hasTwoFilesSelected |
|
5239 |
| files | |
|
5240 |
files := self currentFileNameHolder value. |
|
5241 |
^ (files size == 2 and:[self hasOnlyFilesSelected]) |
|
3892 | 5242 |
! ! |
5243 |
||
3964 | 5244 |
!AbstractFileBrowser methodsFor:'sorting'! |
5245 |
||
3989 | 5246 |
currentSortOrder |
5247 |
||
5248 |
" returns a Ordered Collection of all directories currently selected |
|
5249 |
if only a file is selected currentDirectories holds the directory of the file |
|
5250 |
" |
|
5251 |
||
4027 | 5252 |
^ self aspectFor:#currentSortOrder ifAbsent:[ Dictionary new asValue ]. |
3989 | 5253 |
! |
5254 |
||
5255 |
makeDirectorySortBlockFor:aSortBlock |
|
5256 |
||
4343 | 5257 |
(self sortDirectoriesBeforeFiles value and:[self viewDirsInContentsBrowser value]) ifTrue:[ |
5258 |
^ [:a :b| |
|
5259 |
|aIsDir bIsDir res| |
|
5260 |
||
5261 |
aIsDir := a isDirectory. |
|
5262 |
bIsDir := b isDirectory. |
|
5263 |
(aIsDir ~~ bIsDir) ifTrue:[ |
|
5264 |
res := aIsDir |
|
5265 |
] ifFalse:[ |
|
5266 |
res := aSortBlock value:a value:b. |
|
5267 |
]. |
|
5268 |
res |
|
5269 |
]. |
|
4074 | 5270 |
] ifFalse:[ |
4343 | 5271 |
^ aSortBlock |
4074 | 5272 |
]. |
3989 | 5273 |
! |
5274 |
||
5275 |
sortBlockHolder |
|
5276 |
|nameSortBlock| |
|
5277 |
||
5278 |
^ self aspectFor:#sortBlockHolder ifAbsent:[ |
|
4414 | 5279 |
self sortCaseless value ifTrue:[ |
5280 |
nameSortBlock := [ :a :b | a asString asLowercase < b asString asLowercase.]. |
|
5281 |
] ifFalse:[ |
|
5282 |
nameSortBlock := [ :a :b | a asString < b asString.]. |
|
5283 |
]. |
|
5284 |
(self makeDirectorySortBlockFor:nameSortBlock) asValue. |
|
3989 | 5285 |
]. |
5286 |
! |
|
5287 |
||
5288 |
sortBlockProperty |
|
5289 |
||
4027 | 5290 |
|
3989 | 5291 |
^ self aspectFor:#sortBlockProperty ifAbsent:[ #baseName asValue ]. |
5292 |
! |
|
5293 |
||
5294 |
sortCaseless |
|
4201 | 5295 |
" aspect for sort caseless " |
3989 | 5296 |
|
5297 |
^ self aspectFor:#sortCaseless ifAbsent:[ |
|
4201 | 5298 |
| holder | |
5299 |
holder := (Filename isCaseSensitive not) asValue. |
|
5300 |
holder |
|
3989 | 5301 |
] |
5302 |
! |
|
5303 |
||
4074 | 5304 |
sortDirectoriesBeforeFiles |
5305 |
||
4201 | 5306 |
" aspect for sort directories always before files" |
4074 | 5307 |
^ self aspectFor:#sortDirectoriesBeforeFiles ifAbsent:[ true asValue ]. |
5308 |
! |
|
5309 |
||
3989 | 5310 |
sortFileListsBy:instanceName |
5311 |
||
5312 |
self sortFileListsBy:instanceName withReverse:true |
|
5313 |
! |
|
5314 |
||
5315 |
sortFileListsBy:instanceName withReverse:aBoolean |
|
5316 |
||
4011 | 5317 |
| aSymbol sortCaselessLocal currentSortOrder cmpOp instanceSortBlock sortReverse| |
3964 | 5318 |
|
5319 |
aSymbol := instanceName asSymbol. |
|
4027 | 5320 |
self sortBlockProperty setValue:instanceName asSymbol. |
4151 | 5321 |
sortCaselessLocal := self sortCaseless value. |
4027 | 5322 |
currentSortOrder := self currentSortOrder value. |
3989 | 5323 |
currentSortOrder isEmpty ifTrue:[ |
4343 | 5324 |
currentSortOrder at:#column put:aSymbol. |
5325 |
currentSortOrder at:#reverse put:false. |
|
5326 |
currentSortOrder at:#sortCaseless put:sortCaselessLocal. |
|
3964 | 5327 |
] ifFalse:[ |
4343 | 5328 |
(currentSortOrder at:#sortCaseless) ~= sortCaselessLocal ifTrue:[ |
5329 |
"/ sort caseless changed |
|
5330 |
currentSortOrder at:#sortCaseless put:sortCaselessLocal. |
|
5331 |
] ifFalse:[ |
|
5332 |
(currentSortOrder at:#column) = aSymbol ifTrue:[ |
|
5333 |
"/ same column like before - change sort order ifReverse is true |
|
5334 |
aBoolean ifTrue:[ |
|
5335 |
| isReverse | |
|
5336 |
isReverse := currentSortOrder at:#reverse. |
|
5337 |
currentSortOrder at:#reverse put:(isReverse not). |
|
5338 |
]. |
|
5339 |
] ifFalse:[ |
|
5340 |
"/ another column - remark column |
|
5341 |
currentSortOrder at:#column put:aSymbol. |
|
5342 |
] |
|
5343 |
] |
|
3964 | 5344 |
]. |
4027 | 5345 |
self currentSortOrder changed. |
3989 | 5346 |
(currentSortOrder at:#reverse) ifTrue:[ |
4343 | 5347 |
cmpOp := #'>' |
3989 | 5348 |
] ifFalse:[ |
4343 | 5349 |
cmpOp := #'<' |
3989 | 5350 |
]. |
4011 | 5351 |
sortReverse := currentSortOrder at:#reverse. |
3989 | 5352 |
instanceSortBlock := [:a :b | |
4343 | 5353 |
|entry1 entry2| |
5354 |
||
5355 |
entry1 := (a perform:aSymbol). |
|
5356 |
entry2 := (b perform:aSymbol). |
|
5357 |
((entry1 isNil) or:[entry2 isNil]) ifTrue:[ |
|
5358 |
((entry1 isNil) and:[entry2 isNil]) ifTrue:[true] ifFalse:[ |
|
5359 |
((entry1 notNil) and:[entry2 isNil]) ifTrue:[ |
|
5360 |
sortReverse |
|
5361 |
] ifFalse:[ |
|
5362 |
sortReverse not |
|
5363 |
] |
|
5364 |
] |
|
5365 |
] ifFalse:[ |
|
5366 |
((aSymbol = #baseName) and:[sortCaselessLocal]) ifTrue:[ |
|
5367 |
entry1 := entry1 asLowercase. |
|
5368 |
entry2 := entry2 asLowercase. |
|
5369 |
]. |
|
5370 |
entry1 perform:cmpOp with:entry2 |
|
5371 |
] |
|
3989 | 5372 |
]. |
5373 |
self sortBlockHolder value:(self makeDirectorySortBlockFor:instanceSortBlock). |
|
3964 | 5374 |
! ! |
5375 |
||
3892 | 5376 |
!AbstractFileBrowser methodsFor:'startup & release'! |
5377 |
||
5378 |
makeDependent |
|
4074 | 5379 |
self filterModel addDependent:self. |
4004 | 5380 |
self currentFileNameHolder addDependent:self. |
4074 | 5381 |
self sortDirectoriesBeforeFiles addDependent:self. |
4004 | 5382 |
self sortCaseless addDependent:self. |
4011 | 5383 |
self showHiddenFiles addDependent:self. |
4368
ec625478fad7
remark root and selection for every change in classvar
penk
parents:
4367
diff
changeset
|
5384 |
self rootHolder addDependent:self. |
3892 | 5385 |
! |
5386 |
||
5387 |
masterApplication:anApplication |
|
5388 |
||
5389 |
masterApplication isNil ifTrue:[ |
|
4414 | 5390 |
(anApplication notNil and:[anApplication askFor:#isAbstractFileBrowser]) ifTrue:[ |
5391 |
aspects := anApplication aspects |
|
5392 |
] ifFalse:[ |
|
5393 |
aspects isNil ifTrue:[ |
|
5394 |
aspects := IdentityDictionary new. |
|
5395 |
aspects at:#applications put:(IdentityDictionary new). |
|
5396 |
] |
|
5397 |
]. |
|
5398 |
self applications at:(self className) put:self. |
|
5399 |
self makeDependent. |
|
3892 | 5400 |
]. |
3952 | 5401 |
^ super masterApplication:anApplication. |
3892 | 5402 |
! |
5403 |
||
5404 |
postOpenWith:aBuilder |
|
5405 |
||
5406 |
super postOpenWith:aBuilder. |
|
5407 |
! ! |
|
5408 |
||
5409 |
!AbstractFileBrowser::Clipboard methodsFor:'accessing'! |
|
5410 |
||
5411 |
files |
|
5412 |
"return the value of the instance variable 'files' (automatically generated)" |
|
5413 |
||
5414 |
^ files |
|
5415 |
! |
|
5416 |
||
5417 |
files:something |
|
5418 |
"set the value of the instance variable 'files' (automatically generated)" |
|
5419 |
||
5420 |
files := something. |
|
5421 |
! |
|
5422 |
||
5423 |
method |
|
5424 |
"return the value of the instance variable 'method' (automatically generated)" |
|
5425 |
||
5426 |
^ method |
|
5427 |
! |
|
5428 |
||
5429 |
method:something |
|
5430 |
"set the value of the instance variable 'method' (automatically generated)" |
|
5431 |
||
5432 |
method := something. |
|
5433 |
! ! |
|
5434 |
||
5435 |
!AbstractFileBrowser::CodeExecutionLock methodsFor:'accessing'! |
|
5436 |
||
5437 |
locked |
|
5438 |
"return the value of the instance variable 'locked' (automatically generated)" |
|
5439 |
||
5440 |
locked isNil ifTrue:[ |
|
4414 | 5441 |
locked := false. |
3892 | 5442 |
]. |
5443 |
^ locked |
|
5444 |
! ! |
|
5445 |
||
5446 |
!AbstractFileBrowser::CodeExecutionLock methodsFor:'actions'! |
|
5447 |
||
5448 |
doIfUnLocked:aBlock |
|
5449 |
||
5450 |
self locked ifFalse:[ |
|
4414 | 5451 |
aBlock value. |
3892 | 5452 |
]. |
5453 |
! |
|
5454 |
||
5455 |
doLocked:aBlock |
|
5456 |
||
5457 |
locked := true. |
|
4004 | 5458 |
aBlock ensure:[ |
4414 | 5459 |
locked := false. |
4004 | 5460 |
] |
3892 | 5461 |
! ! |
5462 |
||
3952 | 5463 |
!AbstractFileBrowser::DirectoryHistory class methodsFor:'defaults'! |
5464 |
||
5465 |
historySize |
|
3892 | 5466 |
|
5467 |
^ 20 |
|
5468 |
! ! |
|
5469 |
||
4032 | 5470 |
!AbstractFileBrowser::DirectoryHistory class methodsFor:'new'! |
5471 |
||
5472 |
new |
|
5473 |
||
5474 |
^ super new initialize. |
|
5475 |
! ! |
|
5476 |
||
3892 | 5477 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'actions'! |
5478 |
||
3952 | 5479 |
addToHistory:aPath |
5480 |
| item| |
|
5481 |
||
5482 |
item := self getItemFor:aPath. |
|
4347 | 5483 |
self backForwardListAdd:aPath. |
3952 | 5484 |
item isNil ifTrue:[ |
4347 | 5485 |
" not already in history" |
5486 |
self size >= self class historySize ifTrue:[ |
|
5487 |
self removeLast. |
|
5488 |
]. |
|
5489 |
item := DirectoryHistoryItem path:aPath. |
|
5490 |
self addFirst:item |
|
3952 | 5491 |
] ifFalse:[ |
4347 | 5492 |
"already been there before; move the entry to |
5493 |
the beginning, so it will fall out later." |
|
5494 |
self remove:item. |
|
5495 |
self addFirst:item |
|
3892 | 5496 |
]. |
3952 | 5497 |
! |
5498 |
||
4347 | 5499 |
backForwardListAdd:aPath |
5500 |
||
5501 |
|pathIndex| |
|
5502 |
||
5503 |
pathIndex := backForwardList indexOf:aPath. |
|
5504 |
pathIndex == 0 ifTrue:[ |
|
5505 |
" a new path comes in remove forward paths " |
|
5506 |
(backForwardList size) > backForwardIndex ifTrue:[ |
|
5507 |
backForwardList removeFromIndex:(backForwardIndex + 1) toIndex:(backForwardList size). |
|
5508 |
]. |
|
5509 |
] ifFalse:[ |
|
5510 |
backForwardList remove:aPath. |
|
5511 |
pathIndex <= backForwardIndex ifTrue:[ |
|
5512 |
backForwardIndex := backForwardIndex - 1. |
|
5513 |
] |
|
4022 | 5514 |
]. |
4347 | 5515 |
backForwardList add:aPath afterIndex:backForwardIndex. |
5516 |
backForwardIndex := backForwardIndex + 1. |
|
5517 |
backForwardIndex > self class historySize ifTrue:[ |
|
5518 |
backForwardList removeFirst. |
|
5519 |
backForwardIndex := backForwardIndex - 1. |
|
3892 | 5520 |
]. |
4347 | 5521 |
! |
5522 |
||
5523 |
goBackward |
|
4288 | 5524 |
"return the first path of the backward list; |
5525 |
remove it from the back list and add it ti the forward list." |
|
4022 | 5526 |
|
4347 | 5527 |
|retPath| |
5528 |
||
5529 |
self canBackward ifTrue:[ |
|
5530 |
retPath := backForwardList at:(backForwardIndex - 1). |
|
5531 |
backForwardIndex := backForwardIndex - 1. |
|
4288 | 5532 |
]. |
4022 | 5533 |
^ retPath. |
5534 |
! |
|
5535 |
||
5536 |
goForward |
|
4288 | 5537 |
"return the first path of the forward list; |
5538 |
remove it from the list." |
|
4022 | 5539 |
|
4347 | 5540 |
|retPath| |
5541 |
||
5542 |
self canForward ifTrue:[ |
|
5543 |
retPath := backForwardList at:backForwardIndex + 1. |
|
5544 |
backForwardIndex := backForwardIndex + 1. |
|
4288 | 5545 |
]. |
4022 | 5546 |
^ retPath. |
5547 |
! |
|
5548 |
||
5549 |
resetForwardBackward |
|
5550 |
||
4347 | 5551 |
self initialize |
4022 | 5552 |
! |
5553 |
||
5554 |
setPosition:aPosition for:aPath |
|
5555 |
||
5556 |
self do:[:item| |
|
4414 | 5557 |
item path = aPath ifTrue:[ |
5558 |
item position:aPosition. |
|
5559 |
] |
|
4022 | 5560 |
]. |
3892 | 5561 |
! ! |
5562 |
||
4032 | 5563 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'initialize'! |
5564 |
||
5565 |
initialize |
|
5566 |
||
4347 | 5567 |
backForwardList := OrderedCollection new. |
5568 |
self reverseDo:[:el| |
|
5569 |
backForwardList add:el path. |
|
5570 |
]. |
|
5571 |
backForwardIndex := backForwardList size. |
|
4032 | 5572 |
! ! |
5573 |
||
3892 | 5574 |
!AbstractFileBrowser::DirectoryHistory methodsFor:'queries'! |
5575 |
||
4288 | 5576 |
canBackward |
4347 | 5577 |
|
5578 |
^ backForwardIndex > 1 |
|
4288 | 5579 |
! |
5580 |
||
3892 | 5581 |
canForward |
4347 | 5582 |
|
5583 |
^ (backForwardList size >= (backForwardIndex + 1)) |
|
5584 |
! |
|
5585 |
||
5586 |
getBackCollection |
|
5587 |
||
5588 |
| backCol | |
|
5589 |
||
5590 |
backCol := OrderedCollection new. |
|
5591 |
self canBackward ifTrue:[ |
|
5592 |
| tmpCol | |
|
5593 |
tmpCol := backForwardList copyTo:backForwardIndex - 1. |
|
5594 |
tmpCol reverseDo:[ :el| |
|
5595 |
backCol add:el. |
|
5596 |
] |
|
5597 |
]. |
|
5598 |
^ backCol |
|
3952 | 5599 |
! |
5600 |
||
5601 |
getForwardCollection |
|
5602 |
||
4347 | 5603 |
| forwCol | |
5604 |
||
5605 |
forwCol := OrderedCollection new. |
|
5606 |
self canForward ifTrue:[ |
|
5607 |
forwCol := backForwardList copyFrom:(backForwardIndex + 1) |
|
5608 |
]. |
|
5609 |
^ forwCol |
|
3952 | 5610 |
! |
5611 |
||
5612 |
getItemFor:aPath |
|
5613 |
||
5614 |
self do:[:item| item path = aPath ifTrue:[^ item]]. |
|
5615 |
^ nil. |
|
5616 |
! |
|
5617 |
||
5618 |
getPositionFor:aPath |
|
5619 |
||
5620 |
|item| |
|
5621 |
||
5622 |
item := self getItemFor:aPath. |
|
5623 |
||
5624 |
item notNil ifTrue:[ |
|
4414 | 5625 |
^ item position. |
3952 | 5626 |
]. |
5627 |
^ nil |
|
5628 |
! |
|
5629 |
||
5630 |
includesPath:aPath |
|
5631 |
||
5632 |
self do:[:item| item path = aPath ifTrue:[^ true]]. |
|
5633 |
^ false. |
|
4347 | 5634 |
! |
5635 |
||
5636 |
nextBackwardItem |
|
5637 |
"return the first path of the backward list" |
|
5638 |
||
5639 |
|retPath| |
|
5640 |
||
5641 |
self canBackward ifTrue:[ |
|
5642 |
retPath := backForwardList at:backForwardIndex. |
|
5643 |
]. |
|
5644 |
^ retPath. |
|
5645 |
! |
|
5646 |
||
5647 |
nextForwardItem |
|
5648 |
"return the first path of the forward list" |
|
5649 |
||
5650 |
|retPath| |
|
5651 |
||
5652 |
self canForward ifTrue:[ |
|
5653 |
retPath := backForwardList at:backForwardIndex + 1. |
|
5654 |
]. |
|
5655 |
^ retPath. |
|
3952 | 5656 |
! ! |
5657 |
||
5658 |
!AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem class methodsFor:'instance creation'! |
|
5659 |
||
5660 |
path:aPath |
|
5661 |
||
5662 |
^ self new path:aPath |
|
5663 |
! ! |
|
5664 |
||
5665 |
!AbstractFileBrowser::DirectoryHistory::DirectoryHistoryItem methodsFor:'accessing'! |
|
5666 |
||
5667 |
path |
|
5668 |
"return the value of the instance variable 'path' (automatically generated)" |
|
5669 |
||
5670 |
^ path |
|
5671 |
! |
|
5672 |
||
5673 |
path:something |
|
5674 |
"set the value of the instance variable 'path' (automatically generated)" |
|
5675 |
||
5676 |
path := something. |
|
5677 |
! |
|
5678 |
||
5679 |
position |
|
5680 |
"return the value of the instance variable 'position' (automatically generated)" |
|
5681 |
||
5682 |
^ position |
|
5683 |
! |
|
5684 |
||
5685 |
position:something |
|
5686 |
"set the value of the instance variable 'position' (automatically generated)" |
|
5687 |
||
5688 |
position := something. |
|
5689 |
! |
|
5690 |
||
5691 |
printString |
|
5692 |
||
5693 |
^ self path asString |
|
3892 | 5694 |
! ! |
5695 |
||
5696 |
!AbstractFileBrowser::FilenameHistory class methodsFor:'attributes access'! |
|
5697 |
||
4337
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
5698 |
filenameHistorySize |
3892 | 5699 |
|
5700 |
^ 20 |
|
5701 |
! ! |
|
5702 |
||
5703 |
!AbstractFileBrowser::FilenameHistory methodsFor:'adding & removing'! |
|
5704 |
||
5705 |
add:aApplItem |
|
5706 |
||
5707 |
super add:aApplItem. |
|
4337
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
5708 |
(self size > self class filenameHistorySize) ifTrue:[ |
f2eed806e854
change first letter uppercase methods on class side to lowercase ones
penk
parents:
4317
diff
changeset
|
5709 |
self removeLast. |
3892 | 5710 |
] |
5711 |
! ! |
|
5712 |
||
5713 |
!AbstractFileBrowser::SaveAspectItem class methodsFor:'instance creation'! |
|
5714 |
||
5715 |
withValue:aValue isHolder:aBoolean |
|
5716 |
||
5717 |
| instance | |
|
5718 |
||
5719 |
instance := self basicNew. |
|
5720 |
instance value:aValue. |
|
5721 |
instance isHolder:aBoolean. |
|
5722 |
^ instance |
|
5723 |
! ! |
|
5724 |
||
5725 |
!AbstractFileBrowser::SaveAspectItem methodsFor:'accessing'! |
|
5726 |
||
5727 |
isHolder |
|
5728 |
"return the value of the instance variable 'isHolder' (automatically generated)" |
|
5729 |
||
5730 |
^ isHolder |
|
5731 |
! |
|
5732 |
||
5733 |
isHolder:something |
|
5734 |
"set the value of the instance variable 'isHolder' (automatically generated)" |
|
5735 |
||
5736 |
isHolder := something. |
|
5737 |
! |
|
5738 |
||
5739 |
value |
|
5740 |
"return the value of the instance variable 'value' (automatically generated)" |
|
5741 |
||
5742 |
^ value |
|
5743 |
! |
|
5744 |
||
5745 |
value:something |
|
5746 |
"set the value of the instance variable 'value' (automatically generated)" |
|
5747 |
||
5748 |
value := something. |
|
5749 |
! ! |
|
5750 |
||
5751 |
!AbstractFileBrowser class methodsFor:'documentation'! |
|
5752 |
||
5753 |
version |
|
4531 | 5754 |
^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.89 2003-02-10 14:04:49 cg Exp $' |
3892 | 5755 |
! ! |