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