author | Claus Gittinger <cg@exept.de> |
Wed, 28 Aug 1996 16:17:51 +0200 | |
changeset 699 | a0299969a8fd |
parent 698 | 64cf733533d1 |
child 700 | 23bc1eb02ac9 |
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 |
|
658 | 14 |
instanceVariableNames:'myMenu buttonPanel transcript infoView infoProcess helpIsOn |
15 |
isMainLauncher' |
|
16 |
classVariableNames:'CachedAboutIcon OpenLaunchers' |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
17 |
poolDictionaries:'' |
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
18 |
category:'Interface-Smalltalk' |
86 | 19 |
! |
20 |
||
635 | 21 |
!NewLauncher class methodsFor:'documentation'! |
88 | 22 |
|
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
105 | 37 |
customization |
38 |
" |
|
39 |
Of course, it is possible to change the NewLauncher class itself |
|
40 |
as appropriate, however, we suggest you create a subclass (say MyLauncher), |
|
524 | 41 |
define it as autoloaded in the patches file, and redefine some methods |
42 |
in that class. |
|
43 |
That way, your changes are easier to reintroduce in case of an ST/X upgrade. |
|
105 | 44 |
|
45 |
||
46 |
adding more buttons to the button-panel: |
|
47 |
||
48 |
see the method #buttonPanelSpec; |
|
524 | 49 |
it defines a list of selectors and icons, which is used by |
50 |
#setupButtonPanelIn:. |
|
51 |
There, for each entry, a button with that icon is created, |
|
52 |
which sends a selector-message to the launcher. |
|
53 |
||
54 |
Add entries to that list, and define appropriate methods. |
|
55 |
For example, to add a button which opens a drawTool, |
|
56 |
change #buttonPanelSpec to: |
|
57 |
||
58 |
buttonPanelSpec |
|
59 |
^ #( |
|
60 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
|
61 |
#(startFileBrowser 'FBrowser32x32.xbm') |
|
62 |
#(nil nil) |
|
63 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
|
64 |
#(nil nil) |
|
65 |
#(nil nil) |
|
66 |
#(startDrawTool 'DrawTool.xbm') |
|
67 |
) |
|
68 |
||
69 |
the panel adjusts its height as appropriate - you may want to |
|
70 |
create new (small) icons for a good look. |
|
105 | 71 |
|
72 |
adding an entry to a menu: |
|
73 |
||
524 | 74 |
see the #setupMenu method; either add another top-menu, or |
75 |
add entries to an existing menu. |
|
88 | 76 |
" |
219 | 77 |
! |
78 |
||
79 |
documentation |
|
80 |
" |
|
81 |
a new launcher, combining old Launchers menu and transcript into |
|
82 |
one view. (you no longer have to move two views around all the time ...). |
|
83 |
||
84 |
Also, this app makes first use of the new compatibility framework; |
|
85 |
you will notice, that this is a subclass of ApplicationModel. |
|
86 |
New applications will no longer be built as subclasses of standardSystemView. |
|
511 | 87 |
|
88 |
[author:] |
|
89 |
Claus Gittinger |
|
219 | 90 |
" |
88 | 91 |
! ! |
92 |
||
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
93 |
!NewLauncher class methodsFor:'accessing'! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
94 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
95 |
current |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
96 |
"return the launcher running on the current screen. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
97 |
(for access via addMenu/ removeMenu)" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
98 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
99 |
|screen| |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
100 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
101 |
OpenLaunchers do:[:aLauncher | |
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
102 |
aLauncher window graphicsDevice == Screen current ifTrue:[ |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
103 |
^ aLauncher |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
104 |
] |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
105 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
106 |
^ nil. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
107 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
108 |
" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
109 |
NewLauncher current |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
110 |
" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
111 |
|
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
112 |
"Modified: 5.7.1996 / 17:55:28 / cg" |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
113 |
! ! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
114 |
|
635 | 115 |
!NewLauncher class methodsFor:'defaults'! |
86 | 116 |
|
117 |
aboutIcon |
|
118 |
|image| |
|
119 |
||
120 |
CachedAboutIcon notNil ifTrue:[^ CachedAboutIcon]. |
|
121 |
||
122 |
image := Image fromFile:'SmalltalkX.xbm'. |
|
92 | 123 |
image notNil ifTrue:[ |
580 | 124 |
|green dark| |
125 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
126 |
Screen current hasColors ifTrue:[ |
580 | 127 |
green := (Color red:0 green:80 blue:20) "darkened". |
128 |
dark := Color gray:10. |
|
129 |
image photometric:#palette. |
|
130 |
] ifFalse:[ |
|
131 |
dark := Color black. |
|
132 |
green := Color white. |
|
133 |
image photometric:#blackIs0. |
|
134 |
]. |
|
135 |
image colorMap:(Array with:dark with:green). |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
136 |
"/ Screen current depth > 2 ifTrue:[ |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
137 |
"/ image := (Image implementorForDepth:Screen current depth) fromImage:image. |
144 | 138 |
"/ ] |
86 | 139 |
]. |
140 |
CachedAboutIcon := image. |
|
141 |
^ image |
|
142 |
||
143 |
" |
|
92 | 144 |
CachedAboutIcon := nil. |
145 |
NewLauncher aboutIcon |
|
146 |
" |
|
144 | 147 |
|
580 | 148 |
"Modified: 28.5.1996 / 20:55:15 / cg" |
219 | 149 |
! |
150 |
||
368 | 151 |
buttonImageSize |
490 | 152 |
"images in buttonPanel are sized to this. |
153 |
Can be redefined in subclasses to return nil (no scaling) |
|
154 |
or any other useful size" |
|
155 |
||
156 |
^ 32@32 |
|
157 |
||
158 |
"Modified: 19.4.1996 / 16:36:17 / cg" |
|
368 | 159 |
! |
160 |
||
219 | 161 |
smallAboutIcon |
162 |
|image| |
|
163 |
||
164 |
image := self aboutIcon. |
|
165 |
image notNil ifTrue:[ |
|
166 |
image := image magnifiedBy:0.4. |
|
167 |
]. |
|
168 |
^ image |
|
169 |
||
170 |
" |
|
171 |
CachedAboutIcon := nil. |
|
172 |
NewLauncher aboutIcon. |
|
173 |
NewLauncher smallAboutIcon. |
|
174 |
" |
|
175 |
! ! |
|
176 |
||
177 |
!NewLauncher methodsFor:'actions - about & help'! |
|
178 |
||
179 |
about |
|
180 |
|box| |
|
181 |
||
182 |
box := AboutBox new. |
|
183 |
box autoHideAfter:10 with:[]. |
|
184 |
box showAtCenter |
|
185 |
! |
|
186 |
||
187 |
showDocumentation:aRelativeDocFilePath |
|
188 |
" |
|
189 |
although that one is not yet finished, |
|
190 |
its better than nothing ... |
|
191 |
" |
|
555 | 192 |
HTMLDocumentView notNil ifTrue:[ |
193 |
" |
|
194 |
temporary kludge; |
|
195 |
not all machines can autoload binaries; |
|
196 |
however, on my SGI (which can) we want it |
|
197 |
to load automatically. |
|
198 |
" |
|
199 |
HTMLDocumentView isLoaded ifFalse:[ |
|
200 |
ErrorSignal catch:[HTMLDocumentView autoload] |
|
201 |
]. |
|
202 |
HTMLDocumentView isLoaded ifTrue:[ |
|
203 |
HTMLDocumentView openFullOnDocumentationFile:aRelativeDocFilePath. |
|
204 |
^ self |
|
205 |
]. |
|
219 | 206 |
]. |
207 |
||
208 |
self warn:'Sorry, the ST/X HTML reader is not (yet) |
|
209 |
included in this architectures release. |
|
210 |
||
211 |
Please use Mosaic, netscape, chimera or any |
|
212 |
other HTML viewer to see the documentation. |
|
213 |
||
214 |
The documentation is found in the ''doc/online'' directory.'. |
|
215 |
||
216 |
"Modified: 31.8.1995 / 13:11:08 / claus" |
|
555 | 217 |
"Modified: 21.5.1996 / 14:15:57 / cg" |
219 | 218 |
! |
219 |
||
496 | 220 |
startClassDocumentation |
221 |
self showDocumentation:'classDoc/TOP.html' |
|
222 |
||
223 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
224 |
"Created: 22.4.1996 / 21:03:56 / cg" |
|
225 |
! |
|
226 |
||
483 | 227 |
startDocumentationIndex |
228 |
self showDocumentation:'index.html' |
|
229 |
||
230 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
231 |
"Created: 17.4.1996 / 22:08:55 / cg" |
|
232 |
! |
|
233 |
||
219 | 234 |
startDocumentationTool |
235 |
self showDocumentation:'TOP.html' |
|
236 |
||
237 |
"Modified: 31.8.1995 / 13:11:28 / claus" |
|
238 |
! |
|
239 |
||
240 |
toggleActiveHelp:aBoolean |
|
241 |
ActiveHelp notNil ifTrue:[ |
|
242 |
helpIsOn := aBoolean. |
|
243 |
helpIsOn ifTrue:[ |
|
244 |
ActiveHelp start |
|
245 |
] ifFalse:[ |
|
246 |
ActiveHelp stop |
|
247 |
] |
|
248 |
]. |
|
249 |
! ! |
|
250 |
||
251 |
!NewLauncher methodsFor:'actions - classes'! |
|
252 |
||
253 |
browseImplementors |
|
254 |
|enterBox| |
|
255 |
||
256 |
enterBox := EnterBox title:(resources at:'Browse implementors of:') withCRs. |
|
257 |
enterBox okText:(resources at:'browse'). |
|
258 |
enterBox action:[:selectorName | |
|
259 |
|cls| |
|
260 |
||
261 |
self withWaitCursorDo:[SystemBrowser browseImplementorsOf:selectorName] |
|
262 |
]. |
|
263 |
enterBox showAtPointer |
|
264 |
! |
|
265 |
||
574 | 266 |
browseResources |
589 | 267 |
|enterBox t| |
574 | 268 |
|
269 |
enterBox := EnterBox title:(resources at:'Resource symbol (nil for any):') withCRs. |
|
270 |
enterBox okText:(resources at:'browse'). |
|
271 |
enterBox action:[:resourceName | |
|
272 |
|rsc| |
|
273 |
||
274 |
(resourceName isNil or:[resourceName isEmpty]) ifTrue:[ |
|
589 | 275 |
t := 'methods with any resource'. |
574 | 276 |
rsc := nil |
277 |
] ifFalse:[ |
|
589 | 278 |
t := 'methods with ' , resourceName , '-resource'. |
574 | 279 |
rsc := resourceName asSymbolIfInterned. |
280 |
]. |
|
281 |
self withWaitCursorDo:[ |
|
282 |
SystemBrowser browseForResource:rsc |
|
283 |
in:(Smalltalk allClasses) |
|
589 | 284 |
title:t |
574 | 285 |
] |
286 |
]. |
|
287 |
enterBox showAtPointer |
|
288 |
||
289 |
"Created: 28.5.1996 / 13:15:16 / cg" |
|
589 | 290 |
"Modified: 29.5.1996 / 17:30:38 / cg" |
574 | 291 |
! |
292 |
||
219 | 293 |
browseSenders |
294 |
|enterBox| |
|
295 |
||
296 |
enterBox := EnterBox title:(resources at:'Browse senders of:') withCRs. |
|
297 |
enterBox okText:(resources at:'browse'). |
|
298 |
enterBox action:[:selectorName | |
|
299 |
|cls| |
|
300 |
||
301 |
self withWaitCursorDo:[SystemBrowser browseAllCallsOn:selectorName] |
|
302 |
]. |
|
303 |
enterBox showAtPointer |
|
304 |
! |
|
305 |
||
306 |
startChangesBrowser |
|
307 |
self withWaitCursorDo:[ChangesBrowser open] |
|
308 |
! |
|
309 |
||
310 |
startClassBrowser |
|
311 |
SystemBrowser askThenBrowseClass |
|
312 |
! |
|
313 |
||
314 |
startClassHierarchyBrowser |
|
315 |
SystemBrowser askThenBrowseClassHierarchy |
|
316 |
! |
|
317 |
||
318 |
startClassTreeView |
|
319 |
self withWaitCursorDo:[ClassTreeGraphView open] |
|
320 |
! |
|
321 |
||
322 |
startFileBrowser |
|
323 |
self withWaitCursorDo:[FileBrowser open] |
|
324 |
! |
|
325 |
||
326 |
startFullClassBrowser |
|
327 |
SystemBrowser askThenBrowseFullClassProtocol |
|
328 |
! |
|
329 |
||
490 | 330 |
startJavaBrowser |
331 |
JavaBrowser notNil ifTrue:[ |
|
332 |
self withWaitCursorDo:[JavaBrowser open] |
|
333 |
] |
|
334 |
||
335 |
"Created: 18.4.1996 / 15:55:44 / cg" |
|
336 |
"Modified: 19.4.1996 / 16:39:08 / cg" |
|
337 |
! |
|
338 |
||
219 | 339 |
startSystemBrowser |
340 |
self withWaitCursorDo:[SystemBrowser open] |
|
341 |
! |
|
342 |
||
343 |
startWorkspace |
|
344 |
Workspace open |
|
345 |
! ! |
|
346 |
||
347 |
!NewLauncher methodsFor:'actions - demos'! |
|
348 |
||
349 |
openDemo:className |
|
536
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
350 |
|cls| |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
351 |
|
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
352 |
cls := Smalltalk at:className. |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
353 |
cls isNil ifTrue:[ |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
354 |
self warn:'sorry, the ' , className , ' class is not available.'. |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
355 |
] ifFalse:[ |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
356 |
Autoload autoloadFailedSignal handle:[:ex | |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
357 |
self warn:'sorry, the ' , className , ' class seems to be not available.' |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
358 |
] do:[ |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
359 |
(Smalltalk at:className) open |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
360 |
] |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
361 |
] |
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
362 |
|
a56ee0a5abdd
show a warnBox if a demo-open fails
Claus Gittinger <cg@exept.de>
parents:
524
diff
changeset
|
363 |
"Modified: 10.5.1996 / 15:56:47 / cg" |
219 | 364 |
! |
365 |
||
366 |
startTetris |
|
367 |
Tetris open |
|
368 |
! |
|
369 |
||
370 |
startTicTacToe |
|
371 |
TicTacToeGame open |
|
372 |
! |
|
373 |
||
374 |
startTicTacToe2 |
|
375 |
TicTacToeGame open2UserGame |
|
376 |
! ! |
|
377 |
||
378 |
!NewLauncher methodsFor:'actions - file'! |
|
379 |
||
380 |
exit |
|
381 |
(self confirm:(resources string:'Are you certain you want to exit without saving ?')) |
|
382 |
ifTrue:[ |
|
383 |
self saveAllViews. |
|
384 |
Smalltalk exit |
|
385 |
] |
|
386 |
! |
|
387 |
||
388 |
objectModuleDialog |
|
389 |
|allModules moduleNames |
|
390 |
allObjects methodObjects methodNames |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
391 |
cObjects cObjectNames cFunctionNames |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
392 |
otherObjects otherObjectNames |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
393 |
box l handles unloadButton |
219 | 394 |
list1 list2 listView1 listView2 |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
395 |
y panel |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
396 |
showBuiltIn showModules showMethods showCObjects showOthers |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
397 |
moduleListUpdater check canDoIt menu| |
219 | 398 |
|
399 |
showBuiltIn := true asValue. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
400 |
canDoIt := ObjectFileLoader notNil and:[ObjectFileLoader canLoadObjectFiles]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
401 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
402 |
showModules := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
403 |
showMethods := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
404 |
showCObjects := canDoIt asValue. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
405 |
showOthers := canDoIt asValue. |
219 | 406 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
407 |
moduleListUpdater := [ |
458 | 408 |
|l| |
219 | 409 |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
410 |
list2 list:nil. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
411 |
|
458 | 412 |
l := Array new. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
413 |
handles := Array new. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
414 |
|
458 | 415 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
416 |
allModules := ObjectMemory binaryModuleInfo asOrderedCollection. |
|
417 |
(showBuiltIn value and:[showModules value]) ifFalse:[ |
|
418 |
allModules := allModules select:[:i | |
|
419 |
|wantToSee| |
|
219 | 420 |
|
458 | 421 |
wantToSee := (i at:#dynamic). |
422 |
showBuiltIn value ifTrue:[ |
|
423 |
wantToSee := wantToSee not |
|
424 |
]. |
|
425 |
wantToSee |
|
426 |
] |
|
427 |
]. |
|
428 |
"/ sorting by reverse id brings newest ones to the top (a side effect) |
|
429 |
allModules sort:[:a :b | (a at:#id) > (b at:#id)]. |
|
430 |
moduleNames := allModules collect:[:entry | (entry at:#name)]. |
|
431 |
l := l , moduleNames. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
432 |
handles := handles , allModules. |
458 | 433 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
434 |
|
458 | 435 |
showMethods value ifTrue:[ |
436 |
allObjects := ObjectFileLoader loadedObjectHandles. |
|
437 |
methodObjects := (allObjects select:[:h | h isMethodHandle]) asArray. |
|
438 |
methodNames := methodObjects collect:[:mH | mH method isNil ifTrue:[ |
|
439 |
'compiled method - removed' , ' (in ' , mH pathName , ')' |
|
440 |
] ifFalse:[ |
|
441 |
'compiled method ' , mH method whoString , ' (in ' , mH pathName , ')' |
|
442 |
]. |
|
443 |
]. |
|
444 |
l := l , methodNames. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
445 |
handles := handles , methodObjects. |
458 | 446 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
447 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
448 |
showCObjects value ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
449 |
allObjects := ObjectFileLoader loadedObjectHandles. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
450 |
cObjects := (allObjects select:[:h | h isFunctionObjectHandle]) asArray. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
451 |
cObjectNames := cObjects collect:[:entry | entry pathName]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
452 |
l := l , cObjectNames. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
453 |
handles := handles , cObjects. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
454 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
455 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
456 |
showOthers value ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
457 |
allObjects := ObjectFileLoader loadedObjectHandles. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
458 |
otherObjects := (allObjects select:[:h | (h isFunctionObjectHandle |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
459 |
or:[h isMethodHandle |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
460 |
or:[h isClassLibHandle]]) not]) asArray. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
461 |
otherObjectNames := otherObjects collect:[:entry | entry pathName]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
462 |
l := l , otherObjectNames. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
463 |
handles := handles , otherObjects. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
464 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
465 |
|
458 | 466 |
list1 list:l. |
467 |
unloadButton disable. |
|
468 |
]. |
|
219 | 469 |
|
470 |
list1 := SelectionInList new. |
|
471 |
list2 := SelectionInList new. |
|
472 |
||
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
473 |
showBuiltIn onChangeSend:#value to:moduleListUpdater. |
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
474 |
showModules onChangeSend:#value to:moduleListUpdater. |
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
475 |
showMethods onChangeSend:#value to:moduleListUpdater. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
476 |
showCObjects onChangeSend:#value to:moduleListUpdater. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
477 |
showOthers onChangeSend:#value to:moduleListUpdater. |
219 | 478 |
|
479 |
box := Dialog new. |
|
480 |
box label:(resources string:'Module dialog'). |
|
481 |
||
482 |
listView1 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
483 |
listView1 model:list1. |
|
484 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
485 |
listView1 action:[:sel | |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
486 |
|info classNames tabs module| |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
487 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
488 |
listView1 middleButtonMenu:nil. |
219 | 489 |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
490 |
box withWaitCursorDo:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
491 |
|nm fileName addr entry1 entry2 entry3 method| |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
492 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
493 |
tabs := TabulatorSpecification unit:#inch positions:#(0 2.6). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
494 |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
495 |
(showModules value or:[showBuiltIn value]) ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
496 |
info := allModules at:sel ifAbsent:nil. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
497 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
498 |
info isNil ifTrue:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
499 |
"/ selected a method, cObject or unknown |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
500 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
501 |
module := handles at:sel. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
502 |
fileName := module pathName. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
503 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
504 |
module isMethodHandle ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
505 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
506 |
(method := module method) isNil ifTrue:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
507 |
nm := '** removed **'. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
508 |
] ifFalse:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
509 |
menu := PopUpMenu |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
510 |
labels:#('inspect' 'browse') |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
511 |
selectors:#(inspect browse). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
512 |
menu actionAt:#inspect put:[ method inspect ]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
513 |
menu actionAt:#browse put:[ SystemBrowser openInClass:(method who at:1) selector:(method who at:2) ]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
514 |
listView1 middleButtonMenu:menu. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
515 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
516 |
nm := (method whoString) asText emphasizeAllWith:(#color->Color blue). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
517 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
518 |
entry1 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
519 |
entry1 colAt:1 put:'compiled method'; colAt:2 put:nm. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
520 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
521 |
entry2 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
522 |
entry2 colAt:1 put:'path'; colAt:2 put:fileName. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
523 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
524 |
entry3 := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
525 |
entry3 colAt:1 put:'address'; colAt:2 put:('(16r) ' , (method code hexPrintString leftPaddedTo:8 with:$0)). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
526 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
527 |
list2 list:(Array with:entry1 with:entry2 with:entry3). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
528 |
] ifFalse:[ |
673 | 529 |
(module isFunctionObjectHandle |
530 |
and:[module functions notEmpty]) ifTrue:[ |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
531 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
532 |
menu := PopUpMenu |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
533 |
labels:#('inspect') |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
534 |
selectors:#(inspect). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
535 |
menu actionAt:#inspect put:[ module functions inspect ]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
536 |
listView1 middleButtonMenu:menu. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
537 |
|
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
538 |
list2 list:((module functions select:[:f | f notNil]) |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
539 |
collect:[:f | |entry| |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
540 |
entry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
541 |
entry colAt:1 put:(f name asText emphasizeAllWith:(#color->Color blue)). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
542 |
entry colAt:2 put:('address: (16r) ' , (f code hexPrintString leftPaddedTo:8 with:$0)). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
543 |
entry |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
544 |
]). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
545 |
] ifFalse:[ |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
546 |
list2 list:#('nothing known about contents (no functions have been extracted)'). |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
547 |
] |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
548 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
549 |
|
458 | 550 |
unloadButton enable. |
551 |
] ifFalse:[ |
|
467
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
552 |
"/ selected a package |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
553 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
554 |
"/ fill bottom list with class-info |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
555 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
556 |
classNames := (info at:#classNames) asSortedCollection. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
557 |
classNames := classNames collect:[:cName | |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
558 |
|cls entry rev listEntry| |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
559 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
560 |
listEntry := MultiColListEntry new:2 tabulatorSpecification:tabs. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
561 |
listEntry colAt:1 put:cName. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
562 |
|
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
563 |
cls := Smalltalk classNamed:cName. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
564 |
cls isNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
565 |
listEntry colAt:2 put:'(class removed)'. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
566 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
567 |
rev := cls binaryRevision. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
568 |
rev notNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
569 |
cls isLoaded ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
570 |
entry := '(stub for: ' , rev. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
571 |
] ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
572 |
entry :='(bin: ' , rev. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
573 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
574 |
cls revision ~= rev ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
575 |
entry := entry , ' / src: ' , cls revision |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
576 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
577 |
listEntry colAt:2 put:entry , ')' |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
578 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
579 |
cls revision notNil ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
580 |
listEntry colAt:2 put:'(overloaded by: ' , cls revision , ')' |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
581 |
] |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
582 |
] |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
583 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
584 |
listEntry |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
585 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
586 |
list2 list:classNames. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
587 |
(info at:#dynamic) ifTrue:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
588 |
unloadButton enable. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
589 |
] ifFalse:[ |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
590 |
unloadButton disable. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
591 |
]. |
b07279f33723
show wait cursor while searching for classes in module
Claus Gittinger <cg@exept.de>
parents:
464
diff
changeset
|
592 |
] |
458 | 593 |
] |
219 | 594 |
]. |
595 |
||
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
596 |
|
219 | 597 |
panel := HorizontalPanelView new. |
598 |
||
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
599 |
panel add:(l := Label label:'show:'). |
219 | 600 |
l adjust:#left; borderWidth:0. |
347 | 601 |
panel add:(check := CheckBox label:'builtin' model:showBuiltIn). |
602 |
box makeTabable:check. |
|
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
603 |
panel add:(check := CheckBox label:'classLibs' model:showModules). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
604 |
canDoIt ifFalse:[ |
458 | 605 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
606 |
] ifTrue:[ |
458 | 607 |
box makeTabable:check. |
347 | 608 |
]. |
219 | 609 |
panel add:(check := CheckBox label:'methods' model:showMethods). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
610 |
canDoIt ifFalse:[ |
458 | 611 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
612 |
] ifTrue:[ |
458 | 613 |
box makeTabable:check. |
347 | 614 |
]. |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
615 |
panel add:(check := CheckBox label:'c-objects' model:showCObjects). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
616 |
canDoIt ifFalse:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
617 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
618 |
] ifTrue:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
619 |
box makeTabable:check. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
620 |
]. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
621 |
panel add:(check := CheckBox label:'others' model:showOthers). |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
622 |
canDoIt ifFalse:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
623 |
check disable |
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
624 |
] ifTrue:[ |
671
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
625 |
box makeTabable:check. |
036972e738ba
much more information in the moduleDialog;
Claus Gittinger <cg@exept.de>
parents:
670
diff
changeset
|
626 |
]. |
219 | 627 |
|
628 |
panel horizontalLayout:#fitSpace. |
|
458 | 629 |
"/ panel horizontalLayout:#leftSpace. |
219 | 630 |
|
347 | 631 |
box addComponent:panel tabable:false. |
219 | 632 |
|
347 | 633 |
box addVerticalSpace. |
219 | 634 |
box addComponent:listView1 tabable:true. |
635 |
listView1 topInset:(View viewSpacing + panel preferredExtent y). |
|
636 |
listView1 origin:0.0@0.0 corner:1.0@0.4. "/ ; inset:2. |
|
637 |
||
638 |
l := box addTextLabel:(resources string:'contained classes/subsets:'). |
|
639 |
l adjust:#left; borderWidth:0. |
|
640 |
l origin:0.0@0.4 corner:1.0@0.4. |
|
641 |
l topInset:(View viewSpacing). |
|
642 |
l bottomInset:((l preferredExtent y) negated - View viewSpacing). |
|
643 |
||
644 |
listView2 := HVScrollableView for:SelectionInListView miniScrollerH:true. |
|
645 |
listView2 model:list2; printItems:false. |
|
646 |
box addComponent:listView2 tabable:true. |
|
647 |
listView2 origin:0.0@0.4 corner:1.0@1.0. "/ ; inset:2. |
|
648 |
listView2 disable. |
|
649 |
||
650 |
unloadButton := Button label:(resources string:'unload'). |
|
651 |
unloadButton action:[ |
|
458 | 652 |
self withWaitCursorDo:[ |
653 |
box withWaitCursorDo:[ |
|
654 |
|info idx pathName| |
|
219 | 655 |
|
458 | 656 |
idx := list1 selectionIndex. |
657 |
info := allModules at:idx ifAbsent:nil. |
|
219 | 658 |
|
672 | 659 |
list1 selectionIndex:nil. |
660 |
||
458 | 661 |
info isNil ifTrue:[ |
662 |
"/ selected a method |
|
663 |
idx := idx - allModules size. |
|
672 | 664 |
pathName := (handles at:idx) pathName. |
219 | 665 |
|
458 | 666 |
] ifFalse:[ |
667 |
"/ selected a package |
|
668 |
pathName := (info at:#pathName). |
|
669 |
]. |
|
670 |
ObjectFileLoader unloadObjectFile:pathName. |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
671 |
moduleListUpdater value. |
458 | 672 |
unloadButton disable. |
673 |
] |
|
674 |
] |
|
219 | 675 |
]. |
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
676 |
moduleListUpdater value. |
219 | 677 |
|
678 |
box addButton:unloadButton. |
|
679 |
box addAbortButtonLabelled:(resources string:'close'). |
|
680 |
||
681 |
y := box yPosition. |
|
682 |
listView2 topInset:(l preferredExtent y + 5). |
|
683 |
listView2 bottomInset:(box preferredExtent y - y). |
|
684 |
||
458 | 685 |
"/ box width:(400 min:(box device width * 2 // 3)); |
686 |
"/ height:(450 min:(box device height - 50)); |
|
687 |
"/ sizeFixed:true. |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
688 |
box open. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
689 |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
690 |
box destroy. |
219 | 691 |
|
692 |
"Modified: 17.9.1995 / 16:47:50 / claus" |
|
690
c3fb26a81b59
disable objectModule buttons, if ObjFileLoader is not functioning
Claus Gittinger <cg@exept.de>
parents:
688
diff
changeset
|
693 |
"Modified: 2.8.1996 / 21:04:46 / cg" |
219 | 694 |
! |
695 |
||
696 |
snapshot |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
697 |
|fileName| |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
698 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
699 |
fileName := DialogBox |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
700 |
request:(resources at:'filename for image:') withCRs |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
701 |
initialAnswer:(ObjectMemory nameForSnapshot) |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
702 |
okLabel:(resources at:'save') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
703 |
title:(resources string:'save image') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
704 |
onCancel:nil. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
705 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
706 |
fileName notNil ifTrue:[ |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
707 |
self showCursor:Cursor write. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
708 |
[ |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
709 |
(ObjectMemory snapShotOn:fileName) ifFalse:[ |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
710 |
" |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
711 |
snapshot failed for some reason (disk full, no permission etc.) |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
712 |
" |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
713 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
714 |
] |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
715 |
] valueNowOrOnUnwindDo:[ |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
716 |
self restoreCursors. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
717 |
]. |
219 | 718 |
]. |
719 |
||
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
720 |
"Modified: 1.6.1996 / 17:02:45 / cg" |
219 | 721 |
! |
722 |
||
723 |
snapshotAndExit |
|
590 | 724 |
|fileName ok| |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
725 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
726 |
fileName := DialogBox |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
727 |
request:(resources at:'filename for image:') withCRs |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
728 |
initialAnswer:(ObjectMemory nameForSnapshot) |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
729 |
okLabel:(resources at:'save & exit') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
730 |
title:(resources string:'save image & exit') |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
731 |
onCancel:nil. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
732 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
733 |
fileName notNil ifTrue:[ |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
734 |
self showCursor:Cursor write. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
735 |
[ |
590 | 736 |
ok := ObjectMemory snapShotOn:fileName. |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
737 |
] valueNowOrOnUnwindDo:[ |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
738 |
self restoreCursors. |
590 | 739 |
]. |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
740 |
|
590 | 741 |
ok ifFalse:[ |
742 |
" |
|
743 |
snapshot failed for some reason (disk full, no permission etc.) |
|
744 |
Do NOT exit in this case. |
|
745 |
" |
|
746 |
self warn:(resources string:'failed to save snapshot image (disk full or not writable)'). |
|
747 |
] ifTrue:[ |
|
748 |
" |
|
749 |
saveAllViews tells all views to shutdown neatly |
|
750 |
(i.e. offer a chance to save the contents to a file). |
|
751 |
||
752 |
This is NOT required - all data should be in the snapshot ... |
|
753 |
... however, if remote disks/mountable filesystems are involved, |
|
754 |
which may not be present the next time, it may make sense to |
|
755 |
uncomment it and query for saving - time will show which is better. |
|
756 |
" |
|
757 |
" |
|
758 |
self saveAllViews. |
|
759 |
" |
|
760 |
Smalltalk exit |
|
404 | 761 |
] |
219 | 762 |
]. |
763 |
||
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
764 |
"Modified: 1.6.1996 / 17:02:07 / cg" |
219 | 765 |
! ! |
766 |
||
767 |
!NewLauncher methodsFor:'actions - goodies'! |
|
768 |
||
769 |
startCalendar |
|
770 |
Calendar open |
|
771 |
! |
|
772 |
||
773 |
startClock |
|
774 |
RoundClock open |
|
775 |
! |
|
776 |
||
777 |
startMailTool |
|
778 |
MailView open |
|
779 |
! |
|
780 |
||
781 |
startNewsTool |
|
782 |
NewsView open |
|
783 |
! ! |
|
784 |
||
785 |
!NewLauncher methodsFor:'actions - projects'! |
|
786 |
||
787 |
newProject |
|
788 |
Project notNil ifTrue:[ |
|
789 |
(ProjectView for:(Project new)) open |
|
790 |
] |
|
791 |
! |
|
792 |
||
793 |
selectProject |
|
794 |
|list box| |
|
795 |
||
796 |
Project notNil ifTrue:[ |
|
549 | 797 |
list := Project allInstances. |
798 |
box := ListSelectionBox new. |
|
799 |
box list:(list collect:[:p | p name]). |
|
800 |
box title:(resources string:'select a project'). |
|
801 |
box action:[:selection | |
|
802 |
|project| |
|
803 |
||
804 |
project := list detect:[:p | p name = selection] ifNone:[nil]. |
|
805 |
project isNil ifTrue:[ |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
806 |
transcript showCR:'no such project.' |
549 | 807 |
] ifFalse:[ |
808 |
project showViews. |
|
809 |
Project current:project |
|
810 |
] |
|
811 |
]. |
|
812 |
box showAtPointer. |
|
813 |
box destroy |
|
219 | 814 |
] |
549 | 815 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
816 |
"Modified: 5.7.1996 / 13:12:53 / cg" |
86 | 817 |
! ! |
818 |
||
219 | 819 |
!NewLauncher methodsFor:'actions - settings'! |
820 |
||
821 |
compilerSettings |
|
822 |
|box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
823 |
warnSTXBox warnUnderscoreBox warnOldStyleBox warnCommonMistakes warnCommonMistakesBox |
219 | 824 |
stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
825 |
stcLibraries stcLibraryPath historyLines sourceMode catchRedefs keepSourceOptions keepSource |
695 | 826 |
foldConstants constantFoldingOptions constantFolding justInTimeCompilation |
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
827 |
warnEnabler check component oldIndent t supportsJustInTimeCompilation| |
219 | 828 |
|
829 |
warnings := Compiler warnings asValue. |
|
830 |
||
831 |
warnSTX := Compiler warnSTXSpecials asValue. |
|
832 |
warnUnderscore := Compiler warnUnderscoreInIdentifier asValue. |
|
833 |
warnOldStyle := Compiler warnOldStyleAssignment asValue. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
834 |
warnCommonMistakes := Compiler warnCommonMistakes asValue. |
219 | 835 |
allowUnderscore := Compiler allowUnderscoreInIdentifier asValue. |
836 |
immutableArrays := Compiler arraysAreImmutable asValue. |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
837 |
|
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
838 |
constantFoldingOptions := #( nil #level1 #level2 #full ). |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
839 |
constantFolding := SelectionInList new list:(resources array:#('disabled' 'level1 (always safe)' 'level2 (usually safe)' 'full')). |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
840 |
constantFolding selectionIndex:3. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
841 |
|
219 | 842 |
stcCompilationOptions := #( always default never). |
695 | 843 |
stcCompilation := SelectionInList new |
844 |
list:(resources array:#('always' |
|
845 |
'primitive code only' |
|
846 |
'never' |
|
847 |
)). |
|
219 | 848 |
stcCompilation selectionIndex:2. |
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
849 |
(supportsJustInTimeCompilation := ObjectMemory supportsJustInTimeCompilation) |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
850 |
ifTrue:[ |
695 | 851 |
justInTimeCompilation := ObjectMemory justInTimeCompilation:true. |
852 |
ObjectMemory justInTimeCompilation:justInTimeCompilation. |
|
853 |
] ifFalse:[ |
|
854 |
justInTimeCompilation := false |
|
855 |
]. |
|
856 |
justInTimeCompilation := justInTimeCompilation asValue. |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
857 |
|
219 | 858 |
stcIncludes := Compiler stcCompilationIncludes asValue. |
859 |
stcDefines := Compiler stcCompilationDefines asValue. |
|
860 |
stcOptions := Compiler stcCompilationOptions asValue. |
|
232 | 861 |
ObjectFileLoader notNil ifTrue:[ |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
862 |
(t := ObjectFileLoader searchedLibraries) notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
863 |
stcLibraries := (String fromStringCollection:t separatedBy:' ') asValue. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
864 |
]. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
865 |
(t := ObjectFileLoader libPath) notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
866 |
stcLibraryPath := t asValue. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
867 |
] |
232 | 868 |
]. |
219 | 869 |
|
870 |
catchRedefs := Class catchMethodRedefinitions asValue. |
|
871 |
historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue. |
|
872 |
||
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
873 |
keepSourceOptions := #( keep reference absReference sourceReference discard ). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
874 |
keepSource := SelectionInList new list:(resources array:#('keep as string' 'reference to filename' 'reference to full path' 'append and ref in `st.src''' 'discard' )). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
875 |
keepSource selectionIndex:1. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
876 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
877 |
warnEnabler := [ |
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
878 |
warnings value ifTrue:[ |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
879 |
warnSTXBox enable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
880 |
warnOldStyleBox enable. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
881 |
warnCommonMistakesBox enable. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
882 |
allowUnderscore value ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
883 |
warnUnderscoreBox enable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
884 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
885 |
warnUnderscoreBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
886 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
887 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
888 |
warnSTXBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
889 |
warnUnderscoreBox disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
890 |
warnOldStyleBox disable. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
891 |
warnCommonMistakesBox disable. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
892 |
]]. |
219 | 893 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
894 |
warnings onChangeSend:#value to:warnEnabler. |
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
895 |
allowUnderscore onChangeSend:#value to:warnEnabler. |
219 | 896 |
|
897 |
box := DialogBox new. |
|
898 |
box label:(resources string:'Compiler settings'). |
|
899 |
||
900 |
box addCheckBox:(resources string:'catch method redefinitions') on:catchRedefs. |
|
901 |
check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines. |
|
902 |
HistoryManager isNil ifTrue:[check disable]. |
|
903 |
||
378 | 904 |
box addPopUpList:(resources string:'fileIn source mode:') on:keepSource. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
905 |
keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
906 |
|
219 | 907 |
box addHorizontalLine. |
908 |
||
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
909 |
supportsJustInTimeCompilation ifTrue:[ |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
910 |
component := box |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
911 |
addCheckBox:(resources string:'just in time compilation to machine code') |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
912 |
on:justInTimeCompilation. |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
913 |
supportsJustInTimeCompilation ifFalse:[ |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
914 |
component disable |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
915 |
]. |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
916 |
box addHorizontalLine. |
695 | 917 |
]. |
918 |
||
232 | 919 |
ObjectFileLoader notNil ifTrue:[ |
695 | 920 |
compilationList := box addPopUpList:(resources string:'stc compilation to machine code') on:stcCompilation. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
921 |
stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2). |
219 | 922 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
923 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
924 |
addLabelledInputField:(resources string:'stc include directories:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
925 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
926 |
on:stcIncludes |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
927 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
928 |
separateAtX:0.5. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
929 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 930 |
component preferredExtent:(250 @ component preferredExtent y). |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
931 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
932 |
box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
933 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
934 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
935 |
addLabelledInputField:(resources string:'stc defines:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
936 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
937 |
on:stcDefines |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
938 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
939 |
separateAtX:0.5. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
940 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 941 |
component preferredExtent:(250 @ component preferredExtent y). |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
942 |
|
219 | 943 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
944 |
box addVerticalSpace. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
945 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
946 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
947 |
addLabelledInputField:(resources string:'stc options:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
948 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
949 |
on:stcOptions |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
950 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
951 |
separateAtX:0.5. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
952 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 953 |
component preferredExtent:(250 @ component preferredExtent y). |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
954 |
|
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
955 |
stcLibraries notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
956 |
box addVerticalSpace. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
957 |
|
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
958 |
component := box |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
959 |
addLabelledInputField:(resources string:'stc C-libraries:') |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
960 |
adjust:#right |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
961 |
on:stcLibraries |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
962 |
tabable:true |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
963 |
separateAtX:0.5. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
964 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 965 |
component preferredExtent:(250 @ component preferredExtent y). |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
966 |
]. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
967 |
|
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
968 |
stcLibraryPath notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
969 |
box addVerticalSpace. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
970 |
|
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
971 |
component := box |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
972 |
addLabelledInputField:(resources string:'stc libPath:') |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
973 |
adjust:#right |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
974 |
on:stcLibraryPath |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
975 |
tabable:true |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
976 |
separateAtX:0.5. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
977 |
component immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
695 | 978 |
component preferredExtent:(250 @ component preferredExtent y). |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
979 |
]. |
219 | 980 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
981 |
box addVerticalSpace. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
982 |
box addHorizontalLine. |
219 | 983 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
984 |
"/ if there is no compiler around, |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
985 |
"/ change to compile nothing, and disable the checkBoxes |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
986 |
Compiler canCreateMachineCode ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
987 |
stcCompilation selectionIndex:3. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
988 |
compilationList disable. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
989 |
]. |
219 | 990 |
]. |
991 |
||
378 | 992 |
box addPopUpList:(resources string:'constant folding:') on:constantFolding. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
993 |
constantFolding selectionIndex:( constantFoldingOptions indexOf:(Compiler foldConstants) ifAbsent:1). |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
994 |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
995 |
box addVerticalSpace. |
219 | 996 |
box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore. |
997 |
box addVerticalSpace. |
|
998 |
box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays. |
|
695 | 999 |
|
219 | 1000 |
box addHorizontalLine. |
1001 |
||
1002 |
box addCheckBox:(resources string:'warnings') on:warnings. |
|
1003 |
box addVerticalSpace. |
|
343 | 1004 |
oldIndent := box leftIndent. |
219 | 1005 |
box leftIndent:30. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1006 |
|
219 | 1007 |
warnSTXBox := box addCheckBox:(resources string:'ST/X language extensions') on:warnSTX. |
1008 |
box addVerticalSpace. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1009 |
|
219 | 1010 |
warnUnderscoreBox := box addCheckBox:(resources string:'underscores in identifiers') on:warnUnderscore. |
1011 |
box addVerticalSpace. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1012 |
|
219 | 1013 |
warnOldStyleBox := box addCheckBox:(resources string:'oldStyle assignment') on:warnOldStyle. |
1014 |
box addVerticalSpace. |
|
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1015 |
|
679 | 1016 |
warnCommonMistakesBox := box addCheckBox:(resources string:'common mistakes') on:warnCommonMistakes. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1017 |
box addVerticalSpace. |
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1018 |
|
343 | 1019 |
box leftIndent:oldIndent. |
219 | 1020 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1021 |
box |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1022 |
addHelpButtonFor:'NewLauncher/compilerSettings.html'; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1023 |
addAbortButton; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1024 |
addOkButton. |
219 | 1025 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1026 |
warnEnabler value. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1027 |
box open. |
219 | 1028 |
|
1029 |
box accepted ifTrue:[ |
|
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1030 |
HistoryManager notNil ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1031 |
historyLines value ifTrue:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1032 |
HistoryManager activate |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1033 |
] ifFalse:[ |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1034 |
HistoryManager deactivate |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1035 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1036 |
]. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1037 |
Class catchMethodRedefinitions:catchRedefs value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1038 |
ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1039 |
Compiler warnings:warnings value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1040 |
Compiler warnSTXSpecials:warnSTX value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1041 |
Compiler warnOldStyleAssignment:warnOldStyle value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1042 |
Compiler warnUnderscoreInIdentifier:warnUnderscore value. |
678
3088fddbfb98
added box for common mistakes warnings
Claus Gittinger <cg@exept.de>
parents:
676
diff
changeset
|
1043 |
Compiler warnCommonMistakes:warnCommonMistakes value. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1044 |
Compiler allowUnderscoreInIdentifier:allowUnderscore value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1045 |
Compiler arraysAreImmutable:immutableArrays value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1046 |
Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex). |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1047 |
Compiler stcCompilationIncludes:stcIncludes value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1048 |
Compiler stcCompilationDefines:stcDefines value. |
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1049 |
Compiler stcCompilationOptions:stcOptions value. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1050 |
Compiler foldConstants:(constantFoldingOptions at:constantFolding selectionIndex). |
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1051 |
supportsJustInTimeCompilation ifTrue:[ |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1052 |
ObjectMemory justInTimeCompilation:justInTimeCompilation value. |
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1053 |
]. |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1054 |
ObjectFileLoader notNil ifTrue:[ |
688
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1055 |
stcLibraries notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1056 |
ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords). |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1057 |
]. |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1058 |
stcLibraryPath notNil ifTrue:[ |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1059 |
ObjectFileLoader libPath:(stcLibraryPath value). |
b695a9f1a456
dont show loaded-libraries, if the system does not support it.
Claus Gittinger <cg@exept.de>
parents:
686
diff
changeset
|
1060 |
] |
359
26ce81391dbb
sourceMode & foldConstant settings
Claus Gittinger <cg@exept.de>
parents:
347
diff
changeset
|
1061 |
] |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1062 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1063 |
box destroy |
219 | 1064 |
|
1065 |
"Modified: 10.9.1995 / 19:19:18 / claus" |
|
698
64cf733533d1
dont show justInTime stuff, if machines does not support it.
Claus Gittinger <cg@exept.de>
parents:
697
diff
changeset
|
1066 |
"Modified: 27.8.1996 / 14:14:25 / cg" |
219 | 1067 |
! |
1068 |
||
594 | 1069 |
displaySettings |
1070 |
|box |
|
614 | 1071 |
sizes sizeNames sizeList sizeX sizeY deepIcons |
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1072 |
isColorMonitor useFixPalette dither idx ditherStyles ditherSyms ditherList |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1073 |
check y component oldIndent commandList screen visual| |
594 | 1074 |
|
1075 |
sizeNames := #( |
|
1076 |
'9'' (212mm x 160mm) GAS plasma/LCD' |
|
1077 |
'11.3'' (235mm x 175mm) LCD' |
|
1078 |
'16'' (275mm x 208mm)' |
|
636 | 1079 |
'17'' (315mm x 245mm) SUN ELC' |
594 | 1080 |
'17'' (325mm x 245mm)' |
635 | 1081 |
'19'' (340mm x 270mm) (NCD)' |
594 | 1082 |
'20'' (350mm x 280mm) (SGI)' |
1083 |
'21'' (365mm x 285mm) (Eizo / Nanao)' |
|
1084 |
). |
|
1085 |
sizes := #( (212 160) |
|
1086 |
(235 175) |
|
1087 |
(275 208) |
|
636 | 1088 |
(315 245) |
594 | 1089 |
(325 245) |
635 | 1090 |
(340 270) |
594 | 1091 |
(350 280) |
1092 |
(365 285) |
|
1093 |
). |
|
1094 |
||
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1095 |
screen := Screen current. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1096 |
visual := screen visualType. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1097 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1098 |
isColorMonitor := screen hasColors asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1099 |
deepIcons := screen supportsDeepIcons asValue. |
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1100 |
useFixPalette := screen fixColors notNil asValue. |
594 | 1101 |
|
1102 |
sizeList := SelectionInList with:sizeNames. |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1103 |
sizeX := screen widthInMillimeter asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1104 |
sizeY := screen heightInMillimeter asValue. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1105 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1106 |
ditherList := SelectionInList with:sizeNames. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1107 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1108 |
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1109 |
ditherStyles := #('threshold' 'ordered dither' 'error diffusion'). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1110 |
ditherSyms := #(threshold ordered floydSteinberg). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1111 |
] ifFalse:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1112 |
visual ~~ #TrueColor ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1113 |
ditherStyles := #('nearest color' 'error diffusion'). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1114 |
ditherSyms := #(ordered floydSteinberg). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1115 |
] |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1116 |
]. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1117 |
ditherSyms notNil ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1118 |
ditherList list:ditherStyles. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1119 |
ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1120 |
]. |
594 | 1121 |
|
1122 |
box := DialogBox new. |
|
1123 |
box label:(resources string:'Display screen settings'). |
|
1124 |
||
1125 |
(box addTextLabel:(resources string:'Actual visible screen area:')) |
|
1126 |
adjust:#left. |
|
1127 |
||
1128 |
(box addPopUpList:(resources string:'common sizes:') on:sizeList) |
|
1129 |
label:'monitor size'. |
|
1130 |
||
1131 |
idx := sizes findFirst:[:entry | |
|
1132 |
((entry at:1) = sizeX value) |
|
1133 |
and:[((entry at:2) = sizeY value)] |
|
1134 |
]. |
|
1135 |
idx ~~ 0 ifTrue:[ |
|
1136 |
sizeList selectionIndex:idx |
|
1137 |
]. |
|
1138 |
||
1139 |
sizeList onChangeSend:#value to:[ |
|
1140 |
|idx| |
|
1141 |
||
1142 |
idx := sizeList selectionIndex. |
|
1143 |
sizeX value:((sizes at:idx) at:1). |
|
1144 |
sizeY value:((sizes at:idx) at:2). |
|
1145 |
]. |
|
1146 |
||
1147 |
y := box yPosition. |
|
1148 |
component := box addTextLabel:(resources string:'screen size:'). |
|
1149 |
component width:0.3; adjust:#right; borderWidth:0. |
|
1150 |
||
1151 |
box yPosition:y. |
|
1152 |
component := box addInputFieldOn:sizeX tabable:true. |
|
1153 |
component width:0.25; left:0.3; |
|
595 | 1154 |
immediateAccept:false; acceptOnLeave:false; |
594 | 1155 |
cursorMovementWhenUpdating:#beginOfLine; |
1156 |
converter:(PrintConverter new initForInteger). |
|
1157 |
||
1158 |
box yPosition:y. |
|
1159 |
component := box addTextLabel:(' x '). |
|
1160 |
component width:0.1; left:0.55; adjust:#center; borderWidth:0. |
|
1161 |
||
1162 |
box yPosition:y. |
|
1163 |
component := box addInputFieldOn:sizeY tabable:true. |
|
1164 |
component width:0.25; left:0.65; |
|
595 | 1165 |
immediateAccept:false; acceptOnLeave:false; |
594 | 1166 |
cursorMovementWhenUpdating:#beginOfLine; |
1167 |
converter:(PrintConverter new initForInteger). |
|
1168 |
||
1169 |
box yPosition:y. |
|
1170 |
component := box addTextLabel:('(mm)'). |
|
1171 |
component width:0.1; left:0.9; adjust:#center; borderWidth:0. |
|
1172 |
||
1173 |
box addVerticalSpace. |
|
1174 |
box addHorizontalLine. |
|
1175 |
box addVerticalSpace. |
|
1176 |
||
1177 |
box addCheckBox:(resources string:'color monitor') on:isColorMonitor. |
|
1178 |
||
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1179 |
visual == #PseudoColor ifTrue:[ |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1180 |
box addVerticalSpace. |
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1181 |
component := box addCheckBox:(resources string:'use fix color palette (6x6x4)') on:useFixPalette. |
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1182 |
]. |
594 | 1183 |
|
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1184 |
ditherSyms notNil ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1185 |
box addVerticalSpace. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1186 |
component := box addPopUpList:(resources string:'image display:') on:ditherList. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1187 |
component label:'image display'. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1188 |
component superView horizontalLayout:#leftSpace. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1189 |
]. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1190 |
|
614 | 1191 |
box addVerticalSpace. |
1192 |
box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons. |
|
1193 |
||
594 | 1194 |
box |
1195 |
addHelpButtonFor:'NewLauncher/screenSettings.html'; |
|
1196 |
addAbortButton; addOkButton. |
|
1197 |
box open. |
|
1198 |
||
1199 |
box accepted ifTrue:[ |
|
632 | 1200 |
Image flushDeviceImages. |
1201 |
||
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1202 |
screen visualType == #PseudoColor ifTrue:[ |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1203 |
useFixPalette value ifTrue:[ |
638
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1204 |
Color colorAllocationFailSignal handle:[:ex | |
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1205 |
self warn:(resources string:'Could not allocate colors.'). |
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1206 |
] do:[ |
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1207 |
Color getColorsRed:6 green:6 blue:4 on:screen |
638
5541c2f7836f
warnbox if fixColor allocation fails
Claus Gittinger <cg@exept.de>
parents:
636
diff
changeset
|
1208 |
] |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1209 |
] ifFalse:[ |
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1210 |
screen releaseFixColors |
622
9d02b3440252
ommit fixColors-checkBox on TrueColor systems
Claus Gittinger <cg@exept.de>
parents:
618
diff
changeset
|
1211 |
] |
594 | 1212 |
]. |
630
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1213 |
screen hasColors:isColorMonitor value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1214 |
screen widthInMillimeter:sizeX value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1215 |
screen heightInMillimeter:sizeY value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1216 |
|
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1217 |
screen supportsDeepIcons:deepIcons value. |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1218 |
ditherSyms notNil ifTrue:[ |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1219 |
Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex). |
b5a673d2ba35
added #nearestPaint/#errorDiffusion choice
Claus Gittinger <cg@exept.de>
parents:
624
diff
changeset
|
1220 |
]. |
614 | 1221 |
|
594 | 1222 |
self withWaitCursorDo:[ |
1223 |
View defaultStyle:(View defaultStyle). |
|
1224 |
]. |
|
1225 |
]. |
|
1226 |
box destroy |
|
1227 |
||
670
7c958acbc5e8
fixColor and ditherColor stuff moved from Color
Claus Gittinger <cg@exept.de>
parents:
668
diff
changeset
|
1228 |
"Modified: 11.7.1996 / 18:26:26 / cg" |
594 | 1229 |
! |
1230 |
||
398 | 1231 |
fontSettings |
406 | 1232 |
(self fontBoxForEncoding:nil) ifTrue:[ |
1233 |
self reopenLauncher. |
|
1234 |
] |
|
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1235 |
|
398 | 1236 |
"Created: 26.2.1996 / 22:52:51 / cg" |
406 | 1237 |
"Modified: 27.2.1996 / 02:05:05 / cg" |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1238 |
! |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
1239 |
|
219 | 1240 |
keyboardSetting |
1241 |
|mappings listOfRawKeys listOfFunctions |
|
1242 |
box l |
|
1243 |
list1 list2 listView1 listView2 |
|
1244 |
frame selectionForwarder macroForwarder macroTextView y| |
|
1245 |
||
1246 |
mappings := Screen current keyboardMap. |
|
1247 |
||
1248 |
listOfRawKeys := (mappings keys asArray collect:[:key | key asString]) sort. |
|
1249 |
listOfFunctions := (mappings values asSet asArray collect:[:key | key asString]) sort. |
|
1250 |
||
1251 |
selectionForwarder := Plug new. |
|
1252 |
selectionForwarder respondTo:#showFunction |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1253 |
with:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1254 |
|raw| |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1255 |
raw := list1 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1256 |
list2 retractInterestsFor:selectionForwarder. |
568 | 1257 |
list2 selection:(mappings at:raw asSymbol) asString. |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1258 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1259 |
]. |
219 | 1260 |
selectionForwarder respondTo:#showRawKey |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1261 |
with:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1262 |
|f raw| |
219 | 1263 |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1264 |
f := list2 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1265 |
list1 retractInterestsFor:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1266 |
raw := mappings keyAtValue:f asString. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1267 |
raw isNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1268 |
raw := mappings keyAtValue:f first. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1269 |
raw isNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1270 |
raw := mappings keyAtValue:f asSymbol. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1271 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1272 |
]. |
568 | 1273 |
list1 selection:raw. |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1274 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1275 |
]. |
219 | 1276 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1277 |
macroForwarder := [ |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1278 |
|f macro indent| |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1279 |
f := list2 selection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1280 |
(f startsWith:'Cmd') ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1281 |
f := f copyFrom:4 |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1282 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1283 |
macro := FunctionKeySequences at:(f asSymbol) ifAbsent:nil. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1284 |
macro notNil ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1285 |
macro := macro asStringCollection. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1286 |
indent := macro |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1287 |
inject:99999 into:[:min :element | |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1288 |
|stripped| |
219 | 1289 |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1290 |
stripped := element withoutLeadingSeparators. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1291 |
stripped size == 0 ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1292 |
min |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1293 |
] ifFalse:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1294 |
min min:(element size - stripped size) |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1295 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1296 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1297 |
indent ~~ 0 ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1298 |
macro := macro collect:[:line | |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1299 |
line size > indent ifTrue:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1300 |
line copyFrom:indent+1 |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1301 |
] ifFalse:[ |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1302 |
line |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1303 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1304 |
] |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1305 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1306 |
]. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1307 |
macroTextView contents:macro. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1308 |
]. |
219 | 1309 |
|
1310 |
list1 := SelectionInList with:listOfRawKeys. |
|
1311 |
list1 onChangeSend:#showFunction to:selectionForwarder. |
|
1312 |
list2 := SelectionInList with:listOfFunctions. |
|
1313 |
list2 onChangeSend:#showRawKey to:selectionForwarder. |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1314 |
list2 onChangeSend:#value to:macroForwarder. |
219 | 1315 |
|
1316 |
box := Dialog new. |
|
1317 |
box label:(resources string:'Keyboard mappings'). |
|
1318 |
||
1319 |
l := box addTextLabel:(resources string:'KEY_MSG') withCRs. |
|
1320 |
l adjust:#left; borderWidth:0. |
|
1321 |
||
1322 |
frame := View new. |
|
1323 |
frame extent:300 @ 300. |
|
1324 |
frame borderWidth:0. |
|
1325 |
||
1326 |
listView1 := ScrollableView for:SelectionInListView in:frame. |
|
1327 |
listView1 model:list1. |
|
1328 |
listView1 origin:0.0@0.0 corner:0.5@1.0; inset:2. |
|
1329 |
||
1330 |
listView2 := ScrollableView for:SelectionInListView in:frame. |
|
1331 |
listView2 model:list2. |
|
1332 |
listView2 origin:0.5@0.0 corner:1.0@1.0; inset:2. |
|
1333 |
||
1334 |
frame topInset:box yPosition. |
|
1335 |
box addComponent:frame withExtent:350@200. |
|
1336 |
box makeTabable:listView1. |
|
1337 |
box makeTabable:listView2. |
|
1338 |
frame origin:0.0@0.0 corner:1.0@0.6. |
|
1339 |
||
1340 |
box addVerticalSpace. |
|
1341 |
||
1342 |
l := box addTextLabel:(resources string:'Macro text (if any):') withCRs. |
|
1343 |
l adjust:#left; borderWidth:0. |
|
1344 |
l origin:0.0@0.6 corner:1.0@0.6. |
|
1345 |
l topInset:(View viewSpacing). |
|
1346 |
l bottomInset:(l preferredExtent y negated - View viewSpacing). |
|
1347 |
||
1348 |
macroTextView := HVScrollableView for:TextView miniScroller:true. |
|
1349 |
box addComponent:macroTextView tabable:true. |
|
1350 |
macroTextView origin:0.0@0.6 corner:1.0@1.0. |
|
1351 |
y := box yPosition. |
|
1352 |
||
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1353 |
box |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1354 |
addHelpButtonFor:'NewLauncher/keyboardSetting.html'; |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1355 |
"addAbortButton;" |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1356 |
addOkButton. |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1357 |
|
219 | 1358 |
macroTextView topInset:(l preferredExtent y + 5). |
1359 |
macroTextView bottomInset:(box preferredExtent y - y). |
|
1360 |
||
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1361 |
box open. |
219 | 1362 |
|
1363 |
box accepted ifTrue:[ |
|
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1364 |
"no action yet ..." |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1365 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1366 |
box destroy |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1367 |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1368 |
"Modified: 31.5.1996 / 22:55:51 / cg" |
219 | 1369 |
! |
1370 |
||
1371 |
languageSetting |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1372 |
|listOfLanguages translatedLanguages idx language box| |
219 | 1373 |
|
1374 |
" |
|
410 | 1375 |
get list of supported languages from the launchers resources ... |
219 | 1376 |
" |
410 | 1377 |
listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default'). |
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1378 |
translatedLanguages := resources array:listOfLanguages. |
219 | 1379 |
|
1380 |
box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs. |
|
1381 |
box label:(resources string:'Language selection'). |
|
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1382 |
box list:translatedLanguages. |
219 | 1383 |
box initialText:(Language). |
1384 |
box action:[:newLanguage | |
|
410 | 1385 |
self withWaitCursorDo:[ |
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
1386 |
transcript showCR:'change language to ' , newLanguage , ' ...'. |
410 | 1387 |
idx := translatedLanguages indexOf:newLanguage withoutSeparators. |
1388 |
idx ~~ 0 ifTrue:[ |
|
1389 |
language := listOfLanguages at:idx |
|
1390 |
] ifFalse:[ |
|
1391 |
language := newLanguage |
|
1392 |
]. |
|
514
e48fbcbc358d
do not directly access the Language variable
Claus Gittinger <cg@exept.de>
parents:
511
diff
changeset
|
1393 |
Smalltalk language:language asSymbol. |
410 | 1394 |
ResourcePack flushCachedResourcePacks |
1395 |
]. |
|
1396 |
self reopenLauncher. |
|
219 | 1397 |
]. |
421
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1398 |
box |
0af6aa7db321
added help buttons to language & keyboard dialogs
Claus Gittinger <cg@exept.de>
parents:
420
diff
changeset
|
1399 |
addHelpButtonFor:'NewLauncher/languageSetting.html'. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1400 |
box open. |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1401 |
box destroy |
281
7b73ea8b2faa
more for international language support
Claus Gittinger <cg@exept.de>
parents:
262
diff
changeset
|
1402 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
1403 |
"Modified: 5.7.1996 / 13:12:39 / cg" |
219 | 1404 |
! |
1405 |
||
341 | 1406 |
memorySettings |
1407 |
|box check igcLimit igcFreeLimit igcFreeAmount newSpaceSize |
|
440 | 1408 |
compressLimit |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1409 |
oldIncr component fields| |
341 | 1410 |
|
1411 |
"/ |
|
1412 |
"/ extract relevant system settings ... |
|
1413 |
"/ |
|
1414 |
igcLimit := ObjectMemory incrementalGCLimit asValue. |
|
1415 |
igcFreeLimit := ObjectMemory freeSpaceGCLimit asValue. |
|
1416 |
igcFreeAmount := ObjectMemory freeSpaceGCAmount asValue. |
|
1417 |
newSpaceSize := ObjectMemory newSpaceSize asValue. |
|
1418 |
oldIncr := ObjectMemory oldSpaceIncrement asValue. |
|
440 | 1419 |
compressLimit := ObjectMemory oldSpaceCompressLimit asValue. |
341 | 1420 |
|
1421 |
"/ |
|
1422 |
"/ create a box on those values ... |
|
1423 |
"/ |
|
1424 |
fields := OrderedCollection new. |
|
1425 |
||
1426 |
box := DialogBox new. |
|
1427 |
box label:(resources string:'Memory manager settings'). |
|
1428 |
||
345 | 1429 |
box addTextLabel:'Warning - invalid settings may result in poor performance. |
341 | 1430 |
|
1431 |
You have been warned.'. |
|
1432 |
box addHorizontalLine. |
|
1433 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1434 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1435 |
addLabelledInputField:(resources string:'size of newSpace:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1436 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1437 |
on:newSpaceSize |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1438 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1439 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1440 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1441 |
component converter:(PrintConverter new initForNumber). |
341 | 1442 |
fields add:component. |
1443 |
||
1444 |
box addHorizontalLine. |
|
1445 |
||
1446 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1447 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1448 |
addLabelledInputField:(resources string:'incremental GC allocation trigger:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1449 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1450 |
on:igcLimit |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1451 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1452 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1453 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1454 |
component converter:(PrintConverter new initForNumber). |
341 | 1455 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1456 |
|
345 | 1457 |
box addTextLabel:'(start IGC whenever this amount has been allocated)'. |
341 | 1458 |
box addHorizontalLine. |
1459 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1460 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1461 |
addLabelledInputField:(resources string:'incremental GC freespace trigger:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1462 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1463 |
on:igcFreeLimit |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1464 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1465 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1466 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1467 |
component converter:(PrintConverter new initForNumber). |
341 | 1468 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1469 |
|
341 | 1470 |
box addTextLabel:'(start IGC whenever freespace drops below this)'. |
1471 |
box addHorizontalLine. |
|
1472 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1473 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1474 |
addLabelledInputField:(resources string:'incremental GC amount:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1475 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1476 |
on:igcFreeAmount |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1477 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1478 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1479 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1480 |
component converter:(PrintConverter new initForNumber). |
341 | 1481 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1482 |
|
345 | 1483 |
box addTextLabel:'(try to keep this amount for peak requests)'. |
341 | 1484 |
box addHorizontalLine. |
1485 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1486 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1487 |
addLabelledInputField:(resources string:'oldspace increment:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1488 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1489 |
on:oldIncr |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1490 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1491 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1492 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1493 |
component converter:(PrintConverter new initForNumber). |
341 | 1494 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1495 |
|
345 | 1496 |
box addTextLabel:'(increase oldSpace in chunks of this size)'. |
341 | 1497 |
box addHorizontalLine. |
1498 |
||
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1499 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1500 |
addLabelledInputField:(resources string:'oldspace compress limit:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1501 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1502 |
on:compressLimit |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1503 |
tabable:true |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1504 |
separateAtX:0.7. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1505 |
component acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1506 |
component converter:(PrintConverter new initForNumber). |
440 | 1507 |
fields add:component. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1508 |
|
440 | 1509 |
box addTextLabel:'(suppress compressing GC if more memory is in use)'. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1510 |
box addHorizontalLine. |
440 | 1511 |
|
341 | 1512 |
box addAbortButton; addOkButton. |
1513 |
||
1514 |
"/ |
|
1515 |
"/ show the box ... |
|
1516 |
"/ |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1517 |
box open. |
341 | 1518 |
|
1519 |
"/ |
|
1520 |
"/ update system settings |
|
1521 |
"/ |
|
1522 |
box accepted ifTrue:[ |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1523 |
fields do:[:comp | comp accept]. |
341 | 1524 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1525 |
igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1526 |
ObjectMemory freeSpaceGCAmount:igcFreeAmount value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1527 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1528 |
igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1529 |
ObjectMemory freeSpaceGCLimit:igcFreeLimit value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1530 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1531 |
igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1532 |
ObjectMemory incrementalGCLimit:igcLimit value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1533 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1534 |
newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1535 |
ObjectMemory newSpaceSize:newSpaceSize value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1536 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1537 |
oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[ |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1538 |
ObjectMemory oldSpaceIncrement:oldIncr value. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1539 |
]. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1540 |
ObjectMemory oldSpaceCompressLimit:compressLimit value. |
341 | 1541 |
]. |
1542 |
box destroy |
|
1543 |
||
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1544 |
"Modified: 29.5.1996 / 14:16:24 / cg" |
341 | 1545 |
! |
1546 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1547 |
messageSettings |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1548 |
|box vmInfo vmErrors displayErrors classInfos| |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1549 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1550 |
vmInfo := ObjectMemory infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1551 |
vmErrors := ObjectMemory debugPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1552 |
classInfos := Object infoPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1553 |
displayErrors := DeviceWorkstation errorPrinting asValue. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1554 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1555 |
box := DialogBox new. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1556 |
box label:(resources string:'Messages'). |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1557 |
"/ box extent:200@300. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1558 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1559 |
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
|
1560 |
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
|
1561 |
box addHorizontalLine. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1562 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1563 |
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
|
1564 |
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
|
1565 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1566 |
box addAbortButton; addOkButton. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1567 |
box open. |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1568 |
|
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1569 |
box accepted ifTrue:[ |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1570 |
ObjectMemory infoPrinting:vmInfo value. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1571 |
ObjectMemory debugPrinting:vmErrors value. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1572 |
Object infoPrinting:classInfos value. |
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1573 |
DeviceWorkstation errorPrinting:displayErrors value. |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1574 |
]. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1575 |
box destroy |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1576 |
|
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1577 |
"Modified: 29.5.1996 / 14:16:19 / cg" |
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1578 |
! |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1579 |
|
219 | 1580 |
miscSettings |
327 | 1581 |
|box check logDoits shadows updChanges changeFileName returnFocus |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1582 |
loadBinaries compileLazy hostNameInLabel useManager localSourceFirst |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1583 |
showAccelerators sourceCacheDir cacheEntry |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1584 |
component localCheck oldIndent nm fn| |
219 | 1585 |
|
249 | 1586 |
"/ |
1587 |
"/ extract relevant system settings ... |
|
1588 |
"/ |
|
219 | 1589 |
logDoits := Smalltalk logDoits asValue. |
1590 |
shadows := PopUpView shadows asValue. |
|
1591 |
hostNameInLabel := StandardSystemView includeHostNameInLabel asValue. |
|
327 | 1592 |
returnFocus := Dialog returnFocusWhenClosingModalBoxes asValue. |
219 | 1593 |
updChanges := Class updatingChanges asValue. |
1594 |
changeFileName := ObjectMemory nameForChanges asValue. |
|
249 | 1595 |
useManager := (Smalltalk at:#SourceCodeManager) notNil asValue. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1596 |
localSourceFirst := Class tryLocalSourceFirst asValue. |
420
2c169931d1ab
allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents:
410
diff
changeset
|
1597 |
showAccelerators := MenuView showAcceleratorKeys asValue. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1598 |
sourceCacheDir := nil asValue. |
219 | 1599 |
|
1600 |
loadBinaries := Smalltalk loadBinaries asValue. |
|
1601 |
compileLazy := Autoload compileLazy asValue. |
|
1602 |
||
249 | 1603 |
"/ |
1604 |
"/ create a box on those values ... |
|
1605 |
"/ |
|
219 | 1606 |
box := DialogBox new. |
1607 |
box label:(resources string:'Other settings'). |
|
1608 |
||
1609 |
box addCheckBox:(resources string:'log compiles in changes file') on:updChanges. |
|
1610 |
box addCheckBox:(resources string:'log doIts in changes file') on:logDoits. |
|
249 | 1611 |
|
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1612 |
component := box |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1613 |
addLabelledInputField:(resources string:'change file name:') |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1614 |
adjust:#right |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1615 |
on:changeFileName |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1616 |
tabable:true |
492 | 1617 |
separateAtX:0.4. |
476
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1618 |
component immediateAccept:true; acceptOnLeave:false. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1619 |
|
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1620 |
"/ y := box yPosition. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1621 |
"/ component := box addTextLabel:(resources string:'change file name:'). |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1622 |
"/ component width:0.5; adjust:#right; borderWidth:0. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1623 |
"/ box yPosition:y. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1624 |
"/ component := box addInputFieldOn:changeFileName tabable:true. |
8ebba8966f3f
use new Dialog interface to create a labelledInputField ...
Claus Gittinger <cg@exept.de>
parents:
467
diff
changeset
|
1625 |
"/ component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false. |
219 | 1626 |
|
1627 |
box addHorizontalLine. |
|
1628 |
||
1629 |
box addCheckBox:(resources string:'lazy compilation when autoloading') on:compileLazy. |
|
1630 |
check := box addCheckBox:(resources string:'if present, load binary objects when autoloading') on:loadBinaries. |
|
1631 |
ObjectFileLoader isNil ifTrue:[ |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1632 |
loadBinaries value:false. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1633 |
check disable |
219 | 1634 |
]. |
249 | 1635 |
|
250 | 1636 |
check := box addCheckBox:(resources string:'sourcecode from sourcecode management') on:useManager. |
343 | 1637 |
oldIndent := box leftIndent. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1638 |
box leftIndent:30. |
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1639 |
localCheck := box addCheckBox:(resources string:'if present, use local source (suppress checkout)') on:localSourceFirst. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1640 |
localCheck enableChannel:useManager. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1641 |
|
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1642 |
cacheEntry := box |
493 | 1643 |
addLabelledInputField:(resources string:'source cache dir:') |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1644 |
adjust:#right |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1645 |
on:sourceCacheDir |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1646 |
tabable:true |
492 | 1647 |
separateAtX:0.4. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1648 |
cacheEntry immediateAccept:true; acceptOnLeave:false. |
343 | 1649 |
box leftIndent:oldIndent. |
521
14e0be643785
disable cacheDir field if no sourceCodeManager
Claus Gittinger <cg@exept.de>
parents:
514
diff
changeset
|
1650 |
cacheEntry enableChannel:useManager. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1651 |
|
249 | 1652 |
(AbstractSourceCodeManager isNil |
1653 |
or:[AbstractSourceCodeManager defaultManager isNil]) ifTrue:[ |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1654 |
useManager value:false. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1655 |
cacheEntry disable. |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1656 |
check disable. |
505 | 1657 |
localCheck enable. |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1658 |
] ifFalse:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1659 |
sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName). |
249 | 1660 |
]. |
335
c725e5d99819
localSource-first in misc-settings box
Claus Gittinger <cg@exept.de>
parents:
327
diff
changeset
|
1661 |
|
219 | 1662 |
box addHorizontalLine. |
1663 |
||
1664 |
box addCheckBox:(resources string:'shadows under popup views') on:shadows. |
|
327 | 1665 |
box addCheckBox:(resources string:'boxes return focus to previously active view') on:returnFocus. |
219 | 1666 |
box addCheckBox:(resources string:'hostname in window labels') on:hostNameInLabel. |
443 | 1667 |
box addCheckBox:(resources string:'show accelerator keys in menus') on:showAccelerators. |
219 | 1668 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1669 |
box |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1670 |
addHelpButtonFor:'NewLauncher/miscSettings.html'; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1671 |
addAbortButton; |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1672 |
addOkButton. |
249 | 1673 |
|
1674 |
"/ |
|
1675 |
"/ show the box ... |
|
1676 |
"/ |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1677 |
box open. |
219 | 1678 |
|
249 | 1679 |
"/ |
1680 |
"/ update system settings |
|
1681 |
"/ |
|
219 | 1682 |
box accepted ifTrue:[ |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1683 |
Smalltalk logDoits:logDoits value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1684 |
PopUpView shadows:shadows value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1685 |
Class updateChanges:updChanges value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1686 |
Autoload compileLazy:compileLazy value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1687 |
Smalltalk loadBinaries:loadBinaries value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1688 |
StandardSystemView includeHostNameInLabel:hostNameInLabel value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1689 |
ObjectMemory nameForChanges:changeFileName value. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1690 |
Dialog returnFocusWhenClosingModalBoxes:returnFocus value. |
420
2c169931d1ab
allow turning of of accelerator display
Claus Gittinger <cg@exept.de>
parents:
410
diff
changeset
|
1691 |
MenuView showAcceleratorKeys:showAccelerators value. |
327 | 1692 |
|
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1693 |
useManager value ifTrue:[ |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1694 |
(Smalltalk at:#SourceCodeManager) isNil ifTrue:[ |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1695 |
Smalltalk at:#SourceCodeManager put:(AbstractSourceCodeManager defaultManager) |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1696 |
]. |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1697 |
Class tryLocalSourceFirst:(localSourceFirst value). |
491
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1698 |
nm := sourceCacheDir value. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1699 |
(fn := nm asFilename) exists ifFalse:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1700 |
(self confirm:(nm , ' does not exists\create ?' withCRs)) ifTrue:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1701 |
fn makeDirectory; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1702 |
makeReadableForAll; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1703 |
makeWritableForAll; |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1704 |
makeExecutableForAll. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1705 |
] |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1706 |
]. |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1707 |
(fn exists |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1708 |
and:[fn isDirectory |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1709 |
and:[fn isReadable |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1710 |
and:[fn isWritable]]]) ifTrue:[ |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1711 |
AbstractSourceCodeManager cacheDirectoryName:(sourceCacheDir value). |
8c30fe86b0e9
allow change of the source cache directory
Claus Gittinger <cg@exept.de>
parents:
490
diff
changeset
|
1712 |
] |
364
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1713 |
] ifFalse:[ |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1714 |
Smalltalk at:#SourceCodeManager put:nil |
75f5a7e99eb8
added nice help buttons to compilerSettings & miscSettings (more to comre)
Claus Gittinger <cg@exept.de>
parents:
362
diff
changeset
|
1715 |
] |
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1716 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
1717 |
box destroy |
219 | 1718 |
|
590 | 1719 |
"Modified: 29.5.1996 / 18:37:26 / cg" |
219 | 1720 |
! |
1721 |
||
347 | 1722 |
printerSettings |
1723 |
|box |
|
595 | 1724 |
possiblePrinters possibleTypes printerType printCommand |
598 | 1725 |
possiblePageFormats pageFormat landscape format updater |
601 | 1726 |
formatLabel formatComponent landscapeLabel landscapeComponent |
1727 |
topInset leftInset bottomInset unitList unit |
|
1728 |
topInsetLabel topInsetComponent leftInsetLabel leftInsetComponent |
|
1729 |
bottomInsetLabel bottomInsetComponent |
|
598 | 1730 |
check y y1 commandListPop component oldIndent commandList row| |
347 | 1731 |
|
1732 |
possiblePrinters := PrinterStream withAllSubclasses asArray. |
|
1733 |
possibleTypes := possiblePrinters collect:[:cls | cls printerTypeName]. |
|
1734 |
||
1735 |
printerType := SelectionInList new list:(resources array:possibleTypes). |
|
1736 |
printerType selectionIndex:(possiblePrinters identityIndexOf:Printer). |
|
1737 |
printCommand := Printer printCommand asValue. |
|
1738 |
||
604 | 1739 |
pageFormat := SelectionInList new list:(Printer defaultPageFormats). |
1740 |
pageFormat selection:(Printer pageFormat). |
|
1741 |
landscape := Printer landscape asValue. |
|
1742 |
||
1743 |
topInset := Printer topInset asValue. |
|
1744 |
leftInset := Printer leftInset asValue. |
|
1745 |
bottomInset := Printer bottomInset asValue. |
|
601 | 1746 |
|
347 | 1747 |
box := DialogBox new. |
1748 |
box label:(resources string:'Printer settings'). |
|
1749 |
||
595 | 1750 |
box addPopUpList:(resources string:'printer type:') on:printerType. |
347 | 1751 |
|
1752 |
y := box yPosition. |
|
1753 |
component := box addTextLabel:(resources string:'print command:'). |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1754 |
component width:0.3; adjust:#right; borderWidth:0. |
347 | 1755 |
box yPosition:y. |
598 | 1756 |
commandListPop := box addComboBoxOn:printCommand tabable:true. |
1757 |
"/ commandListPop := box addInputFieldOn:printCommand tabable:true. |
|
1758 |
commandListPop width:0.7; left:0.3; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1759 |
"/ some common print commands ... |
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1760 |
|
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1761 |
commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1762 |
commandList isNil ifTrue:[ |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1763 |
commandList := PrinterStream defaultCommands. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1764 |
commandList isNil ifTrue:[ |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1765 |
commandList := #('lpr' |
598 | 1766 |
'lp' |
499
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1767 |
). |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1768 |
] |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1769 |
]. |
245bba7b9cd3
ask printer for defaultCommands
Claus Gittinger <cg@exept.de>
parents:
497
diff
changeset
|
1770 |
|
598 | 1771 |
commandListPop list:commandList. |
347 | 1772 |
box addVerticalSpace. |
595 | 1773 |
box addHorizontalLine. |
1774 |
box addVerticalSpace. |
|
1775 |
||
1776 |
row := OrderedCollection new. |
|
601 | 1777 |
row add:(formatLabel := Label label:(resources string:'page format:')). |
676 | 1778 |
formatLabel borderWidth:0. |
601 | 1779 |
row add:(formatComponent := PopUpList on:pageFormat). |
1780 |
formatComponent label:'unknown'. |
|
1781 |
||
1782 |
row add:(landscapeLabel := Label label:(resources string:'landscape:')). |
|
676 | 1783 |
landscapeLabel borderWidth:0. |
601 | 1784 |
row add:(landscapeComponent := CheckToggle on:landscape). |
595 | 1785 |
|
1786 |
y := box yPosition. |
|
1787 |
box |
|
1788 |
addRow:(1 to:2) |
|
1789 |
fromX:0 |
|
1790 |
toX:0.5 |
|
1791 |
collect:[:idx | row at:idx] |
|
1792 |
tabable:false |
|
1793 |
horizontalLayout:#leftSpace |
|
1794 |
verticalLayout:#center. |
|
1795 |
y1 := box yPosition. |
|
1796 |
box yPosition:y. |
|
1797 |
||
1798 |
box |
|
1799 |
addRow:(3 to:4) |
|
1800 |
fromX:0.5 |
|
1801 |
toX:1.0 |
|
1802 |
collect:[:idx | row at:idx] |
|
1803 |
tabable:false |
|
1804 |
horizontalLayout:#leftSpace |
|
1805 |
verticalLayout:#center. |
|
1806 |
||
1807 |
box yPosition:(box yPosition max:y1). |
|
1808 |
||
601 | 1809 |
box makeTabable:(formatComponent). |
1810 |
box makeTabable:(landscapeComponent). |
|
1811 |
||
1812 |
box addVerticalSpace. |
|
1813 |
box addHorizontalLine. |
|
1814 |
box addVerticalSpace. |
|
1815 |
||
1816 |
y := box yPosition. |
|
1817 |
||
1818 |
topInsetComponent := box |
|
603 | 1819 |
addLabelledInputField:(resources string:'top margin:') |
601 | 1820 |
adjust:#right |
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
1821 |
on:nil "/ topInset |
601 | 1822 |
tabable:true |
1823 |
from:0.0 to:0.5 |
|
1824 |
separateAtX:0.6. |
|
1825 |
topInsetComponent converter:(PrintConverter new initForNumber). |
|
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
1826 |
topInsetComponent model:topInset. |
601 | 1827 |
y1 := box yPosition. |
1828 |
||
1829 |
box yPosition:y. |
|
1830 |
unitList := SelectionInList with:#('inch' 'mm'). |
|
1831 |
unitList selectionIndex:1. |
|
1832 |
||
605 | 1833 |
component := box addComponent:(PopUpList on:unitList). |
1834 |
component |
|
603 | 1835 |
left:0.6; |
1836 |
width:0.3. |
|
601 | 1837 |
|
1838 |
box yPosition:y1. |
|
1839 |
||
1840 |
leftInsetComponent := box |
|
603 | 1841 |
addLabelledInputField:(resources string:'left margin:') |
601 | 1842 |
adjust:#right |
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
1843 |
on:nil "/ leftInset |
601 | 1844 |
tabable:true |
1845 |
from:0.0 to:0.5 |
|
1846 |
separateAtX:0.6. |
|
1847 |
leftInsetComponent converter:(PrintConverter new initForNumber). |
|
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
1848 |
leftInsetComponent model:leftInset. |
601 | 1849 |
|
1850 |
bottomInsetComponent := box |
|
603 | 1851 |
addLabelledInputField:(resources string:'bottom margin:') |
601 | 1852 |
adjust:#right |
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
1853 |
on:nil "/ bottomInset |
601 | 1854 |
tabable:true |
1855 |
from:0.0 to:0.5 |
|
1856 |
separateAtX:0.6. |
|
1857 |
bottomInsetComponent converter:(PrintConverter new initForNumber). |
|
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
1858 |
bottomInsetComponent model:bottomInset. |
601 | 1859 |
|
1860 |
updater := [ |p fg hasPageSize hasMargins| |
|
598 | 1861 |
|
1862 |
printerType selectionIndex ~~ 0 ifTrue:[ |
|
1863 |
p := possiblePrinters at:(printerType selectionIndex). |
|
601 | 1864 |
hasPageSize := p supportsPageSizes. |
604 | 1865 |
hasMargins := p supportsMargins. |
598 | 1866 |
] ifFalse:[ |
601 | 1867 |
hasPageSize := false. |
1868 |
hasMargins := false. |
|
598 | 1869 |
]. |
601 | 1870 |
hasPageSize ifTrue:[ |
597 | 1871 |
fg := Button new foregroundColor. |
601 | 1872 |
formatComponent enable. |
1873 |
landscapeComponent enable. |
|
1874 |
||
1875 |
formatComponent label:p pageFormat. |
|
1876 |
pageFormat value:(p pageFormat). |
|
1877 |
landscape value:(p landscape). |
|
597 | 1878 |
] ifFalse:[ |
1879 |
fg := Button new disabledForegroundColor. |
|
601 | 1880 |
formatComponent disable. |
1881 |
landscapeComponent disable. |
|
1882 |
||
1883 |
formatComponent label:'unknown'. |
|
1884 |
landscape value:nil. |
|
597 | 1885 |
]. |
601 | 1886 |
hasMargins ifTrue:[ |
1887 |
unitList selectionIndex == 2 ifTrue:[ |
|
1888 |
unit := #mm |
|
1889 |
] ifFalse:[ |
|
1890 |
unit := #inch |
|
1891 |
]. |
|
1892 |
||
1893 |
topInset value:(UnitConverter convert:p topInset from:#inch to:unit). |
|
1894 |
leftInset value:(UnitConverter convert:p leftInset from:#inch to:unit). |
|
1895 |
bottomInset value:(UnitConverter convert:p bottomInset from:#inch to:unit). |
|
1896 |
||
1897 |
topInsetComponent enable. |
|
1898 |
leftInsetComponent enable. |
|
1899 |
bottomInsetComponent enable. |
|
1900 |
] ifFalse:[ |
|
1901 |
topInsetComponent disable. |
|
1902 |
leftInsetComponent disable. |
|
1903 |
bottomInsetComponent disable. |
|
1904 |
]. |
|
1905 |
formatLabel foregroundColor:fg. |
|
1906 |
landscapeLabel foregroundColor:fg. |
|
1907 |
||
598 | 1908 |
p notNil ifTrue:[ |
1909 |
commandList := p defaultCommands. |
|
1910 |
commandList notNil ifTrue:[ |
|
1911 |
commandListPop list:commandList |
|
1912 |
]. |
|
1913 |
||
1914 |
printCommand value:(p printCommand). |
|
1915 |
] |
|
597 | 1916 |
]. |
601 | 1917 |
unitList onChangeSend:#value to:updater. |
598 | 1918 |
printerType onChangeSend:#value to:updater. |
1919 |
updater value. |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1920 |
|
608 | 1921 |
box addVerticalSpace; |
1922 |
addHelpButtonFor:'NewLauncher/printerSettings.html'; |
|
1923 |
addAbortButton; addOkButton. |
|
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
1924 |
box open. |
347 | 1925 |
|
1926 |
box accepted ifTrue:[ |
|
598 | 1927 |
Printer := possiblePrinters at:(printerType selectionIndex). |
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1928 |
Printer printCommand:printCommand value. |
595 | 1929 |
|
601 | 1930 |
Printer supportsPageSizes ifTrue:[ |
1931 |
Printer pageFormat:(pageFormat selection). |
|
1932 |
Printer landscape:(landscape value). |
|
1933 |
]. |
|
1934 |
Printer supportsMargins ifTrue:[ |
|
1935 |
unitList selectionIndex == 2 ifTrue:[ |
|
1936 |
unit := #mm |
|
1937 |
] ifFalse:[ |
|
1938 |
unit := #inch |
|
1939 |
]. |
|
1940 |
Printer topInset:(UnitConverter convert:topInset value from:unit to:#inch). |
|
1941 |
Printer leftInset:(UnitConverter convert:leftInset value from:unit to:#inch). |
|
1942 |
Printer bottomInset:(UnitConverter convert:bottomInset value from:unit to:#inch). |
|
1943 |
]. |
|
347 | 1944 |
]. |
1945 |
box destroy |
|
362
d5d99cdda74c
use new ComboBox for printer setup
Claus Gittinger <cg@exept.de>
parents:
359
diff
changeset
|
1946 |
|
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
1947 |
"Modified: 28.8.1996 / 16:16:35 / cg" |
347 | 1948 |
! |
1949 |
||
219 | 1950 |
viewStyleSetting |
1951 |
|listOfStyles resourceDir dir box |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1952 |
list listView scrView infoLabel infoForwarder newStyle| |
219 | 1953 |
|
1954 |
" |
|
1955 |
search resources directory for a list of .style files ... |
|
1956 |
" |
|
1957 |
||
1958 |
resourceDir := Smalltalk getSystemFileName:'resources'. |
|
1959 |
resourceDir isNil ifTrue:[ |
|
549 | 1960 |
self warn:'no styles found (missing ''resources'' directory)'. |
1961 |
^ self |
|
219 | 1962 |
]. |
1963 |
dir := FileDirectory directoryNamed:resourceDir. |
|
1964 |
||
1965 |
listOfStyles := dir select:[:aFileName | aFileName endsWith:'.style']. |
|
1966 |
listOfStyles := listOfStyles collect:[:aFileName | aFileName copyWithoutLast:6]. |
|
1967 |
listOfStyles sort. |
|
1968 |
||
1969 |
"/ old code: used a standard ListSelectionBox |
|
1970 |
"/ changed to intercept selection and add info-output. |
|
1971 |
||
1972 |
"/ box := ListSelectionBox title:(resources string:'STYLE_MSG') withCRs. |
|
1973 |
"/ box label:(resources string:'Style selection'). |
|
1974 |
"/ box list:listOfStyles. |
|
1975 |
"/ box initialText:View defaultStyle. |
|
1976 |
"/ box selectAction:[:newStyle | |
|
1977 |
"/ ]. |
|
1978 |
"/ box action:[:newStyle | |
|
1979 |
"/ transcript topView withCursor:Cursor wait do:[ |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
1980 |
"/ transcript showCR:'change style to ' , newStyle , ' ...'. |
219 | 1981 |
"/ View defaultStyle:newStyle asSymbol. |
1982 |
"/ ] |
|
1983 |
"/ ]. |
|
1984 |
"/ box showAtPointer |
|
1985 |
||
1986 |
"/ new code: build box 'by 'hand' |
|
1987 |
"/ |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1988 |
infoForwarder := [ |
549 | 1989 |
|nm sheet comment| |
1990 |
nm := list selection. |
|
1991 |
sheet := ViewStyle fromFile:(nm , '.style'). |
|
1992 |
comment := sheet at:#comment ifAbsent:''. |
|
1993 |
infoLabel label:comment withCRs asStringCollection |
|
1994 |
]. |
|
219 | 1995 |
|
1996 |
list := SelectionInList with:listOfStyles. |
|
596
ad53df643d7e
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
595
diff
changeset
|
1997 |
list onChangeSend:#value to:infoForwarder. |
219 | 1998 |
|
1999 |
box := Dialog new. |
|
2000 |
box label:(resources string:'Style selection'). |
|
2001 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2002 |
(box addTextLabel:(resources string:'STYLE_MSG') withCRs) adjust:#left. |
219 | 2003 |
listView := SelectionInListView on:list. |
2004 |
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
|
2005 |
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
|
2006 |
|
219 | 2007 |
box addVerticalSpace. |
2008 |
||
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2009 |
(infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft. |
219 | 2010 |
|
2011 |
box addAbortButton; addOkButton. |
|
568 | 2012 |
list selection:(View defaultStyle). |
219 | 2013 |
|
342
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2014 |
box stickAtBottomWithVariableHeight:scrView. |
d4edf4483817
use new Dialog features for viewStyle box
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
2015 |
box stickAtBottomWithFixHeight:infoLabel. |
582
aca73c710a3b
use new fill-in-the-blank dialogs
Claus Gittinger <cg@exept.de>
parents:
580
diff
changeset
|
2016 |
box open. |
219 | 2017 |
|
2018 |
box accepted ifTrue:[ |
|
549 | 2019 |
newStyle := list selection. |
2020 |
newStyle notNil ifTrue:[ |
|
2021 |
self withWaitCursorDo:[ |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2022 |
transcript showCR:'change style to ' , newStyle , ' ...'. |
549 | 2023 |
View defaultStyle:newStyle asSymbol. |
2024 |
]. |
|
2025 |
self reopenLauncher. |
|
2026 |
] |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2027 |
]. |
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2028 |
box destroy |
549 | 2029 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2030 |
"Modified: 5.7.1996 / 13:13:22 / cg" |
219 | 2031 |
! ! |
2032 |
||
2033 |
!NewLauncher methodsFor:'actions - tools'! |
|
2034 |
||
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2035 |
compressingGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2036 |
ObjectMemory verboseGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2037 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2038 |
"Created: 12.5.1996 / 15:30:15 / cg" |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2039 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2040 |
|
219 | 2041 |
fullScreenHardcopy |
2042 |
"after a second (to allow redraw of views under menu ...), |
|
2043 |
save the contents of the whole screen." |
|
2044 |
||
2045 |
Processor addTimedBlock:[ |
|
2046 |
self saveScreenImage:(Image fromScreen) defaultName:'screen' |
|
2047 |
] afterSeconds:1 |
|
2048 |
! |
|
99 | 2049 |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2050 |
garbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2051 |
ObjectMemory reclaimSymbols |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2052 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2053 |
"Created: 12.5.1996 / 15:28:03 / cg" |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2054 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2055 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2056 |
globalGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2057 |
ObjectMemory reclaimSymbols |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2058 |
|
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2059 |
"Created: 12.5.1996 / 15:28:13 / cg" |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2060 |
! |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
2061 |
|
219 | 2062 |
removeAllBreakAndTracePoints |
2063 |
MessageTracer cleanup |
|
2064 |
! |
|
2065 |
||
2066 |
screenHardcopy |
|
2067 |
"after a second (to allow redraw of views under menu ...), |
|
2068 |
let user specify a rectangular area on the screen |
|
2069 |
and save its contents." |
|
2070 |
||
2071 |
|area| |
|
2072 |
||
2073 |
Processor addTimedBlock:[ |
|
2074 |
area := Rectangle fromUser. |
|
2075 |
(area width > 0 and:[area height > 0]) ifTrue:[ |
|
2076 |
self saveScreenImage:(Image fromScreen:area) defaultName:'hardcopy' |
|
2077 |
] |
|
2078 |
] afterSeconds:1 |
|
2079 |
! |
|
2080 |
||
2081 |
startEventMonitor |
|
2082 |
EventMonitor open |
|
2083 |
! |
|
2084 |
||
2085 |
startFullWindowTreeView |
|
2086 |
WindowTreeView open |
|
2087 |
! |
|
2088 |
||
2089 |
startMemoryMonitor |
|
2090 |
MemoryMonitor open |
|
2091 |
! |
|
2092 |
||
2093 |
startMemoryUsageView |
|
2094 |
MemoryUsageView open |
|
2095 |
! |
|
2096 |
||
2097 |
startProcessMonitor |
|
2098 |
ProcessMonitor open |
|
2099 |
! |
|
2100 |
||
434 | 2101 |
startStopEventTrace |
503 | 2102 |
|v wg| |
434 | 2103 |
|
2104 |
v := Screen current viewFromUser. |
|
2105 |
v notNil ifTrue:[ |
|
2106 |
v := v topView. |
|
503 | 2107 |
wg := v windowGroup. |
2108 |
wg notNil ifTrue:[ |
|
2109 |
"/ |
|
2110 |
"/ toggle eventTrace in its windowGroup |
|
2111 |
"/ |
|
2112 |
wg traceEvents:(wg preEventHook isNil) |
|
434 | 2113 |
] |
2114 |
] |
|
2115 |
||
2116 |
"Created: 7.3.1996 / 14:44:22 / cg" |
|
503 | 2117 |
"Modified: 24.4.1996 / 10:27:11 / cg" |
434 | 2118 |
! |
2119 |
||
219 | 2120 |
startWindowTreeView |
2121 |
|v| |
|
2122 |
||
2123 |
v := self pickAView. |
|
2124 |
v notNil ifTrue:[ |
|
2125 |
WindowTreeView openOn:v topView |
|
2126 |
] |
|
2127 |
! |
|
2128 |
||
2129 |
viewDestroy |
|
2130 |
"let user pick a view and destroy it. |
|
2131 |
Even allow destroying non-smalltalk views |
|
2132 |
(also for views which I forgot due to some error)" |
|
2133 |
||
2134 |
|device p v id| |
|
2135 |
||
2136 |
(Delay forSeconds:1) wait. |
|
2137 |
||
2138 |
device := Screen current. |
|
2139 |
p := device pointFromUser. |
|
2140 |
id := device viewIdFromPoint:p. |
|
2141 |
v := device viewFromId:id. |
|
2142 |
v notNil ifTrue:[ |
|
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
2143 |
v topView destroy. |
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
2144 |
^ self |
219 | 2145 |
]. |
2146 |
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
|
2147 |
^ self |
219 | 2148 |
]. |
298 | 2149 |
(Dialog confirm:'mhmh, this may not a be smalltalk view\(Or I somehow forgot about it).\Destroy anyway ?' withCRs) |
219 | 2150 |
ifTrue:[ |
304
49dc8c0e733e
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
2151 |
device destroyView:nil withId:id |
219 | 2152 |
]. |
2153 |
||
2154 |
"Modified: 18.9.1995 / 23:13:32 / claus" |
|
298 | 2155 |
"Modified: 14.12.1995 / 22:02:26 / cg" |
219 | 2156 |
! |
2157 |
||
2158 |
viewHardcopy |
|
2159 |
"after a second (to allow redraw of views under menu ...), |
|
2160 |
let user specify a view and save its contents." |
|
2161 |
||
2162 |
Processor addTimedBlock:[ |
|
2163 |
|v| |
|
2164 |
||
2165 |
v := Screen current viewFromUser. |
|
2166 |
v notNil ifTrue:[ |
|
2167 |
self saveScreenImage:(Image fromView:(v topView)) defaultName:'hardcopy' |
|
2168 |
] |
|
2169 |
] afterSeconds:1 |
|
2170 |
! |
|
2171 |
||
2172 |
viewInspect |
|
2173 |
"let user pick a view and inspect it. Only smalltalk views are allowed" |
|
2174 |
||
2175 |
|v| |
|
2176 |
||
2177 |
v := self pickAView. |
|
2178 |
v notNil ifTrue:[ |
|
226 | 2179 |
"/ v topView inspect |
2180 |
v inspect |
|
219 | 2181 |
] |
2182 |
||
2183 |
! ! |
|
2184 |
||
2185 |
!NewLauncher methodsFor:'change & update'! |
|
2186 |
||
2187 |
update:something with:aParameter from:changedObject |
|
2188 |
((something == #currentProject) |
|
2189 |
or:[changedObject == Project]) ifTrue:[ |
|
2190 |
self changed:#info. |
|
2191 |
^ self |
|
2192 |
]. |
|
2193 |
! ! |
|
2194 |
||
658 | 2195 |
!NewLauncher methodsFor:'dynamic menus'! |
2196 |
||
2197 |
addMenu:name withItems:items actions:actions |
|
2198 |
"dynamically add a new (user-)menu to the menu panel. |
|
2199 |
This allows applications to install items for themself |
|
2200 |
dynamically in the launcher." |
|
2201 |
||
2202 |
|subMenu| |
|
2203 |
||
2204 |
myMenu add:name selector:(name asSymbol) before:#help. |
|
2205 |
subMenu := MenuView forMenu:myMenu. |
|
2206 |
subMenu labels:items. |
|
2207 |
subMenu actions:actions. |
|
2208 |
myMenu at:name putMenu:subMenu |
|
2209 |
||
2210 |
" |
|
2211 |
|launcher actionBlocks| |
|
2212 |
||
2213 |
actionBlocks := Array new:3. |
|
2214 |
actionBlocks at:1 put:[Transcript showCR:'foo']. |
|
2215 |
actionBlocks at:2 put:[Transcript showCR:'bar']. |
|
2216 |
||
2217 |
launcher := Transcript topView application. |
|
2218 |
launcher |
|
2219 |
addMenu:'misc' |
|
2220 |
withItems:#('foo' 'bar') |
|
2221 |
actions:actionBlocks |
|
2222 |
" |
|
2223 |
||
2224 |
" |
|
2225 |
|launcher actionBlocks| |
|
2226 |
||
2227 |
actionBlocks := Array new:3. |
|
2228 |
actionBlocks at:1 put:[RDoItServer startServer]. |
|
2229 |
actionBlocks at:2 put:[RDoItServer killServer]. |
|
2230 |
||
2231 |
launcher := Transcript topView application. |
|
2232 |
launcher |
|
2233 |
addMenu:'misc' |
|
2234 |
withItems:#('start rdoit server' 'stop rdoit server') |
|
2235 |
actions:actionBlocks |
|
2236 |
" |
|
2237 |
||
2238 |
"Modified: 5.7.1996 / 11:45:19 / cg" |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2239 |
! |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2240 |
|
668 | 2241 |
menuAt:nameSymbol |
2242 |
"return a menu by name" |
|
2243 |
||
2244 |
^ myMenu subMenuAt:nameSymbol |
|
2245 |
||
2246 |
" |
|
2247 |
|launcher demoMenu| |
|
2248 |
||
2249 |
launcher := Transcript topView application. |
|
2250 |
demoMenu := launcher menuAt:#demos. |
|
2251 |
demoMenu |
|
2252 |
addLabels:#('-' 'fooBar') |
|
2253 |
selectors:#(nil fooBar). |
|
2254 |
demoMenu actionAt:#fooBar put:[Transcript showCR:'fooBar'] |
|
2255 |
" |
|
2256 |
||
2257 |
"Created: 11.7.1996 / 15:35:13 / cg" |
|
2258 |
"Modified: 11.7.1996 / 15:42:25 / cg" |
|
2259 |
! |
|
2260 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2261 |
removeMenu:name |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2262 |
"dynamically remove a (user-)menu from the menu panel. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2263 |
This allows applications to de-install items for themself |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2264 |
dynamically in the launcher." |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2265 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2266 |
myMenu remove:name |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2267 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2268 |
" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2269 |
|launcher actionBlocks| |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2270 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2271 |
actionBlocks := Array new:3. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2272 |
actionBlocks at:1 put:[Transcript showCR:'foo']. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2273 |
actionBlocks at:2 put:[Transcript showCR:'bar']. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2274 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2275 |
launcher := Transcript topView application. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2276 |
launcher |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2277 |
addMenu:'misc' |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2278 |
withItems:#('foo' 'bar') |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2279 |
actions:actionBlocks. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2280 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2281 |
Delay waitForSeconds:10. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2282 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2283 |
launcher removeMenu:'misc' |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2284 |
" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2285 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2286 |
"Created: 5.7.1996 / 11:44:54 / cg" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2287 |
"Modified: 5.7.1996 / 11:54:36 / cg" |
658 | 2288 |
! ! |
2289 |
||
219 | 2290 |
!NewLauncher methodsFor:'help'! |
2291 |
||
2292 |
helpTextFor:aComponent |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2293 |
|sel s buttons| |
219 | 2294 |
|
2295 |
aComponent == transcript ifTrue:[ |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2296 |
s := 'TRANSCRIPT_HELP' |
219 | 2297 |
]. |
2298 |
||
2299 |
aComponent == infoView ifTrue:[ |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2300 |
s := 'INFOVIEW_HELP' |
219 | 2301 |
]. |
2302 |
||
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2303 |
buttons := buttonPanel subViews. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2304 |
(buttons notNil and:[buttons includes:aComponent]) ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2305 |
"kludge: look for its change selector" |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2306 |
sel := aComponent changeMessage. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2307 |
sel == #startSystemBrowser ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2308 |
s := 'SBROWSER_BUTTON_HELP' |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2309 |
]. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2310 |
sel == #startFileBrowser ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2311 |
s := 'FBROWSER_BUTTON_HELP' |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2312 |
]. |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2313 |
sel == #startChangesBrowser ifTrue:[ |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2314 |
s := 'CBROWSER_BUTTON_HELP' |
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2315 |
]. |
219 | 2316 |
]. |
2317 |
s notNil ifTrue:[ |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2318 |
^ resources string:s |
219 | 2319 |
]. |
2320 |
^ nil |
|
399
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2321 |
|
c75f23ad674c
handle helptext-query while destroying; changed check-mark position in active help
Claus Gittinger <cg@exept.de>
parents:
398
diff
changeset
|
2322 |
"Modified: 26.2.1996 / 23:08:19 / cg" |
219 | 2323 |
! ! |
2324 |
||
2325 |
!NewLauncher methodsFor:'infoview update'! |
|
2326 |
||
2327 |
info |
|
2328 |
|project projectName projectDir packageName| |
|
2329 |
||
2330 |
(Project isNil or:[(project := Project current) isNil]) ifTrue:[ |
|
2331 |
projectName := '* none *'. |
|
2332 |
projectDir := '.'. |
|
2333 |
packageName := '* none *'. |
|
2334 |
] ifFalse:[ |
|
2335 |
projectName := project name. |
|
2336 |
projectDir := project directory. |
|
2337 |
packageName := project packageName. |
|
2338 |
]. |
|
2339 |
||
2340 |
^ resources |
|
2341 |
string:'project: ''%1'' fileOut to: ''%3'' package: ''%2''' |
|
2342 |
withArgs:(Array |
|
2343 |
with:projectName |
|
2344 |
with:packageName |
|
2345 |
with:(projectDir contractTo:30)) |
|
319
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2346 |
! |
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2347 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2348 |
showActivity:someMessage |
500 | 2349 |
"some activityNotification to be forwarded to the user; |
2350 |
show it in the transcript here." |
|
2351 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2352 |
transcript showCR:someMessage; endEntry |
319
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2353 |
|
a39350103cb2
forward activity notifications to Transcript
Claus Gittinger <cg@exept.de>
parents:
304
diff
changeset
|
2354 |
"Created: 23.12.1995 / 12:38:29 / cg" |
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2355 |
"Modified: 5.7.1996 / 13:13:15 / cg" |
99 | 2356 |
! ! |
2357 |
||
93 | 2358 |
!NewLauncher methodsFor:'initialize / release'! |
86 | 2359 |
|
219 | 2360 |
addTopViewsToCurrentProject |
2361 |
"ignored here - the launcher is always global (i.e. not project private)." |
|
2362 |
||
2363 |
^ self |
|
2364 |
! |
|
2365 |
||
2366 |
buttonPanelSpec |
|
2367 |
"return a spec for the buttons in the panel; |
|
2368 |
entries consists of selector and bitmap-filename. |
|
2369 |
nil selectors are taken as separators (see setupButtonPanel)" |
|
98 | 2370 |
|
219 | 2371 |
^ #( |
490 | 2372 |
#(startSystemBrowser 'SBrowser32x32.xbm') |
2373 |
#(startFileBrowser 'FBrowser32x32.xbm') |
|
238
523cc1f36b1d
release boxes - no Workspace button (its ugly)
Claus Gittinger <cg@exept.de>
parents:
233
diff
changeset
|
2374 |
"/ #(startWorkspace 'Workspace32x32.xbm') |
490 | 2375 |
#(nil nil) |
2376 |
#(startChangesBrowser 'CBrowser32x32.xbm') |
|
219 | 2377 |
"/ #(nil nil) |
2378 |
"/ #(nil nil) |
|
2379 |
"/ #(startDocumentationTool 'book11.ico') |
|
2380 |
) |
|
230 | 2381 |
|
2382 |
"Created: 4.12.1995 / 20:16:18 / cg" |
|
490 | 2383 |
"Modified: 19.4.1996 / 16:37:46 / cg" |
219 | 2384 |
! |
2385 |
||
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2386 |
closeDownViews |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2387 |
OpenLaunchers remove:self ifAbsent:nil. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2388 |
super closeDownViews. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2389 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2390 |
"Created: 5.7.1996 / 13:33:36 / cg" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2391 |
! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2392 |
|
219 | 2393 |
closeRequest |
2394 |
(self confirm:(resources string:'really close %1 ?' with:self class name)) ifTrue:[ |
|
2395 |
super closeRequest |
|
2396 |
] |
|
2397 |
! |
|
2398 |
||
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2399 |
disableDangerousMenuItemsInRemoteLauncher |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2400 |
"if I am a remote launcher (multidisplay operation), |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2401 |
disable menus which are dangerous or affect common state. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2402 |
These operations have to |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2403 |
be performed on the main screen." |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2404 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2405 |
isMainLauncher ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2406 |
(myMenu menuAt:#file) disableAll:#(snapshot snapshotAndExit objectModuleDialog exit). |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2407 |
(myMenu menuAt:#projects) disableAll. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2408 |
(myMenu menuAt:#settings) disableAll. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2409 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2410 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2411 |
"Created: 5.7.1996 / 17:00:50 / cg" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2412 |
"Modified: 5.7.1996 / 17:01:30 / cg" |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2413 |
! |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2414 |
|
219 | 2415 |
focusSequence |
2416 |
^ (Array with:myMenu) |
|
2417 |
, |
|
2418 |
(buttonPanel subViews select:[:element | element isKindOf:Button]) |
|
2419 |
"/ , (Array with:Transcript) |
|
98 | 2420 |
! |
2421 |
||
93 | 2422 |
openInterface |
98 | 2423 |
"sent by my superclass to open up my interface" |
93 | 2424 |
|
615 | 2425 |
|top icn w scrn sz| |
86 | 2426 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2427 |
"/ if there is already a transcript on my device, |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2428 |
"/ I am a slave launcher with limited functionality. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2429 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2430 |
Transcript notNil ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2431 |
Transcript ~~ Stderr ifTrue:[ |
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
2432 |
isMainLauncher := (Transcript graphicsDevice == device). |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2433 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2434 |
isMainLauncher := true |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2435 |
] |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2436 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2437 |
isMainLauncher := true |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2438 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2439 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2440 |
top := StandardSystemView onDevice:device. |
205 | 2441 |
top label:'Smalltalk/X'; iconLabel:'ST/X Launcher'. |
86 | 2442 |
top extent:(400@300 ). |
2443 |
||
615 | 2444 |
icn := self class aboutIcon. |
686 | 2445 |
icn notNil ifTrue:[ |
2446 |
icn := icn magnifiedTo:(sz := Screen current preferredIconSize). |
|
2447 |
]. |
|
616 | 2448 |
|
2449 |
((scrn := Screen current) supportsDeepIcons not |
|
617 | 2450 |
and:[scrn supportsIconViews |
2451 |
and:[scrn depth > 1]]) ifTrue:[ |
|
616 | 2452 |
w := View extent:sz. |
2453 |
w viewBackground:icn. |
|
2454 |
top iconView:w |
|
2455 |
] ifFalse:[ |
|
2456 |
top icon:icn. |
|
2457 |
]. |
|
615 | 2458 |
|
2459 |
"/ (scrn := Screen current) supportsDeepIcons ifTrue:[ |
|
2460 |
"/ icn := self class aboutIcon. |
|
2461 |
"/ icn notNil ifTrue:[ |
|
2462 |
"/ icn := icn magnifiedTo:(sz := scrn preferredIconSize). |
|
2463 |
"/ icn := Depth8Image fromImage:icn. |
|
2464 |
"/ top icon:icn |
|
2465 |
"/ ]. |
|
2466 |
||
2467 |
"/ ] ifFalse:[ |
|
2468 |
"/ scrn supportsIconViews ifTrue:[ |
|
2469 |
"/ icn := self class aboutIcon. |
|
2470 |
"/ icn notNil ifTrue:[ |
|
2471 |
"/ icn := icn magnifiedTo:(sz := scrn preferredIconSize). |
|
2472 |
"/ w := View extent:sz. |
|
2473 |
"/ w viewBackground:icn. |
|
2474 |
"/ top iconView:w |
|
2475 |
"/ ]. |
|
2476 |
"/ ] |
|
2477 |
"/ ]. |
|
92 | 2478 |
|
93 | 2479 |
self setupViewsIn:top. |
98 | 2480 |
|
2481 |
top application:self. |
|
86 | 2482 |
|
2483 |
" |
|
92 | 2484 |
open with higher prio to allow interaction even while things |
2485 |
are running ... |
|
86 | 2486 |
" |
92 | 2487 |
top openWithPriority:(Processor userSchedulingPriority + 1). |
490 | 2488 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2489 |
OpenLaunchers isNil ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2490 |
OpenLaunchers := OrderedCollection new. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2491 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2492 |
OpenLaunchers add:self. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2493 |
|
686 | 2494 |
"Modified: 25.7.1996 / 21:12:09 / cg" |
93 | 2495 |
! |
86 | 2496 |
|
219 | 2497 |
release |
2498 |
infoProcess notNil ifTrue:[ |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2499 |
infoProcess terminate. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2500 |
infoProcess := nil. |
219 | 2501 |
]. |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2502 |
OpenLaunchers remove:self ifAbsent:nil. |
219 | 2503 |
super release |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2504 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2505 |
"Modified: 5.7.1996 / 11:48:56 / cg" |
86 | 2506 |
! |
2507 |
||
219 | 2508 |
restarted |
2509 |
"image restart - since WindowGroup recreates the process with |
|
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
2510 |
the default priority, we have to raise the prio again. |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
2511 |
Mhmh - this looks like a bug to me ... |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
2512 |
Also, the cursor (which was stored as a write or waitCursor) must |
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
2513 |
be reset to normal." |
86 | 2514 |
|
219 | 2515 |
Processor activeProcess priority:(Processor userSchedulingPriority + 1). |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
2516 |
|
219 | 2517 |
super restarted |
600
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
2518 |
|
7c4fa93d814a
cursor handling during snapshot
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
2519 |
"Modified: 1.6.1996 / 16:58:25 / cg" |
86 | 2520 |
! |
2521 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2522 |
saveAndTerminateRequest |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2523 |
"some windowManagers can send this, to shutDown an application |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2524 |
but let it save its state before, for later restart. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2525 |
Although I have not yet encountered such a windowManager, |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2526 |
we are already prepared for this ;-)" |
86 | 2527 |
|
219 | 2528 |
self snapshot. |
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2529 |
super saveAndTerminateRequest |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2530 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2531 |
"Created: 5.7.1996 / 13:07:45 / cg" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
2532 |
"Modified: 5.7.1996 / 13:08:55 / cg" |
103 | 2533 |
! |
2534 |
||
86 | 2535 |
setupButtonPanelIn:aTopView |
2536 |
"create the buttonPanel" |
|
2537 |
||
368 | 2538 |
|spc mh buttonSize| |
86 | 2539 |
|
2540 |
spc := View viewSpacing // 2. |
|
2541 |
buttonPanel := HorizontalPanelView in:aTopView. |
|
2542 |
buttonPanel level:-1; borderWidth:0. |
|
2543 |
buttonPanel horizontalLayout:#leftSpace. |
|
2544 |
||
368 | 2545 |
buttonSize := self class buttonImageSize. |
2546 |
||
490 | 2547 |
"/ |
2548 |
"/ the buttonSpec is a collection of: |
|
2549 |
"/ #( selector iconFileName ) |
|
2550 |
"/ or: |
|
2551 |
"/ #( selector (className iconQuerySelector) ) |
|
2552 |
"/ or" |
|
2553 |
"/ #( nil ) |
|
2554 |
"/ |
|
90 | 2555 |
self buttonPanelSpec do:[:entry | |
490 | 2556 |
|sel b sep img iconSpec| |
86 | 2557 |
|
368 | 2558 |
sel := entry at:1. |
2559 |
sel isNil ifTrue:[ |
|
2560 |
sep := View in:buttonPanel. |
|
2561 |
sep extent:32@1; borderWidth:0. |
|
2562 |
] ifFalse:[ |
|
2563 |
b := Button in:buttonPanel. |
|
490 | 2564 |
iconSpec := entry at:2. |
2565 |
iconSpec isArray ifTrue:[ |
|
2566 |
img := (Smalltalk classNamed:(iconSpec at:1)) perform:(iconSpec at:2). |
|
2567 |
] ifFalse:[ |
|
2568 |
img := Image fromFile:iconSpec. |
|
2569 |
]. |
|
591 | 2570 |
(img notNil and:[buttonSize notNil]) ifTrue:[ |
2571 |
img extent ~= buttonSize ifTrue:[ |
|
2572 |
img := img magnifiedTo:buttonSize |
|
2573 |
] |
|
368 | 2574 |
]. |
2575 |
b form:img. |
|
2576 |
b model:self; changeMessage:sel |
|
2577 |
] |
|
86 | 2578 |
]. |
2579 |
||
100 | 2580 |
mh := myMenu height. |
2581 |
buttonPanel origin:0.0 @ (mh + spc) |
|
368 | 2582 |
corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)). |
86 | 2583 |
|
2584 |
buttonPanel leftInset:spc; rightInset:spc. |
|
490 | 2585 |
|
591 | 2586 |
"Modified: 29.5.1996 / 19:23:04 / cg" |
86 | 2587 |
! |
2588 |
||
90 | 2589 |
setupDemoMenu |
2590 |
"setup the demo pulldown menu" |
|
2591 |
||
2592 |
|m| |
|
2593 |
||
2594 |
myMenu at:#demos |
|
450 | 2595 |
putLabels:(resources array:#( |
2596 |
'goodies' |
|
2597 |
'games' |
|
2598 |
'geometric designs' |
|
2599 |
'simple animations' |
|
2600 |
'3D graphics' |
|
2601 |
'graphic editors' |
|
2602 |
)) |
|
2603 |
selectors:#( |
|
2604 |
goodies |
|
2605 |
games |
|
2606 |
geometricDesigns |
|
2607 |
simpleAnimations |
|
2608 |
#'3Dgraphics' |
|
2609 |
#graphicEditors |
|
2610 |
) |
|
2611 |
receiver:self. |
|
90 | 2612 |
|
2613 |
" |
|
2614 |
only to show two different ways of defining a popUpMenu, |
|
2615 |
we use labels:selectors:receiver: here: |
|
2616 |
" |
|
2617 |
m := myMenu menuAt:#demos. |
|
2618 |
m subMenuAt:#games |
|
2619 |
put:(PopUpMenu |
|
450 | 2620 |
labels:(resources array:#( |
2621 |
'Tetris' |
|
2622 |
'Tic Tac Toe' |
|
2623 |
'Tic Tac Toe (2 players)' |
|
2624 |
)) |
|
2625 |
selectors:#( |
|
2626 |
startTetris |
|
2627 |
startTicTacToe |
|
2628 |
startTicTacToe2 |
|
2629 |
) |
|
2630 |
receiver:self). |
|
90 | 2631 |
|
2632 |
" |
|
2633 |
and labels:selector:args:receiver: here: |
|
2634 |
" |
|
2635 |
m subMenuAt:#geometricDesigns |
|
2636 |
put:(PopUpMenu |
|
450 | 2637 |
labels:(resources array:#( |
2638 |
'Pen demo' |
|
2639 |
'Commander demo' |
|
2640 |
'-' |
|
2641 |
'Fractal plants demo' |
|
2642 |
'Fractal patterns demo' |
|
2643 |
)) |
|
2644 |
selector:#openDemo: |
|
2645 |
args:#( |
|
2646 |
PenDemo |
|
2647 |
CommanderDemo |
|
2648 |
nil |
|
2649 |
FractalPlantsDemo |
|
2650 |
FractalPatternsDemo |
|
2651 |
) |
|
2652 |
receiver:self). |
|
90 | 2653 |
|
2654 |
m subMenuAt:#simpleAnimations |
|
2655 |
put:(PopUpMenu |
|
450 | 2656 |
labels:(resources array:#( |
2657 |
'Animation' |
|
2658 |
'Globe demo' |
|
2659 |
)) |
|
2660 |
selector:#openDemo: |
|
2661 |
args:#( |
|
2662 |
Animation |
|
2663 |
GlobeDemo |
|
2664 |
) |
|
2665 |
receiver:self). |
|
90 | 2666 |
|
2667 |
m subMenuAt:#'3Dgraphics' |
|
2668 |
put:(PopUpMenu |
|
450 | 2669 |
labels:(resources |
2670 |
array:#( |
|
2671 |
'plane' |
|
2672 |
'tetra' |
|
2673 |
'cube (wireframe)' |
|
2674 |
'cube (solid)' |
|
2675 |
'sphere (wireframe)' |
|
2676 |
'doughnut (wireframe)' |
|
2677 |
'planet' |
|
2678 |
'teapot' |
|
2679 |
'logo' |
|
2680 |
'rubics cube' |
|
2681 |
'x/y graph' |
|
2682 |
'-' |
|
2683 |
'cube (light)' |
|
2684 |
'cube (light & texture)' |
|
2685 |
'sphere (light)' |
|
2686 |
'colored octahedron' |
|
2687 |
)) |
|
2688 |
selector:#openDemo: |
|
2689 |
args:#( |
|
2690 |
GLPlaneDemoView2 |
|
2691 |
GLTetraDemoView |
|
2692 |
GLWireCubeDemoView |
|
2693 |
GLCubeDemoView |
|
2694 |
GLWireSphereDemoView |
|
2695 |
GLDoughnutDemoView |
|
2696 |
GLPlanetDemoView |
|
2697 |
GLTeapotDemo |
|
2698 |
Logo3DView1 |
|
2699 |
RubicsCubeView |
|
2700 |
GLXYGraph |
|
2701 |
nil |
|
2702 |
GLCubeDemoView2 |
|
2703 |
GLBrickCubeDemoView |
|
2704 |
GLSphereDemoView2 |
|
2705 |
GLOctaHedronDemoView |
|
2706 |
) |
|
2707 |
receiver:self). |
|
90 | 2708 |
|
2709 |
m subMenuAt:#graphicEditors |
|
2710 |
put:(PopUpMenu |
|
450 | 2711 |
labels:(resources array:#( |
2712 |
'DrawTool' |
|
2713 |
'LogicTool' |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
2714 |
'Paint Demo' |
450 | 2715 |
)) |
2716 |
selector:#openDemo: |
|
2717 |
args:#( |
|
2718 |
DrawTool |
|
2719 |
LogicTool |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
2720 |
ColorDrawDemo3 |
450 | 2721 |
) |
2722 |
receiver:self). |
|
90 | 2723 |
|
91 | 2724 |
m subMenuAt:#goodies |
2725 |
put:(PopUpMenu |
|
450 | 2726 |
labels:(resources array:#( |
2727 |
'clock' |
|
2728 |
'calendar' |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
2729 |
'calculator' |
450 | 2730 |
'-' |
2731 |
'mail tool' |
|
2732 |
'news tool' |
|
2733 |
)) |
|
2734 |
selector:#openDemo: |
|
2735 |
args:#( |
|
2736 |
Clock |
|
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
2737 |
Calendar |
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
2738 |
CalculatorView |
450 | 2739 |
nil |
2740 |
MailView |
|
2741 |
NewsView |
|
2742 |
) |
|
2743 |
receiver:self). |
|
2744 |
||
464
998161ce250d
added calculator & panter to demo menu
Claus Gittinger <cg@exept.de>
parents:
458
diff
changeset
|
2745 |
"Modified: 11.4.1996 / 00:21:46 / cg" |
90 | 2746 |
! |
2747 |
||
219 | 2748 |
setupInfoViewIn:topView |
2749 |
|spc halfSpc| |
|
2750 |
||
2751 |
spc := View viewSpacing. |
|
2752 |
infoView := Label label:'' in:topView. |
|
2753 |
infoView adjust:#left; borderWidth:0. |
|
2754 |
infoView level:-1. |
|
2755 |
transcript superView bottomInset:(infoView height + spc). |
|
90 | 2756 |
|
219 | 2757 |
infoView is3D ifTrue:[ |
2758 |
halfSpc := spc // 2. |
|
2759 |
] ifFalse:[ |
|
2760 |
halfSpc := 0 |
|
2761 |
]. |
|
2762 |
infoView topInset:(infoView height negated - spc + transcript borderWidth); |
|
2763 |
bottomInset:halfSpc; |
|
2764 |
leftInset:halfSpc; |
|
2765 |
rightInset:halfSpc. |
|
2766 |
infoView origin:0.0 @ 1.0 corner:1.0 @ 1.0. |
|
2767 |
infoView model:self; aspect:#info; labelMessage:#info. |
|
2768 |
||
2769 |
Project notNil ifTrue:[ |
|
2770 |
Project addDependent:self. |
|
2771 |
] |
|
2772 |
||
2773 |
" |
|
2774 |
NewLauncher open |
|
2775 |
" |
|
93 | 2776 |
! |
2777 |
||
219 | 2778 |
setupMenu |
2779 |
"setup the pulldown menu" |
|
2780 |
||
2781 |
|l s icon| |
|
2782 |
||
2783 |
myMenu labels:(resources array:#( |
|
379 | 2784 |
about |
2785 |
file |
|
2786 |
classes |
|
2787 |
tools |
|
2788 |
projects |
|
2789 |
settings |
|
2790 |
demos |
|
2791 |
help)). |
|
219 | 2792 |
" |
2793 |
if there is a bitmap, change 'about' to the ST/X icon |
|
2794 |
" |
|
2795 |
icon := self class smallAboutIcon. |
|
2796 |
icon notNil ifTrue:[ |
|
377 | 2797 |
myMenu labels at:1 put:icon. |
2798 |
myMenu height:(myMenu height max:(icon height + (View viewSpacing * 2))) |
|
93 | 2799 |
]. |
219 | 2800 |
|
2801 |
myMenu selectors:#( |
|
377 | 2802 |
#about |
2803 |
#file |
|
2804 |
#classes |
|
2805 |
#tools |
|
2806 |
#projects |
|
2807 |
#settings |
|
2808 |
#demos |
|
2809 |
#help). |
|
219 | 2810 |
|
2811 |
myMenu at:#about |
|
377 | 2812 |
putLabels:(resources array:#( |
2813 |
'about Smalltalk/X ...' |
|
2814 |
)) |
|
2815 |
selectors:#( |
|
2816 |
#about |
|
2817 |
) |
|
2818 |
receiver:self. |
|
219 | 2819 |
|
2820 |
l := #( |
|
377 | 2821 |
'file browser' |
2822 |
'-' |
|
2823 |
'modules ...' |
|
2824 |
'-' |
|
2825 |
'snapshot ...' |
|
2826 |
'snapshot & exit ...' |
|
2827 |
'exit smalltalk ...' |
|
2828 |
). |
|
219 | 2829 |
s := #( |
377 | 2830 |
#startFileBrowser |
2831 |
nil |
|
2832 |
#objectModuleDialog |
|
2833 |
nil |
|
2834 |
#snapshot |
|
2835 |
#snapshotAndExit |
|
2836 |
#exit |
|
2837 |
). |
|
219 | 2838 |
|
2839 |
myMenu at:#file |
|
377 | 2840 |
putLabels:(resources array:l) |
2841 |
selectors:s |
|
2842 |
receiver:self. |
|
219 | 2843 |
|
2844 |
myMenu at:#classes |
|
377 | 2845 |
putLabels:(resources array:#( |
2846 |
'system browser' |
|
2847 |
'class browser ...' |
|
2848 |
'full class browser ...' |
|
2849 |
'class hierarchy browser ...' |
|
2850 |
'class tree' |
|
2851 |
'-' |
|
2852 |
'implementors ...' |
|
2853 |
'senders ...' |
|
574 | 2854 |
'resource ...' |
377 | 2855 |
'-' |
2856 |
'change browser' |
|
2857 |
)) |
|
2858 |
selectors:#( |
|
2859 |
#startSystemBrowser |
|
2860 |
#startClassBrowser |
|
2861 |
#startFullClassBrowser |
|
2862 |
#startClassHierarchyBrowser |
|
2863 |
#startClassTreeView |
|
2864 |
nil |
|
2865 |
#browseImplementors |
|
2866 |
#browseSenders |
|
574 | 2867 |
#browseResources |
377 | 2868 |
nil |
2869 |
#startChangesBrowser |
|
2870 |
) |
|
2871 |
receiver:self. |
|
219 | 2872 |
|
490 | 2873 |
JavaBrowser notNil ifTrue:[ |
2874 |
(myMenu subMenuAt:#classes) |
|
2875 |
addLabels:(resources array:#('-' 'java browser')) |
|
2876 |
selectors:#(nil startJavaBrowser) |
|
2877 |
after:#startClassTreeView |
|
2878 |
]. |
|
2879 |
||
219 | 2880 |
myMenu at:#projects |
377 | 2881 |
putLabels:(resources array:#( |
2882 |
'new project' |
|
2883 |
'-' |
|
2884 |
'select project ...' |
|
2885 |
)) |
|
2886 |
selectors:#( |
|
2887 |
#newProject |
|
2888 |
nil |
|
2889 |
#selectProject |
|
2890 |
) |
|
2891 |
receiver:self. |
|
219 | 2892 |
|
2893 |
myMenu at:#settings |
|
377 | 2894 |
putLabels:(resources array:#( |
2895 |
'language ...' |
|
2896 |
'show keyboard mappings ...' |
|
2897 |
'view style ...' |
|
398 | 2898 |
'fonts ...' |
377 | 2899 |
'printer ...' |
2900 |
'messages ...' |
|
2901 |
'compilation ...' |
|
2902 |
'object memory ...' |
|
594 | 2903 |
'screen ...' |
377 | 2904 |
'misc ...' |
2905 |
)) |
|
2906 |
selectors:#( |
|
2907 |
#languageSetting |
|
2908 |
#keyboardSetting |
|
2909 |
#viewStyleSetting |
|
398 | 2910 |
#fontSettings |
377 | 2911 |
#printerSettings |
2912 |
#messageSettings |
|
2913 |
#compilerSettings |
|
2914 |
#memorySettings |
|
594 | 2915 |
#displaySettings |
377 | 2916 |
#miscSettings |
2917 |
) |
|
2918 |
receiver:self. |
|
219 | 2919 |
|
2920 |
self setupToolsMenu. |
|
2921 |
self setupDemoMenu. |
|
2922 |
||
2923 |
ActiveHelp notNil ifTrue:[ |
|
377 | 2924 |
l := #( |
2925 |
'ST/X documentation' |
|
497 | 2926 |
'class documentation' |
483 | 2927 |
'index' |
538 | 2928 |
'-' |
2929 |
'active help \c' |
|
377 | 2930 |
). |
2931 |
s := #( |
|
2932 |
#startDocumentationTool |
|
496 | 2933 |
#startClassDocumentation |
483 | 2934 |
#startDocumentationIndex |
538 | 2935 |
nil |
2936 |
#toggleActiveHelp: |
|
377 | 2937 |
) |
219 | 2938 |
] ifFalse:[ |
377 | 2939 |
l := #( |
2940 |
'ST/X documentation' |
|
497 | 2941 |
'class documentation' |
483 | 2942 |
'index' |
377 | 2943 |
). |
2944 |
s := #( |
|
2945 |
#startDocumentationTool |
|
496 | 2946 |
#startClassDocumentation |
483 | 2947 |
#startDocumentationIndex |
377 | 2948 |
) |
219 | 2949 |
]. |
2950 |
||
2951 |
myMenu at:#help |
|
377 | 2952 |
putLabels:(resources array:l) |
2953 |
selectors:s |
|
2954 |
receiver:self. |
|
219 | 2955 |
|
2956 |
(ActiveHelp notNil |
|
2957 |
and:[ActiveHelp isActive]) ifTrue:[ |
|
377 | 2958 |
(myMenu menuAt:#help) checkToggleAt:#toggleActiveHelp: put:true |
219 | 2959 |
]. |
377 | 2960 |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2961 |
self disableDangerousMenuItemsInRemoteLauncher |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2962 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
2963 |
"Modified: 5.7.1996 / 17:01:43 / cg" |
93 | 2964 |
! |
2965 |
||
219 | 2966 |
setupOtherViewsIn:aTopView |
2967 |
"a hook - allows redefinition in your personal subclass. |
|
2968 |
For example, add a clock:" |
|
2969 |
||
2970 |
" |
|
2971 |
|sz clock space halfSpace| |
|
2972 |
||
2973 |
sz := buttonPanel innerHeight - (buttonPanel level abs*2). |
|
2974 |
space := View viewSpacing. |
|
2975 |
halfSpace := space // 2. |
|
93 | 2976 |
|
219 | 2977 |
buttonPanel rightInset:sz+(space * 2). |
93 | 2978 |
|
219 | 2979 |
clock := ClockView in:buttonPanel topView. |
2980 |
clock borderWidth:1. |
|
2981 |
clock showSeconds:false. |
|
2982 |
clock extent:(sz @ sz). |
|
2983 |
clock origin:(1.0 @ (buttonPanel origin y + halfSpace)). |
|
2984 |
clock leftInset:sz negated - 2 - halfSpace. |
|
2985 |
clock rightInset:halfSpace. |
|
2986 |
clock level:1. |
|
2987 |
" |
|
93 | 2988 |
! |
2989 |
||
2990 |
setupToolsMenu |
|
2991 |
"setup the tools pulldown menu" |
|
2992 |
||
2993 |
|m| |
|
2994 |
||
2995 |
myMenu at:#tools |
|
434 | 2996 |
putLabels:(resources array:#( |
2997 |
'workspace' |
|
2998 |
'-' |
|
2999 |
'monitors' |
|
3000 |
'-' |
|
3001 |
'view tree (all views)' |
|
3002 |
'view tree' |
|
3003 |
'inspect view' |
|
3004 |
'destroy view' |
|
3005 |
'-' |
|
3006 |
'hardcopy' |
|
3007 |
'-' |
|
3008 |
'misc' |
|
3009 |
)) |
|
3010 |
selectors:#( |
|
3011 |
#startWorkspace |
|
3012 |
nil |
|
3013 |
#monitors |
|
3014 |
nil |
|
3015 |
#startFullWindowTreeView |
|
3016 |
#startWindowTreeView |
|
3017 |
#viewInspect |
|
3018 |
#viewDestroy |
|
3019 |
nil |
|
3020 |
#hardcopy |
|
3021 |
nil |
|
3022 |
#misc |
|
3023 |
) |
|
3024 |
receiver:self. |
|
93 | 3025 |
|
3026 |
||
3027 |
m := myMenu menuAt:#tools. |
|
3028 |
m subMenuAt:#monitors |
|
3029 |
put:(PopUpMenu |
|
434 | 3030 |
labels:(resources array:#( |
3031 |
'process' |
|
3032 |
'memory' |
|
3033 |
'event view' |
|
3034 |
'event trace' |
|
3035 |
'-' |
|
3036 |
'memory usage' |
|
3037 |
)) |
|
3038 |
selectors:#( |
|
3039 |
#startProcessMonitor |
|
3040 |
#startMemoryMonitor |
|
3041 |
#startEventMonitor |
|
3042 |
#startStopEventTrace |
|
3043 |
nil |
|
3044 |
#startMemoryUsageView |
|
3045 |
) |
|
3046 |
receiver:self). |
|
93 | 3047 |
|
120 | 3048 |
m subMenuAt:#misc |
3049 |
put:(PopUpMenu |
|
434 | 3050 |
labels:(resources array:#( |
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3051 |
'garbage collect' |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3052 |
'garbage collect & compress' |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3053 |
'-' |
434 | 3054 |
'remove all break/trace points' |
3055 |
)) |
|
3056 |
selectors:#( |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3057 |
#garbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3058 |
#compressingGarbageCollect |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3059 |
nil |
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3060 |
#removeAllBreakAndTracePoints |
434 | 3061 |
) |
3062 |
receiver:self). |
|
120 | 3063 |
|
93 | 3064 |
m subMenuAt:#hardcopy |
3065 |
put:(PopUpMenu |
|
434 | 3066 |
labels:(resources array:#( |
3067 |
'screen' |
|
3068 |
'area' |
|
3069 |
'view' |
|
3070 |
)) |
|
3071 |
selectors:#( |
|
3072 |
#fullScreenHardcopy |
|
3073 |
#screenHardcopy |
|
3074 |
#viewHardcopy |
|
3075 |
) |
|
3076 |
receiver:self). |
|
93 | 3077 |
|
537
9af64613ec8c
added garbageCollect to tools menu
Claus Gittinger <cg@exept.de>
parents:
536
diff
changeset
|
3078 |
"Modified: 12.5.1996 / 15:29:46 / cg" |
90 | 3079 |
! |
3080 |
||
219 | 3081 |
setupTranscriptIn:aView |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3082 |
|v launcher| |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3083 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3084 |
"/ check if this is an additional launcher on a remote display. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3085 |
"/ if so, do not close the real launcher. |
107 | 3086 |
|
219 | 3087 |
(Transcript notNil and:[Transcript ~~ Stderr]) ifTrue:[ |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3088 |
isMainLauncher ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3089 |
launcher := Transcript topView application |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3090 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3091 |
launcher := self class current. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3092 |
]. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3093 |
launcher notNil ifTrue:[ |
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
3094 |
launcher window graphicsDevice == device ifTrue:[ |
661 | 3095 |
OpenLaunchers remove:launcher ifAbsent:nil. |
3096 |
launcher window destroy. |
|
3097 |
] |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3098 |
] |
110 | 3099 |
]. |
3100 |
||
219 | 3101 |
v := HVScrollableView |
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3102 |
for:TextCollector |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3103 |
miniScrollerH:true |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3104 |
miniScrollerV:false |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3105 |
in:aView. |
93 | 3106 |
|
219 | 3107 |
v origin:(0.0 @ (buttonPanel corner y + View viewSpacing)) |
3108 |
corner:(1.0 @ 1.0). |
|
3109 |
transcript := v scrolledView. |
|
660
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3110 |
|
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3111 |
isMainLauncher ifTrue:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3112 |
transcript beTranscript. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3113 |
] ifFalse:[ |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3114 |
transcript showCR:'**************** Notice ***********************'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3115 |
transcript showCR:'** this is NOT the Transcript **'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3116 |
transcript showCR:'** The real Transcript is on the main screen **'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3117 |
transcript showCR:'** **'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3118 |
transcript showCR:'** Menus affecting common state are disabled **'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3119 |
transcript showCR:'***********************************************'. |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3120 |
] |
cb5a90c05873
in multiscreen applications: allow slaveLaunchers with stripped
Claus Gittinger <cg@exept.de>
parents:
659
diff
changeset
|
3121 |
|
662
b5efd05fa256
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
661
diff
changeset
|
3122 |
"Modified: 5.7.1996 / 17:55:15 / cg" |
94 | 3123 |
! |
3124 |
||
219 | 3125 |
setupViewsIn:topView |
3126 |
"create the pulldown menu, buttonPanel and transcript view" |
|
86 | 3127 |
|
219 | 3128 |
|tFont| |
131 | 3129 |
|
219 | 3130 |
topView model:self. |
86 | 3131 |
|
219 | 3132 |
myMenu := PullDownMenu in:topView. |
3133 |
myMenu origin:0.0 @ 0.0 corner:(1.0 @ myMenu height). |
|
86 | 3134 |
|
219 | 3135 |
self setupMenu. |
3136 |
self setupButtonPanelIn:topView. |
|
3137 |
self setupTranscriptIn:topView. |
|
3138 |
self setupInfoViewIn:topView. |
|
3139 |
self setupOtherViewsIn:topView. |
|
118 | 3140 |
|
219 | 3141 |
tFont := transcript font. |
3142 |
topView extent:(((tFont widthOf:'3')*60) max:myMenu preferredExtent x) |
|
3143 |
@ |
|
3144 |
((tFont height) * 20). |
|
118 | 3145 |
|
219 | 3146 |
" |
3147 |
NewLauncher open |
|
3148 |
" |
|
86 | 3149 |
! ! |
3150 |
||
3151 |
!NewLauncher methodsFor:'private'! |
|
3152 |
||
406 | 3153 |
fontBoxForEncoding:encodingMatch |
3154 |
|box defaultFont y b |
|
3155 |
labelDef buttonDef listDef menuDef textDef |
|
3156 |
models labels allOfThem filter| |
|
3157 |
||
3158 |
encodingMatch notNil ifTrue:[ |
|
3159 |
filter := [:f | f encoding notNil |
|
3160 |
and:[encodingMatch match:f encoding]]. |
|
3161 |
]. |
|
3162 |
||
3163 |
models := OrderedCollection new. |
|
3164 |
labels := OrderedCollection new. |
|
3165 |
||
3166 |
models add:(allOfThem := nil asValue). |
|
3167 |
models add:(labelDef := Label defaultFont asValue). |
|
3168 |
models add:(buttonDef := Button defaultFont asValue). |
|
3169 |
models add:(listDef := SelectionInListView defaultFont asValue). |
|
3170 |
models add:(menuDef := MenuView defaultFont asValue). |
|
3171 |
models add:(textDef := TextView defaultFont asValue). |
|
3172 |
||
3173 |
box := Dialog new. |
|
3174 |
box label:(resources string:'Font settings'). |
|
3175 |
||
3176 |
models |
|
3177 |
with:(resources array:#('all' 'labels' 'buttons' 'lists' 'menus' 'edit text')) |
|
3178 |
do:[:model :title | |
|
427 | 3179 |
|y2 lbl f i| |
406 | 3180 |
|
3181 |
f := model value. |
|
3182 |
||
3183 |
(box addTextLabel:title) adjust:#left. |
|
3184 |
||
3185 |
y := box yPosition. |
|
631
76013574eb04
Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents:
630
diff
changeset
|
3186 |
b := box addComponent:(Button label:(resources string:'change ...')) tabable:true. |
406 | 3187 |
b relativeExtent:nil; extent:(b preferredExtent). |
3188 |
y2 := box yPosition. |
|
3189 |
box yPosition:y. |
|
427 | 3190 |
i := box leftIndent. |
406 | 3191 |
box leftIndent:(b widthIncludingBorder + View viewSpacing). |
3192 |
(lbl := box addTextLabel:'') |
|
3193 |
adjust:#left; |
|
3194 |
font:(model value); |
|
3195 |
labelChannel:(BlockValue |
|
3196 |
with:[:v | |f| |
|
3197 |
f := v value. |
|
3198 |
f isNil ifTrue:[ |
|
3199 |
'' |
|
3200 |
] ifFalse:[ |
|
3201 |
f userFriendlyName |
|
3202 |
] |
|
3203 |
] |
|
3204 |
argument:model). |
|
3205 |
labels add:lbl. |
|
3206 |
||
427 | 3207 |
box leftIndent:i. |
406 | 3208 |
box yPosition:(box yPosition max:y2). |
3209 |
box addVerticalSpace. |
|
3210 |
box addHorizontalLine. |
|
3211 |
box addVerticalSpace. |
|
3212 |
||
3213 |
b action:[ |
|
3214 |
|f| |
|
3215 |
||
3216 |
f := FontPanel |
|
3217 |
fontFromUserInitial:(model value) |
|
3218 |
title:(resources string:'font for %1' with:title) |
|
3219 |
filter:filter. |
|
3220 |
f notNil ifTrue:[ |
|
3221 |
model == allOfThem ifTrue:[ |
|
3222 |
models do:[:m | m value:f]. |
|
3223 |
labels do:[:l | l font:f] |
|
3224 |
] ifFalse:[ |
|
3225 |
model value:f. |
|
3226 |
lbl font:f. |
|
3227 |
]. |
|
3228 |
] |
|
3229 |
]. |
|
3230 |
model == allOfThem ifTrue:[ |
|
3231 |
box addVerticalSpace |
|
3232 |
] |
|
3233 |
]. |
|
3234 |
||
3235 |
box addAbortButton; addOkButton. |
|
3236 |
(box addButton:(Button label:(resources string:'defaults')) before:nil) |
|
3237 |
action:[ |
|
3238 |
"/ fetch defaults |
|
3239 |
View updateAllStyleCaches. |
|
3240 |
labelDef value: Label defaultFont. |
|
3241 |
buttonDef value: Button defaultFont. |
|
3242 |
listDef value: SelectionInListView defaultFont. |
|
3243 |
menuDef value: MenuView defaultFont. |
|
3244 |
textDef value: TextView defaultFont. |
|
3245 |
]. |
|
3246 |
||
3247 |
box open. |
|
3248 |
box accepted ifTrue:[ |
|
3249 |
Label defaultFont:labelDef value. |
|
3250 |
Button defaultFont:buttonDef value. |
|
3251 |
Toggle defaultFont:buttonDef value. |
|
3252 |
SelectionInListView defaultFont:listDef value. |
|
3253 |
MenuView defaultFont:menuDef value. |
|
3254 |
PullDownMenu defaultFont:menuDef value. |
|
3255 |
TextView defaultFont:textDef value. |
|
3256 |
EditTextView defaultFont:textDef value. |
|
3257 |
CodeView defaultFont:textDef value. |
|
3258 |
]. |
|
592
5a03a69bc5a3
oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents:
591
diff
changeset
|
3259 |
box destroy. |
406 | 3260 |
^ box accepted |
3261 |
||
3262 |
"Created: 27.2.1996 / 01:44:16 / cg" |
|
592
5a03a69bc5a3
oops - menuAction is now called with arg if there is one
Claus Gittinger <cg@exept.de>
parents:
591
diff
changeset
|
3263 |
"Modified: 30.5.1996 / 09:18:57 / cg" |
631
76013574eb04
Settings.Fonts menu: Add ... to Change button labels.
Stefan Vogel <sv@exept.de>
parents:
630
diff
changeset
|
3264 |
"Modified: 17.6.1996 / 13:38:48 / stefan" |
406 | 3265 |
! |
3266 |
||
219 | 3267 |
pickAView |
3268 |
|v| |
|
3269 |
||
3270 |
(Delay forSeconds:1) wait. |
|
3271 |
v := Screen current viewFromUser. |
|
3272 |
v isNil ifTrue:[ |
|
3273 |
self warn:'sorry, this is not a smalltalk view'. |
|
3274 |
^ nil |
|
3275 |
]. |
|
3276 |
^ v |
|
3277 |
! |
|
3278 |
||
106 | 3279 |
reopenLauncher |
3280 |
"for now (since style & language settings currently do |
|
3281 |
not affect living views ...)" |
|
3282 |
||
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3283 |
|contents fontPref enc fontList newDefault newLauncher| |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3284 |
|
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3285 |
fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'. |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3286 |
enc := MenuView defaultFont encoding. |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3287 |
(fontPref match:enc) ifFalse:[ |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3288 |
(self confirm:'menu font is not ' , fontPref , '-encoded.\\Change it ?' withCRs) |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3289 |
ifTrue:[ |
406 | 3290 |
self fontBoxForEncoding:fontPref |
397
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3291 |
] |
799d6b395675
check for good font when changing language; added defaultFont menu
Claus Gittinger <cg@exept.de>
parents:
382
diff
changeset
|
3292 |
]. |
106 | 3293 |
|
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3294 |
contents := transcript endEntry; list. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3295 |
newLauncher := self class open. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3296 |
newLauncher window waitUntilVisible. |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3297 |
newLauncher transcript list:contents; hideCursor; scrollToBottom; cursorToEnd; showCursor |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3298 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3299 |
"Modified: 5.7.1996 / 14:00:40 / cg" |
106 | 3300 |
! |
3301 |
||
100 | 3302 |
saveAllViews |
86 | 3303 |
"tell each topview that we are going to terminate and give it chance |
3304 |
to save its contents." |
|
3305 |
||
3306 |
ObjectMemory changed:#aboutToExit |
|
3307 |
! |
|
3308 |
||
93 | 3309 |
saveScreenImage:anImage defaultName:defaultName |
3310 |
"save an image into a file |
|
3311 |
- ask user for filename using a fileSelectionBox." |
|
3312 |
||
3313 |
|fileName| |
|
3314 |
||
3315 |
fileName := Dialog |
|
382 | 3316 |
requestFileName:(resources string:'save image in:') |
3317 |
default:(defaultName , '.tiff') |
|
3318 |
ok:(resources string:'save') |
|
3319 |
abort:(resources string:'cancel') |
|
3320 |
pattern:'*.tiff'. |
|
93 | 3321 |
|
3322 |
fileName notNil ifTrue:[ |
|
382 | 3323 |
anImage saveOn:fileName |
93 | 3324 |
]. |
382 | 3325 |
|
3326 |
"Modified: 21.2.1996 / 13:09:28 / cg" |
|
86 | 3327 |
! ! |
3328 |
||
219 | 3329 |
!NewLauncher methodsFor:'queries'! |
90 | 3330 |
|
219 | 3331 |
processName |
3332 |
"for monitors only - my name" |
|
142 | 3333 |
|
219 | 3334 |
^ 'ST/X Launcher' |
659
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3335 |
! |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3336 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3337 |
transcript |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3338 |
"my transcript" |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3339 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3340 |
^ transcript |
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3341 |
|
324b82dad016
access transcript via my local; use current screen for aboutIcon setup
Claus Gittinger <cg@exept.de>
parents:
658
diff
changeset
|
3342 |
"Created: 5.7.1996 / 13:04:36 / cg" |
90 | 3343 |
! ! |
3344 |
||
635 | 3345 |
!NewLauncher class methodsFor:'documentation'! |
86 | 3346 |
|
219 | 3347 |
version |
699
a0299969a8fd
view now fetches value from model immediately -
Claus Gittinger <cg@exept.de>
parents:
698
diff
changeset
|
3348 |
^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.180 1996-08-28 14:17:51 cg Exp $' |
86 | 3349 |
! ! |