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