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