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