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