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