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