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