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