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