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