author | Claus Gittinger <cg@exept.de> |
Thu, 01 Feb 1996 21:02:43 +0100 | |
changeset 345 | 3bb0d27efc7a |
parent 343 | 569baf25f549 |
child 347 | acfb4dcd3017 |
permissions | -rw-r--r-- |
88 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
86 | 12 |
|
13 |
ApplicationModel subclass:#NewLauncher |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
14 |
instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn' |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
15 |
classVariableNames:'CachedAboutIcon' |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
16 |
poolDictionaries:'' |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
17 |
category:'Interface-Smalltalk' |
86 | 18 |
! |
19 |
||
88 | 20 |
!NewLauncher class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
105 | 36 |
customization |
37 |
" |
|
38 |
Of course, it is possible to change the NewLauncher class itself |
|
39 |
as appropriate, however, we suggest you create a subclass (say MyLauncher), |
|
40 |
define it as autoloaded in the patches file, and redefined some methods |
|
41 |
there. That way, your changes are easier to reintroduce in case of |
|
42 |
an ST/X upgrade. |
|
43 |
||
44 |
||
45 |
adding more buttons to the button-panel: |
|
46 |
||
47 |
see the method #buttonPanelSpec; |
|
48 |
it defines a list of selectors and icons, which is used by |
|
49 |
#setupButtonPanelIn:. |
|
50 |
There, for each entry, a button with that icon is created, |
|
51 |
which sends a selector-message to the launcher. |
|
52 |
||
53 |
Add entries to that list, and define appropriate methods. |
|
54 |
For example, to add a button which opens a drawTool, |
|
55 |
change #buttonPanelSpec to: |
|
56 |
||
57 |
buttonPanelSpec |
|
58 |
^ #( |
|
59 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
|
60 |
#(startFileBrowser 'FBrowser32x32.xbm') |
|
61 |
#(nil nil) |
|
62 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
|
63 |
#(nil nil) |
|
64 |
#(nil nil) |
|
65 |
#(startDrawTool 'DrawTool.xbm') |
|
66 |
) |
|
67 |
||
68 |
the panel adjusts its height as appropriate - you may want to |
|
69 |
create new (small) icons for a good look. |
|
70 |
||
71 |
adding an entry to a menu: |
|
72 |
||
73 |
see the #setupMenu method; either add another top-menu, or |
|
74 |
add entries to an existing menu. |
|
88 | 75 |
" |
219 | 76 |
! |
77 |
||
78 |
documentation |
|
79 |
" |
|
80 |
a new launcher, combining old Launchers menu and transcript into |
|
81 |
one view. (you no longer have to move two views around all the time ...). |
|
82 |
||
83 |
Also, this app makes first use of the new compatibility framework; |
|
84 |
you will notice, that this is a subclass of ApplicationModel. |
|
85 |
New applications will no longer be built as subclasses of standardSystemView. |
|
86 |
" |
|
88 | 87 |
! ! |
88 |
||
86 | 89 |
!NewLauncher class methodsFor:'defaults'! |
90 |
||
91 |
aboutIcon |
|
92 |
|image| |
|
93 |
||
94 |
CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon]. |
|
95 |
||
96 |
image := Image fromFile:'SmalltalkX.xbm'. |
|
92 | 97 |
image notNil ifTrue:[ |
86 | 98 |
|green dark| |
99 |
||
100 |
Display hasColors ifTrue:[ |
|
105 | 101 |
green := (Color red:0 green:80 blue:20) "darkened". |
86 | 102 |
dark := Color grey:10. |
102 | 103 |
image photometric:#palette. |
86 | 104 |
] ifFalse:[ |
100 | 105 |
dark := Color black. |
106 |
green := Color white. |
|
102 | 107 |
image photometric:#blackIs0. |
86 | 108 |
]. |
102 | 109 |
image colorMap:(Array with:dark with:green). |
144 | 110 |
"/ Display depth > 2 ifTrue:[ |
111 |
"/ image := (Image implementorForDepth:Display depth) fromImage:image. |
|
112 |
"/ ] |
|
86 | 113 |
]. |
114 |
CachedAboutIcon := image. |
|
115 |
^ image |
|
116 |
||
117 |
" |
|
92 | 118 |
CachedAboutIcon := nil. |
119 |
NewLauncher aboutIcon |
|
120 |
" |
|
144 | 121 |
|
122 |
"Modified: 20.10.1995 / 21:54:58 / cg" |
|
219 | 123 |
! |
124 |
||
125 |
smallAboutIcon |
|
126 |
|image| |
|
127 |
||
128 |
image := self aboutIcon. |
|
129 |
image notNil ifTrue:[ |
|
130 |
image := image magnifiedBy:0.4. |
|
131 |
]. |
|
132 |
^ image |
|
133 |
||
134 |
" |
|
135 |
CachedAboutIcon := nil. |
|
136 |
NewLauncher aboutIcon. |
|
137 |
NewLauncher smallAboutIcon. |
|
138 |
" |
|
139 |
! ! |
|
140 |
||
141 |
!NewLauncher methodsFor:'actions - about & help'! |
|
142 |
||
143 |
about |
|
144 |
|box| |
|
145 |
||
146 |
box := AboutBox new. |
|
147 |
box autoHideAfter:10 with:[]. |
|
148 |
box showAtCenter |
|
149 |
! |
|
150 |
||
151 |
showDocumentation:aRelativeDocFilePath |
|
152 |
" |
|
153 |
although that one is not yet finished, |
|
154 |
its better than nothing ... |
|
155 |
" |
|
156 |
XtHTML notNil ifTrue:[ |
|
157 |
" |
|
158 |
temporary kludge; |
|
159 |
not all machines can autoload binaries; |
|
160 |
however, on my SGI (which can) we want it |
|
161 |
to load automatically. |
|
162 |
" |
|
163 |
XtHTML isLoaded ifFalse:[ |
|
164 |
(OperatingSystem getSystemType = 'iris') ifTrue:[ |
|
165 |
ErrorSignal catch:[XtHTML autoload] |
|
166 |
] |
|
167 |
]. |
|
168 |
XtHTML isLoaded ifTrue:[ |
|
169 |
XtHTML openFullOnDocumentationFile:aRelativeDocFilePath. |
|
170 |
^ self |
|
171 |
]. |
|
172 |
]. |
|
173 |
||
174 |
self warn:'Sorry, the ST/X HTML reader is not (yet) |
|
175 |
included in this architectures release. |
|
176 |
||
177 |
Please use Mosaic, netscape, chimera or any |
|
178 |
other HTML viewer to see the documentation. |
|
179 |
||
180 |
The documentation is found in the ''doc/online'' directory.'. |
|
181 |
||
182 |
"Modified: 31.8.1995 / 13:11:08 / claus" |
|
183 |
! |
|
184 |
||
185 |
startDocumentationTool |
|
186 |
self showDocumentation:'TOP.html' |
|
187 |
||
188 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
189 |
! |
|
190 |
||
191 |
toggleActiveHelp:aBoolean |
|
192 |
ActiveHelp notNil ifTrue:[ |
|
193 |
helpIsOn := aBoolean. |
|
194 |
helpIsOn ifTrue:[ |
|
195 |
ActiveHelp start |
|
196 |
] ifFalse:[ |
|
197 |
ActiveHelp stop |
|
198 |
] |
|
199 |
]. |
|
200 |
! ! |
|
201 |
||
202 |
!NewLauncher methodsFor:'actions - classes'! |
|
203 |
||
204 |
browseImplementors |
|
205 |
|enterBox| |
|
206 |
||
207 |
enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs. |
|
208 |
enterBox okText:(resources at:'browse'). |
|
209 |
enterBox action:[:selectorName | |
|
210 |
|cls| |
|
211 |
||
212 |
self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName] |
|
213 |
]. |
|
214 |
enterBox showAtPointer |
|
215 |
! |
|
216 |
||
217 |
browseSenders |
|
218 |
|enterBox| |
|
219 |
||
220 |
enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs. |
|
221 |
enterBox okText:(resources at:'browse'). |
|
222 |
enterBox action:[:selectorName | |
|
223 |
|cls| |
|
224 |
||
225 |
self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName] |
|
226 |
]. |
|
227 |
enterBox showAtPointer |
|
228 |
! |
|
229 |
||
230 |
startChangesBrowser |
|
231 |
self withWaitCursorDo:[ChangesBrowser open] |
|
232 |
! |
|
233 |
||
234 |
startClassBrowser |
|
235 |
SystemBrowser askThenBrowseClass |
|
236 |
! |
|
237 |
||
238 |
startClassHierarchyBrowser |
|
239 |
SystemBrowser askThenBrowseClassHierarchy |
|
240 |
! |
|
241 |
||
242 |
startClassTreeView |
|
243 |
self withWaitCursorDo:[ClassTreeGraphView open] |
|
244 |
! |
|
245 |
||
246 |
startFileBrowser |
|
247 |
self withWaitCursorDo:[FileBrowser open] |
|
248 |
! |
|
249 |
||
250 |
startFullClassBrowser |
|
251 |
SystemBrowser askThenBrowseFullClassProtocol |
|
252 |
! |
|
253 |
||
254 |
startSystemBrowser |
|
255 |
self withWaitCursorDo:[SystemBrowser open] |
|
256 |
! |
|
257 |
||
258 |
startWorkspace |
|
259 |
Workspace open |
|
260 |
! ! |
|
261 |
||
262 |
!NewLauncher methodsFor:'actions - demos'! |
|
263 |
||
264 |
openDemo:className |
|
265 |
(Smalltalk at:className) open |
|
266 |
||
267 |
! |
|
268 |
||
269 |
startTetris |
|
270 |
Tetris open |
|
271 |
! |
|
272 |
||
273 |
startTicTacToe |
|
274 |
TicTacToeGame open |
|
275 |
! |
|
276 |
||
277 |
startTicTacToe2 |
|
278 |
TicTacToeGame open2UserGame |
|
279 |
! ! |
|
280 |
||
281 |
!NewLauncher methodsFor:'actions - file'! |
|
282 |
||
283 |
exit |
|
284 |
(self confirm:(resources string:'Are you certain you want to exit without saving ?')) |
|
285 |
ifTrue:[ |
|
286 |
self saveAllViews. |
|
287 |
Smalltalk exit |
|
288 |
] |
|
289 |
! |
|
290 |
||
291 |
objectModuleDialog |
|
292 |
|allModules moduleNames |
|
293 |
allObjects methodObjects methodNames |
|
294 |
box l unloadButton |
|
295 |
list1 list2 listView1 listView2 |
|
296 |
y panel showBuiltIn showModules showMethods moduleListUpdater check| |
|
297 |
||
298 |
showBuiltIn := true asValue. |
|
299 |
showModules := ObjectFileLoader notNil asValue. |
|
300 |
showMethods := ObjectFileLoader notNil asValue. |
|
301 |
||
302 |
moduleListUpdater := Plug new. |
|
303 |
moduleListUpdater |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
304 |
respondTo:#getModules |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
305 |
with:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
306 |
|l| |
219 | 307 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
308 |
l := Array new. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
309 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
310 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
311 |
(showBuiltIn value and:[showModules value]) ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
312 |
allModules := allModules select:[:i | |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
313 |
|wantToSee| |
219 | 314 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
315 |
wantToSee := (i at:#dynamic). |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
316 |
showBuiltIn value ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
317 |
wantToSee := wantToSee not |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
318 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
319 |
wantToSee |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
320 |
] |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
321 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
322 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
323 |
allModules sort:[:a :b | (a at:#id) > (b at:#id)]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
324 |
moduleNames := allModules collect:[:entry | (entry at:#name)]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
325 |
l := l , moduleNames. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
326 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
327 |
showMethods value ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
328 |
allObjects := ObjectFileLoader loadedObjectHandles. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
329 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
330 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
331 |
'compiled method - removed' , ' (in ' , mH pathName , ')' |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
332 |
] ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
333 |
'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')' |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
334 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
335 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
336 |
l := l , methodNames. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
337 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
338 |
list1 list:l. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
339 |
unloadButton disable. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
340 |
]. |
219 | 341 |
|
342 |
list1 := SelectionInList new. |
|
343 |
list2 := SelectionInList new. |
|
344 |
||
345 |
showBuiltIn onChangeSend:#getModules to:moduleListUpdater. |
|
346 |
showModules onChangeSend:#getModules to:moduleListUpdater. |
|
347 |
showMethods onChangeSend:#getModules to:moduleListUpdater. |
|
348 |
||
349 |
box := Dialog new. |
|
350 |
box label:(resources string:'Module dialog'). |
|
351 |
||
352 |
listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
353 |
listView1 model:list1. |
|
354 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
355 |
listView1 action:[:sel | |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
356 |
|info classNames tabs| |
219 | 357 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
358 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
359 |
info := allModules at:sel ifAbsent:nil. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
360 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
361 |
info isNil ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
362 |
"/ selected a method |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
363 |
list2 list:#(). |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
364 |
unloadButton enable. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
365 |
] ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
366 |
"/ selected a package |
219 | 367 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
368 |
tabs := TabulatorSpecification unit:#inch positions:#(0 2.6). |
219 | 369 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
370 |
"/ fill bottom list with class-info |
219 | 371 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
372 |
classNames := (info at:#classNames) asSortedCollection. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
373 |
classNames := classNames collect:[:cName | |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
374 |
|cls entry rev listEntry| |
219 | 375 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
376 |
listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
377 |
listEntry colAt:1 put:cName. |
219 | 378 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
379 |
cls := Smalltalk classNamed:cName. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
380 |
cls isNil ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
381 |
listEntry colAt:2 put:'(class removed)'. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
382 |
] ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
383 |
rev := cls binaryRevision. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
384 |
rev notNil ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
385 |
entry :='(bin: ' , rev. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
386 |
cls revision ~= rev ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
387 |
entry := entry , ' / src: ' , cls revision |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
388 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
389 |
listEntry colAt:2 put:entry , ')' |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
390 |
] ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
391 |
cls revision notNil ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
392 |
listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
393 |
] |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
394 |
] |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
395 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
396 |
listEntry |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
397 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
398 |
list2 list:classNames. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
399 |
(info at:#dynamic) ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
400 |
unloadButton enable. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
401 |
] ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
402 |
unloadButton disable. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
403 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
404 |
] |
219 | 405 |
]. |
406 |
||
407 |
panel := HorizontalPanelView new. |
|
408 |
||
245 | 409 |
panel add:(l := Label label:'modules shown:'). |
219 | 410 |
l adjust:#left; borderWidth:0. |
411 |
panel add:(CheckBox label:'builtin' model:showBuiltIn). |
|
412 |
panel add:(check := CheckBox label:'modules' model:showModules). |
|
413 |
ObjectFileLoader isNil ifTrue:[check disable]. |
|
414 |
panel add:(check := CheckBox label:'methods' model:showMethods). |
|
415 |
ObjectFileLoader isNil ifTrue:[check disable]. |
|
416 |
||
417 |
panel horizontalLayout:#fitSpace. |
|
418 |
||
419 |
box addComponent:panel tabable:true. |
|
420 |
||
421 |
box addComponent:listView1 tabable:true. |
|
422 |
listView1 topInset:(View viewSpacing + panel preferredExtent y). |
|
423 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
424 |
||
425 |
l := box addTextLabel:(resources string:'contained classes/subsets:'). |
|
426 |
l adjust:#left; borderWidth:0. |
|
427 |
l origin:0.0@0.4 corner:1.0@0.4. |
|
428 |
l topInset:(View viewSpacing). |
|
429 |
l bottomInset:((l preferredExtent y) negated - View viewSpacing). |
|
430 |
||
431 |
listView2 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
432 |
listView2 model:list2; printItems:false. |
|
433 |
box addComponent:listView2 tabable:true. |
|
434 |
listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2. |
|
435 |
listView2 disable. |
|
436 |
||
437 |
unloadButton := Button label:(resources string:'unload'). |
|
438 |
unloadButton action:[ |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
439 |
self withWaitCursorDo:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
440 |
box withWaitCursorDo:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
441 |
|info idx pathName| |
219 | 442 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
443 |
idx := list1 selectionIndex. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
444 |
info := allModules at:idx ifAbsent:nil. |
219 | 445 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
446 |
info isNil ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
447 |
"/ selected a method |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
448 |
idx := idx - allModules size. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
449 |
pathName := (methodObjects at:idx) pathName. |
219 | 450 |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
451 |
] ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
452 |
"/ selected a package |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
453 |
pathName := (info at:#pathName). |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
454 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
455 |
ObjectFileLoader unloadObjectFile:pathName. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
456 |
moduleListUpdater getModules. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
457 |
unloadButton disable. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
458 |
] |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
459 |
] |
219 | 460 |
]. |
461 |
moduleListUpdater getModules. |
|
462 |
||
463 |
box addButton:unloadButton. |
|
464 |
box addAbortButtonLabelled:(resources string:'close'). |
|
465 |
||
466 |
y := box yPosition. |
|
467 |
listView2 topInset:(l preferredExtent y + 5). |
|
468 |
listView2 bottomInset:(box preferredExtent y - y). |
|
469 |
||
470 |
box width:(350 min:(box device width * 2 // 3)); |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
471 |
height:(450 min:(box device height - 50)); |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
472 |
sizeFixed:true. |
219 | 473 |
box showAtPointer. |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
474 |
box destroy. |
219 | 475 |
|
476 |
"Modified: 17.9.1995 / 16:47:50 / claus" |
|
262
29e57d617edd
tell the fact that a binary class has been overloaded (via fileIn) in the moduleDialog
Claus Gittinger <cg@exept.de>
parents:
250
diff
changeset
|
477 |
"Modified: 9.12.1995 / 21:08:35 / cg" |
219 | 478 |
! |
479 |
||
480 |
snapshot |
|
481 |
|saveBox| |
|
482 |
||
483 |
saveBox := EnterBox title:(resources at:'filename for image:') withCRs. |
|
484 |
saveBox okText:(resources at:'save'). |
|
485 |
saveBox action:[:fileName | |
|
486 |
(ObjectMemory snapShotOn:fileName) ifFalse:[ |
|
487 |
" |
|
488 |
snapshot failed for some reason (disk full, no permission etc.) |
|
489 |
" |
|
490 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
491 |
] |
|
492 |
]. |
|
493 |
||
494 |
saveBox initialText:(ObjectMemory nameForSnapshot). |
|
495 |
saveBox label:'save image'. |
|
496 |
saveBox showAtPointer |
|
497 |
||
498 |
! |
|
499 |
||
500 |
snapshotAndExit |
|
501 |
|saveBox| |
|
502 |
||
503 |
saveBox := EnterBox title:(resources at:'filename for image:') withCRs. |
|
504 |
saveBox okText:(resources at:'save & exit'). |
|
505 |
saveBox action:[:fileName | |
|
506 |
(ObjectMemory snapShotOn:fileName) ifFalse:[ |
|
507 |
" |
|
508 |
snapshot failed for some reason (disk full, no permission etc.) |
|
509 |
Do NOT exit in this case. |
|
510 |
" |
|
511 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
512 |
] ifTrue:[ |
|
513 |
" |
|
514 |
saveAllViews tells all views to shutdown neatly |
|
515 |
(i.e. offer a chance to save the contents to a file). |
|
516 |
||
517 |
This is NOT required - all data should be in the snapshot ... |
|
518 |
... however, if remote disks/mountable filesystems are involved, |
|
519 |
which may not be present the next time, it may make sense to |
|
520 |
uncomment it and query for saving - time will show which is better. |
|
521 |
" |
|
522 |
" |
|
523 |
self saveAllViews. |
|
524 |
" |
|
525 |
Smalltalk exit |
|
526 |
] |
|
527 |
]. |
|
528 |
||
529 |
saveBox initialText:(ObjectMemory nameForSnapshot). |
|
530 |
saveBox label:'save image & exit'. |
|
531 |
saveBox showAtPointer |
|
532 |
||
533 |
! ! |
|
534 |
||
535 |
!NewLauncher methodsFor:'actions - goodies'! |
|
536 |
||
537 |
startCalendar |
|
538 |
Calendar open |
|
539 |
! |
|
540 |
||
541 |
startClock |
|
542 |
RoundClock open |
|
543 |
! |
|
544 |
||
545 |
startMailTool |
|
546 |
MailView open |
|
547 |
! |
|
548 |
||
549 |
startNewsTool |
|
550 |
NewsView open |
|
551 |
! ! |
|
552 |
||
553 |
!NewLauncher methodsFor:'actions - projects'! |
|
554 |
||
555 |
newProject |
|
556 |
Project notNil ifTrue:[ |
|
557 |
(ProjectView for:(Project new)) open |
|
558 |
] |
|
559 |
! |
|
560 |
||
561 |
selectProject |
|
562 |
|list box| |
|
563 |
||
564 |
Project notNil ifTrue:[ |
|
565 |
list := Project allInstances. |
|
566 |
box := ListSelectionBox new. |
|
567 |
box list:(list collect:[:p | p name]). |
|
568 |
box title:(resources string:'select a project'). |
|
569 |
box action:[:selection | |
|
570 |
|project| |
|
571 |
||
572 |
project := list detect:[:p | p name = selection] ifNone:[nil]. |
|
573 |
project isNil ifTrue:[ |
|
574 |
Transcript showCr:'no such project.' |
|
575 |
] ifFalse:[ |
|
576 |
project showViews. |
|
577 |
Project current:project |
|
578 |
] |
|
579 |
]. |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
580 |
box showAtPointer. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
581 |
box destroy |
219 | 582 |
] |
86 | 583 |
! ! |
584 |
||
219 | 585 |
!NewLauncher methodsFor:'actions - settings'! |
586 |
||
587 |
compilerSettings |
|
588 |
|box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays |
|
589 |
warnSTXBox warnUnderscoreBox warnOldStyleBox |
|
590 |
stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions |
|
591 |
stcLibraries historyLines catchRedefs |
|
343 | 592 |
warnEnabler check y component oldIndent| |
219 | 593 |
|
594 |
warnings := Compiler warnings asValue. |
|
595 |
||
596 |
warnSTX := Compiler warnSTXSpecials asValue. |
|
597 |
warnUnderscore := Compiler warnUnderscoreInIdentifier asValue. |
|
598 |
warnOldStyle := Compiler warnOldStyleAssignment asValue. |
|
599 |
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue. |
|
600 |
immutableArrays := Compiler arraysAreImmutable asValue. |
|
601 |
stcCompilationOptions := #( always default never). |
|
602 |
stcCompilation := SelectionInList new list:(resources array:#('always' 'primitive code only' 'never')). |
|
603 |
stcCompilation selectionIndex:2. |
|
604 |
stcIncludes := Compiler stcCompilationIncludes asValue. |
|
605 |
stcDefines := Compiler stcCompilationDefines asValue. |
|
606 |
stcOptions := Compiler stcCompilationOptions asValue. |
|
232 | 607 |
ObjectFileLoader notNil ifTrue:[ |
608 |
stcLibraries := (String fromStringCollection:ObjectFileLoader searchedLibraries separatedBy:' ') asValue. |
|
609 |
]. |
|
219 | 610 |
|
611 |
catchRedefs := Class catchMethodRedefinitions asValue. |
|
612 |
historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue. |
|
613 |
||
614 |
warnEnabler := Plug new. |
|
615 |
warnEnabler |
|
232 | 616 |
respondTo:#check |
617 |
with:[warnings value ifTrue:[ |
|
618 |
warnSTXBox enable. |
|
619 |
warnOldStyleBox enable. |
|
620 |
allowUnderscore value ifTrue:[ |
|
621 |
warnUnderscoreBox enable. |
|
622 |
] ifFalse:[ |
|
623 |
warnUnderscoreBox disable. |
|
624 |
]. |
|
625 |
] ifFalse:[ |
|
626 |
warnSTXBox disable. |
|
627 |
warnUnderscoreBox disable. |
|
628 |
warnOldStyleBox disable. |
|
629 |
]]. |
|
219 | 630 |
|
631 |
warnings onChangeSend:#check to:warnEnabler. |
|
632 |
allowUnderscore onChangeSend:#check to:warnEnabler. |
|
633 |
||
634 |
box := DialogBox new. |
|
635 |
box label:(resources string:'Compiler settings'). |
|
636 |
||
637 |
box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs. |
|
638 |
check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines. |
|
639 |
HistoryManager isNil ifTrue:[check disable]. |
|
640 |
||
641 |
box addHorizontalLine. |
|
642 |
||
232 | 643 |
ObjectFileLoader notNil ifTrue:[ |
644 |
compilationList := box addPopUpList:(resources string:'compilation to machine code') on:stcCompilation. |
|
645 |
stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2). |
|
219 | 646 |
|
232 | 647 |
y := box yPosition. |
648 |
component := box addTextLabel:(resources string:'stc include directories:'). |
|
649 |
component width:0.5; adjust:#right; borderWidth:0. |
|
650 |
box yPosition:y. |
|
651 |
component := box addInputFieldOn:stcIncludes tabable:true. |
|
652 |
component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
219 | 653 |
|
232 | 654 |
box addVerticalSpace. |
655 |
y := box yPosition. |
|
656 |
component := box addTextLabel:'stc defines:'. |
|
657 |
component width:0.5; adjust:#right; borderWidth:0. |
|
658 |
box yPosition:y. |
|
659 |
component := box addInputFieldOn:stcDefines tabable:true. |
|
660 |
component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
219 | 661 |
|
232 | 662 |
box addVerticalSpace. |
663 |
y := box yPosition. |
|
664 |
component := box addTextLabel:'stc options:'. |
|
665 |
component width:0.5; adjust:#right; borderWidth:0. |
|
666 |
box yPosition:y. |
|
667 |
component := box addInputFieldOn:stcOptions tabable:true. |
|
668 |
component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
219 | 669 |
|
232 | 670 |
box addVerticalSpace. |
671 |
y := box yPosition. |
|
672 |
component := box addTextLabel:'stc C-libraries:'. |
|
673 |
component width:0.5; adjust:#right; borderWidth:0. |
|
674 |
box yPosition:y. |
|
675 |
component := box addInputFieldOn:stcLibraries tabable:true. |
|
676 |
component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
219 | 677 |
|
232 | 678 |
box addVerticalSpace. |
679 |
box addHorizontalLine. |
|
219 | 680 |
|
232 | 681 |
"/ if there is no compiler around, |
682 |
"/ change to compile nothing, and disable the checkBoxes |
|
683 |
Compiler canCreateMachineCode ifFalse:[ |
|
684 |
stcCompilation selectionIndex:3. |
|
685 |
compilationList disable. |
|
686 |
]. |
|
219 | 687 |
]. |
688 |
||
689 |
box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore. |
|
690 |
box addVerticalSpace. |
|
691 |
box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays. |
|
692 |
box addHorizontalLine. |
|
693 |
||
694 |
box addCheckBox:(resources string:'warnings') on:warnings. |
|
695 |
box addVerticalSpace. |
|
343 | 696 |
oldIndent := box leftIndent. |
219 | 697 |
box leftIndent:30. |
698 |
warnSTXBox := box addCheckBox:(resources string:'ST/X language extensions') on:warnSTX. |
|
699 |
box addVerticalSpace. |
|
700 |
warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore. |
|
701 |
box addVerticalSpace. |
|
702 |
warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle. |
|
703 |
box addVerticalSpace. |
|
343 | 704 |
box leftIndent:oldIndent. |
219 | 705 |
|
706 |
box addAbortButton; addOkButton. |
|
707 |
||
708 |
warnEnabler check. |
|
709 |
box showAtPointer. |
|
710 |
||
711 |
box accepted ifTrue:[ |
|
232 | 712 |
HistoryManager notNil ifTrue:[ |
713 |
historyLines value ifTrue:[ |
|
714 |
HistoryManager activate |
|
715 |
] ifFalse:[ |
|
716 |
HistoryManager deactivate |
|
717 |
]. |
|
718 |
]. |
|
719 |
Class catchMethodRedefinitions:catchRedefs value. |
|
720 |
Compiler warnings:warnings value. |
|
721 |
Compiler warnSTXSpecials:warnSTX value. |
|
722 |
Compiler warnOldStyleAssignment:warnOldStyle value. |
|
723 |
Compiler warnUnderscoreInIdentifier:warnUnderscore value. |
|
724 |
Compiler allowUnderscoreInIdentifier:allowUnderscore value. |
|
725 |
Compiler arraysAreImmutable:immutableArrays value. |
|
726 |
Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex). |
|
727 |
Compiler stcCompilationIncludes:stcIncludes value. |
|
728 |
Compiler stcCompilationDefines:stcDefines value. |
|
729 |
Compiler stcCompilationOptions:stcOptions value. |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
730 |
ObjectFileLoader notNil ifTrue:[ |
233 | 731 |
ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords). |
732 |
] |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
733 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
734 |
box destroy |
219 | 735 |
|
736 |
"Modified: 10.9.1995 / 19:19:18 / claus" |
|
228 | 737 |
"Modified: 4.12.1995 / 01:11:23 / cg" |
219 | 738 |
! |
739 |
||
740 |
keyboardSetting |
|
741 |
|mappings listOfRawKeys listOfFunctions |
|
742 |
box l |
|
743 |
list1 list2 listView1 listView2 |
|
744 |
frame selectionForwarder macroForwarder macroTextView y| |
|
745 |
||
746 |
mappings := Screen current keyboardMap. |
|
747 |
||
748 |
listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort. |
|
749 |
listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort. |
|
750 |
||
751 |
selectionForwarder := Plug new. |
|
752 |
selectionForwarder respondTo:#showFunction |
|
753 |
with:[ |
|
754 |
|raw| |
|
755 |
raw := list1 selection. |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
756 |
list2 retractInterestsFor:selectionForwarder. |
219 | 757 |
list2 selection:(mappings at:raw asSymbol) asString. |
758 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
759 |
]. |
|
760 |
selectionForwarder respondTo:#showRawKey |
|
761 |
with:[ |
|
762 |
|f raw| |
|
763 |
||
764 |
f := list2 selection. |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
765 |
list1 retractInterestsFor:selectionForwarder. |
219 | 766 |
raw := mappings keyAtValue:f asString. |
767 |
raw isNil ifTrue:[ |
|
768 |
raw := mappings keyAtValue:f first. |
|
769 |
raw isNil ifTrue:[ |
|
770 |
raw := mappings keyAtValue:f asSymbol. |
|
771 |
] |
|
772 |
]. |
|
773 |
list1 selection:raw. |
|
774 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
775 |
]. |
|
776 |
||
777 |
macroForwarder := Plug new. |
|
778 |
macroForwarder respondTo:#showMacro |
|
779 |
with:[ |
|
780 |
|f macro indent| |
|
781 |
f := list2 selection. |
|
782 |
(f startsWith:'Cmd') ifTrue:[ |
|
783 |
f := f copyFrom:4 |
|
784 |
]. |
|
785 |
macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil. |
|
786 |
macro notNil ifTrue:[ |
|
787 |
macro := macro asStringCollection. |
|
788 |
indent := macro |
|
789 |
inject:99999 into:[:min :element | |
|
790 |
|stripped| |
|
791 |
||
792 |
stripped := element withoutLeadingSeparators. |
|
793 |
stripped size == 0 ifTrue:[ |
|
794 |
min |
|
795 |
] ifFalse:[ |
|
796 |
min min:(element size - stripped size) |
|
797 |
] |
|
798 |
]. |
|
799 |
indent ~~ 0 ifTrue:[ |
|
800 |
macro := macro collect:[:line | |
|
801 |
line size > indent ifTrue:[ |
|
802 |
line copyFrom:indent+1 |
|
803 |
] ifFalse:[ |
|
804 |
line |
|
805 |
]. |
|
806 |
] |
|
807 |
]. |
|
808 |
]. |
|
809 |
macroTextView contents:macro. |
|
810 |
]. |
|
811 |
||
812 |
list1 := SelectionInList with:listOfRawKeys. |
|
813 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
814 |
list2 := SelectionInList with:listOfFunctions. |
|
815 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
816 |
list2 onChangeSend:#showMacro to:macroForwarder. |
|
817 |
||
818 |
box := Dialog new. |
|
819 |
box label:(resources string:'Keyboard mappings'). |
|
820 |
||
821 |
l := box addTextLabel:(resources string:'KEY_MSG') withCRs. |
|
822 |
l adjust:#left; borderWidth:0. |
|
823 |
||
824 |
frame := View new. |
|
825 |
frame extent:300 @ 300. |
|
826 |
frame borderWidth:0. |
|
827 |
||
828 |
listView1 := ScrollableView for:SelectionInListView in:frame. |
|
829 |
listView1 model:list1. |
|
830 |
listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2. |
|
831 |
||
832 |
listView2 := ScrollableView for:SelectionInListView in:frame. |
|
833 |
listView2 model:list2. |
|
834 |
listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2. |
|
835 |
||
836 |
frame topInset:box yPosition. |
|
837 |
box addComponent:frame withExtent:350@200. |
|
838 |
box makeTabable:listView1. |
|
839 |
box makeTabable:listView2. |
|
840 |
frame origin:0.0@0.0 corner:1.0@0.6. |
|
841 |
||
842 |
box addVerticalSpace. |
|
843 |
||
844 |
l := box addTextLabel:(resources string:'Macro text (if any):') withCRs. |
|
845 |
l adjust:#left; borderWidth:0. |
|
846 |
l origin:0.0@0.6 corner:1.0@0.6. |
|
847 |
l topInset:(View viewSpacing). |
|
848 |
l bottomInset:(l preferredExtent y negated - View viewSpacing). |
|
849 |
||
850 |
macroTextView := HVScrollableView for:TextView miniScroller:true. |
|
851 |
box addComponent:macroTextView tabable:true. |
|
852 |
macroTextView origin:0.0@0.6 corner:1.0@1.0. |
|
853 |
y := box yPosition. |
|
854 |
||
855 |
box "addAbortButton;" addOkButton. |
|
856 |
macroTextView topInset:(l preferredExtent y + 5). |
|
857 |
macroTextView bottomInset:(box preferredExtent y - y). |
|
858 |
||
859 |
box showAtPointer. |
|
860 |
||
861 |
box accepted ifTrue:[ |
|
862 |
"no action yet ..." |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
863 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
864 |
box destroy |
219 | 865 |
! |
866 |
||
867 |
languageSetting |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
868 |
|listOfLanguages translatedLanguages idx language box| |
219 | 869 |
|
870 |
" |
|
871 |
hardwiring here is stupid - need a resource file |
|
872 |
which lists languagenames which have all texts available |
|
873 |
in resource files ... |
|
874 |
" |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
875 |
listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES'. |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
876 |
translatedLanguages := resources array:listOfLanguages. |
219 | 877 |
|
878 |
box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs. |
|
879 |
box label:(resources string:'Language selection'). |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
880 |
box list:translatedLanguages. |
219 | 881 |
box initialText:(Language). |
882 |
box action:[:newLanguage | |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
883 |
self withWaitCursorDo:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
884 |
Transcript showCr:'change language to ' , newLanguage , ' ...'. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
885 |
idx := translatedLanguages indexOf:newLanguage withoutSeparators. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
886 |
idx ~~ 0 ifTrue:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
887 |
language := listOfLanguages at:idx |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
888 |
] ifFalse:[ |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
889 |
language := newLanguage |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
890 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
891 |
Smalltalk at:#Language put:language asSymbol. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
892 |
Smalltalk changed:#Language. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
893 |
ResourcePack flushCachedResourcePacks |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
894 |
]. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
895 |
self reopenLauncher. |
219 | 896 |
]. |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
897 |
box showAtPointer. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
898 |
box destroy |
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
899 |
|
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
900 |
"Modified: 12.12.1995 / 17:53:52 / cg" |
219 | 901 |
! |
902 |
||
341 | 903 |
memorySettings |
904 |
|box check igcLimit igcFreeLimit igcFreeAmount newSpaceSize |
|
905 |
oldIncr y component fields| |
|
906 |
||
907 |
"/ |
|
908 |
"/ extract relevant system settings ... |
|
909 |
"/ |
|
910 |
igcLimit := ObjectMemory incrementalGCLimit asValue. |
|
911 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue. |
|
912 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue. |
|
913 |
newSpaceSize := ObjectMemory newSpaceSize asValue. |
|
914 |
oldIncr := ObjectMemory oldSpaceIncrement asValue. |
|
915 |
||
916 |
"/ |
|
917 |
"/ create a box on those values ... |
|
918 |
"/ |
|
919 |
fields := OrderedCollection new. |
|
920 |
||
921 |
box := DialogBox new. |
|
922 |
box label:(resources string:'Memory manager settings'). |
|
923 |
||
345 | 924 |
box addTextLabel:'Warning - invalid settings may result in poor performance. |
341 | 925 |
|
926 |
You have been warned.'. |
|
927 |
box addHorizontalLine. |
|
928 |
||
929 |
y := box yPosition. |
|
930 |
component := box addTextLabel:(resources string:'size of newSpace :'). |
|
931 |
component width:0.7; adjust:#right; borderWidth:0. |
|
932 |
box yPosition:y. |
|
933 |
component := box addInputFieldOn:newSpaceSize tabable:true. |
|
934 |
fields add:component. |
|
935 |
component width:0.3; left:0.7; acceptOnLeave:false. |
|
936 |
component converter:(PrintConverter new initForNumber). |
|
937 |
||
938 |
box addHorizontalLine. |
|
939 |
||
940 |
||
941 |
y := box yPosition. |
|
942 |
component := box addTextLabel:(resources string:'incremental GC allocation trigger:'). |
|
943 |
component width:0.7; adjust:#right; borderWidth:0. |
|
944 |
box yPosition:y. |
|
945 |
component := box addInputFieldOn:igcLimit tabable:true. |
|
946 |
fields add:component. |
|
947 |
component width:0.3; left:0.7; acceptOnLeave:false. |
|
948 |
component converter:(PrintConverter new initForNumber). |
|
345 | 949 |
box addTextLabel:'(start IGC whenever this amount has been allocated)'. |
341 | 950 |
|
951 |
box addHorizontalLine. |
|
952 |
||
953 |
y := box yPosition. |
|
954 |
component := box addTextLabel:(resources string:'incremental GC freespace trigger:'). |
|
955 |
component width:0.7; adjust:#right; borderWidth:0. |
|
956 |
box yPosition:y. |
|
957 |
component := box addInputFieldOn:igcFreeLimit tabable:true. |
|
958 |
fields add:component. |
|
959 |
component width:0.3; left:0.7; acceptOnLeave:false. |
|
960 |
component converter:(PrintConverter new initForNumber). |
|
961 |
box addTextLabel:'(start IGC whenever freespace drops below this)'. |
|
962 |
||
963 |
box addHorizontalLine. |
|
964 |
||
965 |
y := box yPosition. |
|
966 |
component := box addTextLabel:(resources string:'incremental GC amount:'). |
|
967 |
component width:0.7; adjust:#right; borderWidth:0. |
|
968 |
box yPosition:y. |
|
969 |
component := box addInputFieldOn:igcFreeAmount tabable:true. |
|
970 |
fields add:component. |
|
971 |
component width:0.3; left:0.7; acceptOnLeave:false. |
|
972 |
component converter:(PrintConverter new initForNumber). |
|
345 | 973 |
box addTextLabel:'(try to keep this amount for peak requests)'. |
341 | 974 |
|
975 |
box addHorizontalLine. |
|
976 |
||
977 |
y := box yPosition. |
|
978 |
component := box addTextLabel:(resources string:'oldspace increment:'). |
|
979 |
component width:0.7; adjust:#right; borderWidth:0. |
|
980 |
box yPosition:y. |
|
981 |
component := box addInputFieldOn:oldIncr tabable:true. |
|
982 |
fields add:component. |
|
983 |
component width:0.3; left:0.7; acceptOnLeave:false. |
|
984 |
component converter:(PrintConverter new initForNumber). |
|
345 | 985 |
box addTextLabel:'(increase oldSpace in chunks of this size)'. |
341 | 986 |
|
987 |
box addHorizontalLine. |
|
988 |
||
989 |
box addAbortButton; addOkButton. |
|
990 |
||
991 |
"/ |
|
992 |
"/ show the box ... |
|
993 |
"/ |
|
994 |
box showAtPointer. |
|
995 |
||
996 |
"/ |
|
997 |
"/ update system settings |
|
998 |
"/ |
|
999 |
box accepted ifTrue:[ |
|
1000 |
fields do:[:comp | comp accept]. |
|
1001 |
||
1002 |
igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[ |
|
1003 |
ObjectMemory freeSpaceGCAmount:igcFreeAmount value. |
|
1004 |
]. |
|
1005 |
igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[ |
|
1006 |
ObjectMemory freeSpaceGCLimit:igcFreeLimit value. |
|
1007 |
]. |
|
1008 |
igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[ |
|
1009 |
ObjectMemory incrementalGCLimit:igcLimit value. |
|
1010 |
]. |
|
1011 |
newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[ |
|
1012 |
ObjectMemory newSpaceSize:newSpaceSize value. |
|
1013 |
]. |
|
1014 |
oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[ |
|
1015 |
ObjectMemory oldSpaceIncrement:oldIncr value. |
|
1016 |
]. |
|
1017 |
]. |
|
1018 |
box destroy |
|
1019 |
||
345 | 1020 |
"Modified: 1.2.1996 / 11:43:28 / cg" |
341 | 1021 |
! |
1022 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1023 |
messageSettings |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1024 |
|box vmInfo vmErrors displayErrors classInfos| |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1025 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1026 |
vmInfo := ObjectMemory infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1027 |
vmErrors := ObjectMemory debugPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1028 |
classInfos := Object infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1029 |
displayErrors := DeviceWorkstation errorPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1030 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1031 |
box := DialogBox new. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1032 |
box label:(resources string:'Messages'). |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1033 |
"/ box extent:200@300. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1034 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1035 |
box addCheckBox:(resources string:'VM info messages') on:vmInfo. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1036 |
box addCheckBox:(resources string:'VM error messages') on:vmErrors. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1037 |
box addHorizontalLine. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1038 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1039 |
box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1040 |
box addCheckBox:(resources string:'Other info messages') on:classInfos. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1041 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1042 |
box addAbortButton; addOkButton. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1043 |
box showAtPointer. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1044 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1045 |
box accepted ifTrue:[ |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1046 |
ObjectMemory infoPrinting:vmInfo value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1047 |
ObjectMemory debugPrinting:vmErrors value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1048 |
Object infoPrinting:classInfos value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1049 |
DeviceWorkstation errorPrinting:displayErrors value. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1050 |
]. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1051 |
box destroy |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1052 |
! |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1053 |
|
219 | 1054 |
miscSettings |
327 | 1055 |
|box check logDoits shadows updChanges changeFileName returnFocus |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1056 |
loadBinaries compileLazy hostNameInLabel useManager localSourceFirst |
343 | 1057 |
y component localCheck oldIndent| |
219 | 1058 |
|
249 | 1059 |
"/ |
1060 |
"/ extract relevant system settings ... |
|
1061 |
"/ |
|
219 | 1062 |
logDoits := Smalltalk logDoits asValue. |
1063 |
shadows := PopUpView shadows asValue. |
|
1064 |
hostNameInLabel := StandardSystemView includeHostNameInLabel asValue. |
|
327 | 1065 |
returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue. |
219 | 1066 |
updChanges := Class updatingChanges asValue. |
1067 |
changeFileName := ObjectMemory nameForChanges asValue. |
|
249 | 1068 |
useManager := (Smalltalk at:#SourceCodeManager) notNil asValue. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1069 |
localSourceFirst := Class tryLocalSourceFirst asValue. |
219 | 1070 |
|
1071 |
loadBinaries := Smalltalk loadBinaries asValue. |
|
1072 |
compileLazy := Autoload compileLazy asValue. |
|
1073 |
||
249 | 1074 |
"/ |
1075 |
"/ create a box on those values ... |
|
1076 |
"/ |
|
219 | 1077 |
box := DialogBox new. |
1078 |
box label:(resources string:'Other settings'). |
|
1079 |
||
1080 |
box addCheckBox:(resources string:'log compiles in changes file') on:updChanges. |
|
1081 |
box addCheckBox:(resources string:'log doIts in changes file') on:logDoits. |
|
249 | 1082 |
|
219 | 1083 |
y := box yPosition. |
249 | 1084 |
component := box addTextLabel:(resources string:'change file name:'). |
228 | 1085 |
component width:0.5; adjust:#right; borderWidth:0. |
219 | 1086 |
box yPosition:y. |
1087 |
component := box addInputFieldOn:changeFileName tabable:true. |
|
1088 |
component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false. |
|
1089 |
||
1090 |
box addHorizontalLine. |
|
1091 |
||
1092 |
box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy. |
|
1093 |
check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries. |
|
1094 |
ObjectFileLoader isNil ifTrue:[ |
|
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1095 |
loadBinaries value:false. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1096 |
check disable |
219 | 1097 |
]. |
249 | 1098 |
|
250 | 1099 |
check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager. |
343 | 1100 |
oldIndent := box leftIndent. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1101 |
box leftIndent:30. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1102 |
localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst. |
343 | 1103 |
box leftIndent:oldIndent. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1104 |
localCheck enableChannel:useManager. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1105 |
|
249 | 1106 |
(AbstractSourceCodeManager isNil |
1107 |
or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[ |
|
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1108 |
useManager value:false. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1109 |
check disable. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1110 |
localCheck value:true. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1111 |
"/ localCheck disable |
249 | 1112 |
]. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1113 |
|
219 | 1114 |
box addHorizontalLine. |
1115 |
||
1116 |
box addCheckBox:(resources string:'shadows under popup views') on:shadows. |
|
327 | 1117 |
box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus. |
219 | 1118 |
box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel. |
1119 |
||
1120 |
box addAbortButton; addOkButton. |
|
249 | 1121 |
|
1122 |
"/ |
|
1123 |
"/ show the box ... |
|
1124 |
"/ |
|
219 | 1125 |
box showAtPointer. |
1126 |
||
249 | 1127 |
"/ |
1128 |
"/ update system settings |
|
1129 |
"/ |
|
219 | 1130 |
box accepted ifTrue:[ |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1131 |
Smalltalk logDoits:logDoits value. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1132 |
PopUpView shadows:shadows value. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1133 |
Class updateChanges:updChanges value. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1134 |
Autoload compileLazy:compileLazy value. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1135 |
Smalltalk loadBinaries:loadBinaries value. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1136 |
StandardSystemView includeHostNameInLabel:hostNameInLabel value. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1137 |
ObjectMemory nameForChanges:changeFileName value. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1138 |
Dialog returnFocusWhenClosingModalBoxes:returnFocus value. |
327 | 1139 |
|
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1140 |
useManager value ifTrue:[ |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1141 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1142 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager) |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1143 |
]. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1144 |
Class tryLocalSourceFirst:(localSourceFirst value). |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1145 |
] ifFalse:[ |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1146 |
Smalltalk at:#SourceCodeManager put:nil |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1147 |
] |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1148 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1149 |
box destroy |
219 | 1150 |
|
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1151 |
"Modified: 24.1.1996 / 20:19:14 / cg" |
219 | 1152 |
! |
1153 |
||
1154 |
viewStyleSetting |
|
1155 |
|listOfStyles resourceDir dir box |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1156 |
list listView scrView infoLabel infoForwarder newStyle| |
219 | 1157 |
|
1158 |
" |
|
1159 |
search resources directory for a list of .style files ... |
|
1160 |
" |
|
1161 |
||
1162 |
resourceDir := Smalltalk getSystemFileName:'resources'. |
|
1163 |
resourceDir isNil ifTrue:[ |
|
345 | 1164 |
self warn:'no styles found (missing ''resources'' directory)'. |
1165 |
^ self |
|
219 | 1166 |
]. |
1167 |
dir := FileDirectory directoryNamed:resourceDir. |
|
1168 |
||
1169 |
listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style']. |
|
1170 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6]. |
|
1171 |
listOfStyles sort. |
|
1172 |
||
1173 |
"/ old code: used a standard ListSelectionBox |
|
1174 |
"/ changed to intercept selection and add info-output. |
|
1175 |
||
1176 |
"/ box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs. |
|
1177 |
"/ box label:(resources string:'Style selection'). |
|
1178 |
"/ box list:listOfStyles. |
|
1179 |
"/ box initialText:View defaultStyle. |
|
1180 |
"/ box selectAction:[:newStyle | |
|
1181 |
"/ ]. |
|
1182 |
"/ box action:[:newStyle | |
|
1183 |
"/ transcript topView withCursor:Cursor wait do:[ |
|
1184 |
"/ Transcript showCr:'change style to ' , newStyle , ' ...'. |
|
1185 |
"/ View defaultStyle:newStyle asSymbol. |
|
1186 |
"/ ] |
|
1187 |
"/ ]. |
|
1188 |
"/ box showAtPointer |
|
1189 |
||
1190 |
"/ new code: build box 'by 'hand' |
|
1191 |
"/ |
|
1192 |
infoForwarder := Plug new. |
|
1193 |
infoForwarder respondTo:#showInfo |
|
345 | 1194 |
with:[ |
1195 |
|nm sheet comment| |
|
1196 |
nm := list selection. |
|
1197 |
sheet := ViewStyle fromFile:(nm , '.style'). |
|
1198 |
comment := sheet at:#comment ifAbsent:''. |
|
1199 |
infoLabel label:comment withCRs asStringCollection |
|
1200 |
]. |
|
219 | 1201 |
|
1202 |
list := SelectionInList with:listOfStyles. |
|
1203 |
list onChangeSend:#showInfo to:infoForwarder. |
|
1204 |
||
1205 |
box := Dialog new. |
|
1206 |
box label:(resources string:'Style selection'). |
|
1207 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1208 |
(box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left. |
219 | 1209 |
listView := SelectionInListView on:list. |
1210 |
listView doubleClickAction:[:sel | box accept value:true. box hide]. |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1211 |
scrView := box addComponent:(ScrollableView forView:listView) tabable:true. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1212 |
|
219 | 1213 |
box addVerticalSpace. |
1214 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1215 |
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft. |
219 | 1216 |
|
1217 |
box addAbortButton; addOkButton. |
|
1218 |
list selection:(View defaultStyle). |
|
1219 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1220 |
box stickAtBottomWithVariableHeight:scrView. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1221 |
box stickAtBottomWithFixHeight:infoLabel. |
219 | 1222 |
box showAtPointer. |
1223 |
||
1224 |
box accepted ifTrue:[ |
|
345 | 1225 |
newStyle := list selection. |
1226 |
newStyle notNil ifTrue:[ |
|
1227 |
self withWaitCursorDo:[ |
|
1228 |
Transcript showCr:'change style to ' , newStyle , ' ...'. |
|
1229 |
View defaultStyle:newStyle asSymbol. |
|
1230 |
]. |
|
1231 |
self reopenLauncher. |
|
1232 |
] |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1233 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1234 |
box destroy |
219 | 1235 |
! ! |
1236 |
||
1237 |
!NewLauncher methodsFor:'actions - tools'! |
|
1238 |
||
1239 |
fullScreenHardcopy |
|
1240 |
"after a second (to allow redraw of views under menu ...), |
|
1241 |
save the contents of the whole screen." |
|
1242 |
||
1243 |
Processor addTimedBlock:[ |
|
1244 |
self saveScreenImage:(Image fromScreen) defaultName:'screen' |
|
1245 |
] afterSeconds:1 |
|
1246 |
! |
|
99 | 1247 |
|
219 | 1248 |
removeAllBreakAndTracePoints |
1249 |
MessageTracer cleanup |
|
1250 |
! |
|
1251 |
||
1252 |
screenHardcopy |
|
1253 |
"after a second (to allow redraw of views under menu ...), |
|
1254 |
let user specify a rectangular area on the screen |
|
1255 |
and save its contents." |
|
1256 |
||
1257 |
|area| |
|
1258 |
||
1259 |
Processor addTimedBlock:[ |
|
1260 |
area := Rectangle fromUser. |
|
1261 |
(area width > 0 and:[area height > 0]) ifTrue:[ |
|
1262 |
self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy' |
|
1263 |
] |
|
1264 |
] afterSeconds:1 |
|
1265 |
! |
|
1266 |
||
1267 |
startEventMonitor |
|
1268 |
EventMonitor open |
|
1269 |
! |
|
1270 |
||
1271 |
startFullWindowTreeView |
|
1272 |
WindowTreeView open |
|
1273 |
! |
|
1274 |
||
1275 |
startMemoryMonitor |
|
1276 |
MemoryMonitor open |
|
1277 |
! |
|
1278 |
||
1279 |
startMemoryUsageView |
|
1280 |
MemoryUsageView open |
|
1281 |
! |
|
1282 |
||
1283 |
startProcessMonitor |
|
1284 |
ProcessMonitor open |
|
1285 |
! |
|
1286 |
||
1287 |
startWindowTreeView |
|
1288 |
|v| |
|
1289 |
||
1290 |
v := self pickAView. |
|
1291 |
v notNil ifTrue:[ |
|
1292 |
WindowTreeView openOn:v topView |
|
1293 |
] |
|
1294 |
! |
|
1295 |
||
1296 |
viewDestroy |
|
1297 |
"let user pick a view and destroy it. |
|
1298 |
Even allow destroying non-smalltalk views |
|
1299 |
(also for views which I forgot due to some error)" |
|
1300 |
||
1301 |
|device p v id| |
|
1302 |
||
1303 |
(Delay forSeconds:1) wait. |
|
1304 |
||
1305 |
device := Screen current. |
|
1306 |
p := device pointFromUser. |
|
1307 |
id := device viewIdFromPoint:p. |
|
1308 |
v := device viewFromId:id. |
|
1309 |
v notNil ifTrue:[ |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1310 |
v topView destroy. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1311 |
^ self |
219 | 1312 |
]. |
1313 |
id = device rootView id ifTrue:[ |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1314 |
^ self |
219 | 1315 |
]. |
298 | 1316 |
(Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs) |
219 | 1317 |
ifTrue:[ |
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
1318 |
device destroyView:nil withId:id |
219 | 1319 |
]. |
1320 |
||
1321 |
"Modified: 18.9.1995 / 23:13:32 / claus" |
|
298 | 1322 |
"Modified: 14.12.1995 / 22:02:26 / cg" |
219 | 1323 |
! |
1324 |
||
1325 |
viewHardcopy |
|
1326 |
"after a second (to allow redraw of views under menu ...), |
|
1327 |
let user specify a view and save its contents." |
|
1328 |
||
1329 |
Processor addTimedBlock:[ |
|
1330 |
|v| |
|
1331 |
||
1332 |
v := Screen current viewFromUser. |
|
1333 |
v notNil ifTrue:[ |
|
1334 |
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy' |
|
1335 |
] |
|
1336 |
] afterSeconds:1 |
|
1337 |
! |
|
1338 |
||
1339 |
viewInspect |
|
1340 |
"let user pick a view and inspect it. Only smalltalk views are allowed" |
|
1341 |
||
1342 |
|v| |
|
1343 |
||
1344 |
v := self pickAView. |
|
1345 |
v notNil ifTrue:[ |
|
226 | 1346 |
"/ v topView inspect |
1347 |
v inspect |
|
219 | 1348 |
] |
1349 |
||
1350 |
! ! |
|
1351 |
||
1352 |
!NewLauncher methodsFor:'change & update'! |
|
1353 |
||
1354 |
update:something with:aParameter from:changedObject |
|
1355 |
((something == #currentProject) |
|
1356 |
or:[changedObject == Project]) ifTrue:[ |
|
1357 |
self changed:#info. |
|
1358 |
^ self |
|
1359 |
]. |
|
1360 |
! ! |
|
1361 |
||
1362 |
!NewLauncher methodsFor:'help'! |
|
1363 |
||
1364 |
helpTextFor:aComponent |
|
1365 |
|sel s| |
|
1366 |
||
1367 |
aComponent == transcript ifTrue:[ |
|
1368 |
s := 'TRANSCRIPT_HELP' |
|
1369 |
]. |
|
1370 |
||
1371 |
aComponent == infoView ifTrue:[ |
|
1372 |
s := 'INFOVIEW_HELP' |
|
1373 |
]. |
|
1374 |
||
1375 |
(buttonPanel subViews includes:aComponent) ifTrue:[ |
|
1376 |
"kludge: look for its change selector" |
|
1377 |
sel := aComponent changeMessage. |
|
1378 |
sel == #startSystemBrowser ifTrue:[ |
|
1379 |
s := 'SBROWSER_BUTTON_HELP' |
|
1380 |
]. |
|
1381 |
sel == #startFileBrowser ifTrue:[ |
|
1382 |
s := 'FBROWSER_BUTTON_HELP' |
|
1383 |
]. |
|
1384 |
sel == #startChangesBrowser ifTrue:[ |
|
1385 |
s := 'CBROWSER_BUTTON_HELP' |
|
1386 |
]. |
|
1387 |
]. |
|
1388 |
s notNil ifTrue:[ |
|
1389 |
^ resources string:s |
|
1390 |
]. |
|
1391 |
^ nil |
|
1392 |
! ! |
|
1393 |
||
1394 |
!NewLauncher methodsFor:'infoview update'! |
|
1395 |
||
1396 |
info |
|
1397 |
|project projectName projectDir packageName| |
|
1398 |
||
1399 |
(Project isNil or:[(project := Project current) isNil]) ifTrue:[ |
|
1400 |
projectName := '* none *'. |
|
1401 |
projectDir := '.'. |
|
1402 |
packageName := '* none *'. |
|
1403 |
] ifFalse:[ |
|
1404 |
projectName := project name. |
|
1405 |
projectDir := project directory. |
|
1406 |
packageName := project packageName. |
|
1407 |
]. |
|
1408 |
||
1409 |
^ resources |
|
1410 |
string:'project: ''%1'' fileOut to: ''%3'' package: ''%2''' |
|
1411 |
withArgs:(Array |
|
1412 |
with:projectName |
|
1413 |
with:packageName |
|
1414 |
with:(projectDir contractTo:30)) |
|
319
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1415 |
! |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1416 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1417 |
showActivity:someMessage |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1418 |
Transcript showCr:someMessage; endEntry |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1419 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1420 |
"Created: 23.12.1995 / 12:38:29 / cg" |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
1421 |
"Modified: 23.12.1995 / 12:40:19 / cg" |
99 | 1422 |
! ! |
1423 |
||
93 | 1424 |
!NewLauncher methodsFor:'initialize / release'! |
86 | 1425 |
|
219 | 1426 |
addTopViewsToCurrentProject |
1427 |
"ignored here - the launcher is always global (i.e. not project private)." |
|
1428 |
||
1429 |
^ self |
|
1430 |
! |
|
1431 |
||
1432 |
buttonPanelSpec |
|
1433 |
"return a spec for the buttons in the panel; |
|
1434 |
entries consists of selector and bitmap-filename. |
|
1435 |
nil selectors are taken as separators (see setupButtonPanel)" |
|
98 | 1436 |
|
219 | 1437 |
^ #( |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1438 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1439 |
#(startFileBrowser 'FBrowser32x32.xbm') |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1440 |
"/ #(startWorkspace 'Workspace32x32.xbm') |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1441 |
#(nil nil) |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1442 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
219 | 1443 |
"/ #(nil nil) |
1444 |
"/ #(nil nil) |
|
1445 |
"/ #(startDocumentationTool 'book11.ico') |
|
1446 |
) |
|
230 | 1447 |
|
1448 |
"Created: 4.12.1995 / 20:16:18 / cg" |
|
219 | 1449 |
! |
1450 |
||
1451 |
closeRequest |
|
1452 |
(self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[ |
|
1453 |
super closeRequest |
|
1454 |
] |
|
1455 |
! |
|
1456 |
||
1457 |
focusSequence |
|
1458 |
^ (Array with:myMenu) |
|
1459 |
, |
|
1460 |
(buttonPanel subViews select:[:element | element isKindOf:Button]) |
|
1461 |
"/ , (Array with:Transcript) |
|
98 | 1462 |
! |
1463 |
||
93 | 1464 |
openInterface |
98 | 1465 |
"sent by my superclass to open up my interface" |
93 | 1466 |
|
1467 |
|top icn w| |
|
86 | 1468 |
|
1469 |
top := StandardSystemView new. |
|
205 | 1470 |
top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'. |
86 | 1471 |
top extent:(400@300 ). |
1472 |
||
92 | 1473 |
" |
1474 |
temporary kludge for SGI; |
|
1475 |
this will be moved into StandardSystemView and be done |
|
1476 |
automatically soon ... |
|
1477 |
" |
|
106 | 1478 |
Screen current serverVendor = 'Silicon Graphics' ifTrue:[ |
93 | 1479 |
icn := self class aboutIcon. |
92 | 1480 |
icn notNil ifTrue:[ |
93 | 1481 |
icn := icn magnifiedTo:86@68. |
92 | 1482 |
w := View extent:86@68. "/ icn extent. |
1483 |
w viewBackground:icn. |
|
1484 |
top iconView:w |
|
1485 |
] |
|
1486 |
]. |
|
1487 |
||
93 | 1488 |
self setupViewsIn:top. |
98 | 1489 |
|
1490 |
top application:self. |
|
1491 |
builder window:top. |
|
86 | 1492 |
|
1493 |
" |
|
92 | 1494 |
open with higher prio to allow interaction even while things |
1495 |
are running ... |
|
86 | 1496 |
" |
92 | 1497 |
top openWithPriority:(Processor userSchedulingPriority + 1). |
93 | 1498 |
! |
86 | 1499 |
|
219 | 1500 |
release |
1501 |
infoProcess notNil ifTrue:[ |
|
1502 |
infoProcess terminate. |
|
1503 |
infoProcess := nil. |
|
1504 |
]. |
|
1505 |
super release |
|
86 | 1506 |
! |
1507 |
||
219 | 1508 |
restarted |
1509 |
"image restart - since WindowGroup recreates the process with |
|
1510 |
default prio, we have to raise the prio again. |
|
1511 |
Mhmh - this looks like a bug to me ..." |
|
86 | 1512 |
|
219 | 1513 |
Processor activeProcess priority:(Processor userSchedulingPriority + 1). |
1514 |
super restarted |
|
86 | 1515 |
! |
1516 |
||
219 | 1517 |
saveAndTerminate |
90 | 1518 |
" |
219 | 1519 |
some windowManagers can send this, to shutDown an application |
1520 |
but let it save its state before, for restart. We are already |
|
1521 |
prepared for this ;-)" |
|
86 | 1522 |
|
219 | 1523 |
self snapshot. |
1524 |
super saveAndTerminate |
|
103 | 1525 |
! |
1526 |
||
86 | 1527 |
setupButtonPanelIn:aTopView |
1528 |
"create the buttonPanel" |
|
1529 |
||
107 | 1530 |
|spc mh| |
86 | 1531 |
|
1532 |
spc := View viewSpacing // 2. |
|
1533 |
buttonPanel := HorizontalPanelView in:aTopView. |
|
1534 |
buttonPanel level:-1; borderWidth:0. |
|
1535 |
buttonPanel horizontalLayout:#leftSpace. |
|
1536 |
||
90 | 1537 |
self buttonPanelSpec do:[:entry | |
1538 |
|sel b sep| |
|
86 | 1539 |
|
90 | 1540 |
sel := entry at:1. |
1541 |
sel isNil ifTrue:[ |
|
1542 |
sep := View in:buttonPanel. |
|
1543 |
sep extent:32@1; borderWidth:0. |
|
1544 |
] ifFalse:[ |
|
1545 |
b := Button in:buttonPanel. |
|
1546 |
b form:(Image fromFile:(entry at:2)). |
|
100 | 1547 |
b model:self; changeMessage:sel |
90 | 1548 |
] |
86 | 1549 |
]. |
1550 |
||
100 | 1551 |
mh := myMenu height. |
1552 |
buttonPanel origin:0.0 @ (mh + spc) |
|
105 | 1553 |
corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)). |
86 | 1554 |
|
1555 |
buttonPanel leftInset:spc; rightInset:spc. |
|
1556 |
! |
|
1557 |
||
90 | 1558 |
setupDemoMenu |
1559 |
"setup the demo pulldown menu" |
|
1560 |
||
1561 |
|m| |
|
1562 |
||
1563 |
myMenu at:#demos |
|
1564 |
putLabels:(resources array:#( |
|
91 | 1565 |
'goodies' |
90 | 1566 |
'games' |
1567 |
'geometric designs' |
|
1568 |
'simple animations' |
|
1569 |
'3D graphics' |
|
1570 |
'graphic editors' |
|
1571 |
)) |
|
1572 |
selectors:#( |
|
91 | 1573 |
goodies |
90 | 1574 |
games |
1575 |
geometricDesigns |
|
1576 |
simpleAnimations |
|
1577 |
#'3Dgraphics' |
|
1578 |
#graphicEditors |
|
1579 |
) |
|
1580 |
receiver:self. |
|
1581 |
||
1582 |
" |
|
1583 |
only to show two different ways of defining a popUpMenu, |
|
1584 |
we use labels:selectors:receiver: here: |
|
1585 |
" |
|
1586 |
m := myMenu menuAt:#demos. |
|
1587 |
m subMenuAt:#games |
|
1588 |
put:(PopUpMenu |
|
1589 |
labels:(resources array:#( |
|
1590 |
'Tetris' |
|
1591 |
'Tic Tac Toe' |
|
142 | 1592 |
'Tic Tac Toe (2 players)' |
90 | 1593 |
)) |
1594 |
selectors:#( |
|
1595 |
startTetris |
|
1596 |
startTicTacToe |
|
142 | 1597 |
startTicTacToe2 |
90 | 1598 |
) |
1599 |
receiver:self). |
|
1600 |
||
1601 |
" |
|
1602 |
and labels:selector:args:receiver: here: |
|
1603 |
" |
|
1604 |
m subMenuAt:#geometricDesigns |
|
1605 |
put:(PopUpMenu |
|
1606 |
labels:(resources array:#( |
|
1607 |
'Pen demo' |
|
1608 |
'Commander demo' |
|
116 | 1609 |
'-' |
115 | 1610 |
'Fractal plants demo' |
116 | 1611 |
'Fractal patterns demo' |
90 | 1612 |
)) |
1613 |
selector:#openDemo: |
|
1614 |
args:#( |
|
1615 |
PenDemo |
|
1616 |
CommanderDemo |
|
116 | 1617 |
nil |
115 | 1618 |
FractalPlantsDemo |
116 | 1619 |
FractalPatternsDemo |
91 | 1620 |
) |
90 | 1621 |
receiver:self). |
1622 |
||
1623 |
m subMenuAt:#simpleAnimations |
|
1624 |
put:(PopUpMenu |
|
1625 |
labels:(resources array:#( |
|
1626 |
'Animation' |
|
1627 |
'Globe demo' |
|
1628 |
)) |
|
1629 |
selector:#openDemo: |
|
1630 |
args:#( |
|
1631 |
Animation |
|
1632 |
GlobeDemo |
|
91 | 1633 |
) |
90 | 1634 |
receiver:self). |
1635 |
||
1636 |
m subMenuAt:#'3Dgraphics' |
|
1637 |
put:(PopUpMenu |
|
1638 |
labels:(resources |
|
1639 |
array:#( |
|
1640 |
'plane' |
|
1641 |
'tetra' |
|
1642 |
'cube (wireframe)' |
|
1643 |
'cube (solid)' |
|
1644 |
'sphere (wireframe)' |
|
140 | 1645 |
'doughnut (wireframe)' |
90 | 1646 |
'planet' |
1647 |
'teapot' |
|
1648 |
'logo' |
|
108 | 1649 |
'x/y graph' |
140 | 1650 |
'-' |
1651 |
'cube (light)' |
|
1652 |
'cube (light & texture)' |
|
1653 |
'sphere (light)' |
|
190 | 1654 |
'colored octahedron' |
90 | 1655 |
)) |
1656 |
selector:#openDemo: |
|
1657 |
args:#( |
|
1658 |
GLPlaneDemoView2 |
|
1659 |
GLTetraDemoView |
|
1660 |
GLWireCubeDemoView |
|
1661 |
GLCubeDemoView |
|
1662 |
GLWireSphereDemoView |
|
140 | 1663 |
GLDoughnutDemoView |
90 | 1664 |
GLPlanetDemoView |
1665 |
GLTeapotDemo |
|
1666 |
Logo3DView1 |
|
108 | 1667 |
GLXYGraph |
140 | 1668 |
nil |
1669 |
GLCubeDemoView2 |
|
1670 |
GLBrickCubeDemoView |
|
1671 |
GLSphereDemoView2 |
|
1672 |
GLOctaHedronDemoView |
|
91 | 1673 |
) |
90 | 1674 |
receiver:self). |
1675 |
||
1676 |
m subMenuAt:#graphicEditors |
|
1677 |
put:(PopUpMenu |
|
1678 |
labels:(resources array:#( |
|
1679 |
'DrawTool' |
|
1680 |
'LogicTool' |
|
1681 |
)) |
|
1682 |
selector:#openDemo: |
|
1683 |
args:#( |
|
1684 |
DrawTool |
|
1685 |
LogicTool |
|
91 | 1686 |
) |
90 | 1687 |
receiver:self). |
1688 |
||
91 | 1689 |
m subMenuAt:#goodies |
1690 |
put:(PopUpMenu |
|
1691 |
labels:(resources array:#( |
|
1692 |
'clock' |
|
1693 |
'calendar' |
|
1694 |
'-' |
|
1695 |
'mail tool' |
|
1696 |
'news tool' |
|
1697 |
)) |
|
1698 |
selector:#openDemo: |
|
1699 |
args:#( |
|
1700 |
Clock |
|
1701 |
Calendar |
|
1702 |
nil |
|
1703 |
MailView |
|
1704 |
NewsView |
|
1705 |
) |
|
1706 |
receiver:self). |
|
90 | 1707 |
! |
1708 |
||
219 | 1709 |
setupInfoViewIn:topView |
1710 |
|spc halfSpc| |
|
1711 |
||
1712 |
spc := View viewSpacing. |
|
1713 |
infoView := Label label:'' in:topView. |
|
1714 |
infoView adjust:#left; borderWidth:0. |
|
1715 |
infoView level:-1. |
|
1716 |
transcript superView bottomInset:(infoView height + spc). |
|
90 | 1717 |
|
219 | 1718 |
infoView is3D ifTrue:[ |
1719 |
halfSpc := spc // 2. |
|
1720 |
] ifFalse:[ |
|
1721 |
halfSpc := 0 |
|
1722 |
]. |
|
1723 |
infoView topInset:(infoView height negated - spc + transcript borderWidth); |
|
1724 |
bottomInset:halfSpc; |
|
1725 |
leftInset:halfSpc; |
|
1726 |
rightInset:halfSpc. |
|
1727 |
infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0. |
|
1728 |
infoView model:self; aspect:#info; labelMessage:#info. |
|
1729 |
||
1730 |
Project notNil ifTrue:[ |
|
1731 |
Project addDependent:self. |
|
1732 |
] |
|
1733 |
||
1734 |
" |
|
1735 |
NewLauncher open |
|
1736 |
" |
|
93 | 1737 |
! |
1738 |
||
219 | 1739 |
setupMenu |
1740 |
"setup the pulldown menu" |
|
1741 |
||
1742 |
|l s icon| |
|
1743 |
||
1744 |
myMenu labels:(resources array:#( |
|
1745 |
'about' |
|
1746 |
'file' |
|
1747 |
'classes' |
|
1748 |
'tools' |
|
1749 |
'projects' |
|
1750 |
'settings' |
|
1751 |
'demos' |
|
1752 |
'help')). |
|
1753 |
" |
|
1754 |
if there is a bitmap, change 'about' to the ST/X icon |
|
1755 |
" |
|
1756 |
icon := self class smallAboutIcon. |
|
1757 |
icon notNil ifTrue:[ |
|
1758 |
myMenu labels at:1 put:icon. |
|
1759 |
myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2))) |
|
93 | 1760 |
]. |
219 | 1761 |
|
1762 |
myMenu selectors:#( |
|
1763 |
#about |
|
1764 |
#file |
|
1765 |
#classes |
|
1766 |
#tools |
|
1767 |
#projects |
|
1768 |
#settings |
|
1769 |
#demos |
|
1770 |
#help). |
|
1771 |
||
1772 |
myMenu at:#about |
|
1773 |
putLabels:(resources array:#( |
|
1774 |
'about Smalltalk/X ...' |
|
1775 |
)) |
|
1776 |
selectors:#( |
|
1777 |
#about |
|
1778 |
) |
|
1779 |
receiver:self. |
|
1780 |
||
1781 |
l := #( |
|
1782 |
'file browser' |
|
1783 |
'-' |
|
1784 |
'modules' |
|
1785 |
'-' |
|
1786 |
'snapshot' |
|
1787 |
'snapshot & exit' |
|
1788 |
'exit smalltalk' |
|
1789 |
). |
|
1790 |
s := #( |
|
1791 |
#startFileBrowser |
|
1792 |
nil |
|
1793 |
#objectModuleDialog |
|
1794 |
nil |
|
1795 |
#snapshot |
|
1796 |
#snapshotAndExit |
|
1797 |
#exit |
|
1798 |
). |
|
1799 |
||
1800 |
myMenu at:#file |
|
1801 |
putLabels:(resources array:l) |
|
1802 |
selectors:s |
|
1803 |
receiver:self. |
|
1804 |
||
1805 |
myMenu at:#classes |
|
1806 |
putLabels:(resources array:#( |
|
1807 |
'system browser' |
|
1808 |
'class browser' |
|
1809 |
'full class browser' |
|
1810 |
'class hierarchy browser' |
|
1811 |
'class tree' |
|
1812 |
'-' |
|
1813 |
'implementors' |
|
1814 |
'senders' |
|
1815 |
'-' |
|
1816 |
'change browser' |
|
1817 |
)) |
|
1818 |
selectors:#( |
|
1819 |
#startSystemBrowser |
|
1820 |
#startClassBrowser |
|
1821 |
#startFullClassBrowser |
|
1822 |
#startClassHierarchyBrowser |
|
1823 |
#startClassTreeView |
|
1824 |
nil |
|
1825 |
#browseImplementors |
|
1826 |
#browseSenders |
|
1827 |
nil |
|
1828 |
#startChangesBrowser |
|
1829 |
) |
|
1830 |
receiver:self. |
|
1831 |
||
1832 |
myMenu at:#projects |
|
1833 |
putLabels:(resources array:#( |
|
1834 |
'new project' |
|
1835 |
'-' |
|
1836 |
'select project ...' |
|
1837 |
)) |
|
1838 |
selectors:#( |
|
1839 |
#newProject |
|
1840 |
nil |
|
1841 |
#selectProject |
|
1842 |
) |
|
1843 |
receiver:self. |
|
1844 |
||
1845 |
myMenu at:#settings |
|
1846 |
putLabels:(resources array:#( |
|
1847 |
'language' |
|
1848 |
'show keyboard mappings' |
|
1849 |
'view style' |
|
1850 |
'messages' |
|
1851 |
'compilation' |
|
341 | 1852 |
'memory' |
219 | 1853 |
'misc' |
1854 |
)) |
|
1855 |
selectors:#( |
|
1856 |
#languageSetting |
|
1857 |
#keyboardSetting |
|
1858 |
#viewStyleSetting |
|
1859 |
#messageSettings |
|
1860 |
#compilerSettings |
|
341 | 1861 |
#memorySettings |
219 | 1862 |
#miscSettings |
1863 |
) |
|
1864 |
receiver:self. |
|
1865 |
||
1866 |
self setupToolsMenu. |
|
1867 |
self setupDemoMenu. |
|
1868 |
||
1869 |
ActiveHelp notNil ifTrue:[ |
|
1870 |
l := #( |
|
1871 |
'\c active help' |
|
1872 |
'ST/X documentation' |
|
1873 |
). |
|
1874 |
s := #( |
|
1875 |
#toggleActiveHelp: |
|
1876 |
#startDocumentationTool |
|
1877 |
) |
|
1878 |
] ifFalse:[ |
|
1879 |
l := #( |
|
1880 |
'ST/X documentation' |
|
1881 |
). |
|
1882 |
s := #( |
|
1883 |
#startDocumentationTool |
|
1884 |
) |
|
1885 |
]. |
|
1886 |
||
1887 |
myMenu at:#help |
|
1888 |
putLabels:(resources array:l) |
|
1889 |
selectors:s |
|
1890 |
receiver:self. |
|
1891 |
||
1892 |
(ActiveHelp notNil |
|
1893 |
and:[ActiveHelp isActive]) ifTrue:[ |
|
1894 |
(myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true |
|
1895 |
]. |
|
93 | 1896 |
! |
1897 |
||
219 | 1898 |
setupOtherViewsIn:aTopView |
1899 |
"a hook - allows redefinition in your personal subclass. |
|
1900 |
For example, add a clock:" |
|
1901 |
||
1902 |
" |
|
1903 |
|sz clock space halfSpace| |
|
1904 |
||
1905 |
sz := buttonPanel innerHeight - (buttonPanel level abs*2). |
|
1906 |
space := View viewSpacing. |
|
1907 |
halfSpace := space // 2. |
|
93 | 1908 |
|
219 | 1909 |
buttonPanel rightInset:sz+(space * 2). |
93 | 1910 |
|
219 | 1911 |
clock := ClockView in:buttonPanel topView. |
1912 |
clock borderWidth:1. |
|
1913 |
clock showSeconds:false. |
|
1914 |
clock extent:(sz @ sz). |
|
1915 |
clock origin:(1.0 @ (buttonPanel origin y + halfSpace)). |
|
1916 |
clock leftInset:sz negated - 2 - halfSpace. |
|
1917 |
clock rightInset:halfSpace. |
|
1918 |
clock level:1. |
|
1919 |
" |
|
93 | 1920 |
! |
1921 |
||
1922 |
setupToolsMenu |
|
1923 |
"setup the tools pulldown menu" |
|
1924 |
||
1925 |
|m| |
|
1926 |
||
1927 |
myMenu at:#tools |
|
1928 |
putLabels:(resources array:#( |
|
1929 |
'workspace' |
|
1930 |
'-' |
|
1931 |
'monitors' |
|
1932 |
'-' |
|
1933 |
'view tree (all views)' |
|
1934 |
'view tree' |
|
1935 |
'inspect view' |
|
1936 |
'destroy view' |
|
1937 |
'-' |
|
1938 |
'hardcopy' |
|
120 | 1939 |
'-' |
1940 |
'misc' |
|
93 | 1941 |
)) |
1942 |
selectors:#( |
|
1943 |
#startWorkspace |
|
1944 |
nil |
|
1945 |
#monitors |
|
1946 |
nil |
|
1947 |
#startFullWindowTreeView |
|
1948 |
#startWindowTreeView |
|
1949 |
#viewInspect |
|
1950 |
#viewDestroy |
|
1951 |
nil |
|
1952 |
#hardcopy |
|
120 | 1953 |
nil |
1954 |
#misc |
|
93 | 1955 |
) |
1956 |
receiver:self. |
|
1957 |
||
1958 |
||
1959 |
m := myMenu menuAt:#tools. |
|
1960 |
m subMenuAt:#monitors |
|
1961 |
put:(PopUpMenu |
|
1962 |
labels:(resources array:#( |
|
1963 |
'process' |
|
1964 |
'memory' |
|
1965 |
'event' |
|
1966 |
'-' |
|
1967 |
'memory usage' |
|
1968 |
)) |
|
1969 |
selectors:#( |
|
1970 |
#startProcessMonitor |
|
1971 |
#startMemoryMonitor |
|
1972 |
#startEventMonitor |
|
1973 |
nil |
|
1974 |
#startMemoryUsageView |
|
1975 |
) |
|
1976 |
receiver:self). |
|
1977 |
||
120 | 1978 |
m subMenuAt:#misc |
1979 |
put:(PopUpMenu |
|
1980 |
labels:(resources array:#( |
|
1981 |
'remove all break/trace points' |
|
1982 |
)) |
|
1983 |
selectors:#( |
|
1984 |
#removeAllBreakAndTracePoints |
|
1985 |
) |
|
1986 |
receiver:self). |
|
1987 |
||
93 | 1988 |
m subMenuAt:#hardcopy |
1989 |
put:(PopUpMenu |
|
1990 |
labels:(resources array:#( |
|
1991 |
'screen' |
|
1992 |
'area' |
|
1993 |
'view' |
|
1994 |
)) |
|
1995 |
selectors:#( |
|
1996 |
#fullScreenHardcopy |
|
1997 |
#screenHardcopy |
|
1998 |
#viewHardcopy |
|
1999 |
) |
|
2000 |
receiver:self). |
|
2001 |
||
90 | 2002 |
! |
2003 |
||
219 | 2004 |
setupTranscriptIn:aView |
2005 |
|v| |
|
107 | 2006 |
|
219 | 2007 |
(Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[ |
2008 |
Transcript topView destroy. |
|
110 | 2009 |
]. |
2010 |
||
219 | 2011 |
v := HVScrollableView |
2012 |
for:TextCollector |
|
2013 |
miniScrollerH:true |
|
2014 |
miniScrollerV:false |
|
2015 |
in:aView. |
|
93 | 2016 |
|
219 | 2017 |
v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) |
2018 |
corner:(1.0 @ 1.0). |
|
2019 |
transcript := v scrolledView. |
|
2020 |
transcript beTranscript. |
|
94 | 2021 |
! |
2022 |
||
219 | 2023 |
setupViewsIn:topView |
2024 |
"create the pulldown menu, buttonPanel and transcript view" |
|
86 | 2025 |
|
219 | 2026 |
|tFont| |
131 | 2027 |
|
219 | 2028 |
topView model:self. |
86 | 2029 |
|
219 | 2030 |
myMenu := PullDownMenu in:topView. |
2031 |
myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height). |
|
86 | 2032 |
|
219 | 2033 |
self setupMenu. |
2034 |
self setupButtonPanelIn:topView. |
|
2035 |
self setupTranscriptIn:topView. |
|
2036 |
self setupInfoViewIn:topView. |
|
2037 |
self setupOtherViewsIn:topView. |
|
118 | 2038 |
|
219 | 2039 |
tFont := transcript font. |
2040 |
topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x) |
|
2041 |
@ |
|
2042 |
((tFont height) * 20). |
|
118 | 2043 |
|
219 | 2044 |
" |
2045 |
NewLauncher open |
|
2046 |
" |
|
86 | 2047 |
! ! |
2048 |
||
2049 |
!NewLauncher methodsFor:'private'! |
|
2050 |
||
219 | 2051 |
pickAView |
2052 |
|v| |
|
2053 |
||
2054 |
(Delay forSeconds:1) wait. |
|
2055 |
v := Screen current viewFromUser. |
|
2056 |
v isNil ifTrue:[ |
|
2057 |
self warn:'sorry, this is not a smalltalk view'. |
|
2058 |
^ nil |
|
2059 |
]. |
|
2060 |
^ v |
|
2061 |
! |
|
2062 |
||
106 | 2063 |
reopenLauncher |
2064 |
"for now (since style & language settings currently do |
|
2065 |
not affect living views ...)" |
|
2066 |
||
2067 |
|contents| |
|
2068 |
||
2069 |
contents := Transcript endEntry; contents. |
|
2070 |
self class open. |
|
2071 |
Transcript contents:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor |
|
2072 |
! |
|
2073 |
||
100 | 2074 |
saveAllViews |
86 | 2075 |
"tell each topview that we are going to terminate and give it chance |
2076 |
to save its contents." |
|
2077 |
||
2078 |
ObjectMemory changed:#aboutToExit |
|
2079 |
! |
|
2080 |
||
93 | 2081 |
saveScreenImage:anImage defaultName:defaultName |
2082 |
"save an image into a file |
|
2083 |
- ask user for filename using a fileSelectionBox." |
|
2084 |
||
2085 |
|fileName| |
|
2086 |
||
2087 |
fileName := Dialog |
|
2088 |
requestFileName:'save image in:' |
|
2089 |
default:(defaultName , '.tiff') |
|
2090 |
ok:'save' |
|
2091 |
abort:'abort' |
|
2092 |
pattern:'*.tiff'. |
|
2093 |
||
2094 |
fileName notNil ifTrue:[ |
|
2095 |
anImage saveOn:fileName |
|
2096 |
]. |
|
86 | 2097 |
! ! |
2098 |
||
219 | 2099 |
!NewLauncher methodsFor:'queries'! |
90 | 2100 |
|
219 | 2101 |
processName |
2102 |
"for monitors only - my name" |
|
142 | 2103 |
|
219 | 2104 |
^ 'ST/X Launcher' |
90 | 2105 |
! ! |
2106 |
||
219 | 2107 |
!NewLauncher class methodsFor:'documentation'! |
86 | 2108 |
|
219 | 2109 |
version |
345 | 2110 |
^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.76 1996-02-01 20:02:43 cg Exp $' |
86 | 2111 |
! ! |