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