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