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