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