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