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