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