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