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