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