AbstractLauncherApplication.st
changeset 2048 f8c010698b75
parent 2047 bb2070a26bd2
child 2064 ce441db4cd5a
equal deleted inserted replaced
2047:bb2070a26bd2 2048:f8c010698b75
   552     component adjust:#left.
   552     component adjust:#left.
   553     box addInputFieldOn:valueHolder tabable:true.
   553     box addInputFieldOn:valueHolder tabable:true.
   554 
   554 
   555     box addVerticalSpace:10.
   555     box addVerticalSpace:10.
   556     box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'.
   556     box addHelpButtonFor:'programming/language.html#RESOURCEDEFS'.
   557     box addAbortButton; addOkButton.
   557     box addAbortAndOkButtons.
   558 
   558 
   559     box showAtPointer.
   559     box showAtPointer.
   560     box destroy.
   560     box destroy.
   561 
   561 
   562     box accepted ifTrue:[
   562     box accepted ifTrue:[
  1368     box leftIndent:oldIndent.
  1368     box leftIndent:oldIndent.
  1369     box yPosition:(yMax max: box yPosition).
  1369     box yPosition:(yMax max: box yPosition).
  1370 
  1370 
  1371     box 
  1371     box 
  1372         addHelpButtonFor:'Launcher/compilerSettings.html';
  1372         addHelpButtonFor:'Launcher/compilerSettings.html';
  1373         addAbortButton; 
  1373         addAbortAndOkButtons.
  1374         addOkButton.
       
  1375 
  1374 
  1376     warnEnabler value.
  1375     warnEnabler value.
  1377     box open.
  1376     box open.
  1378 
  1377 
  1379     box accepted ifTrue:[
  1378     box accepted ifTrue:[
  1435 
  1434 
  1436     resources := requestor class classResources.
  1435     resources := requestor class classResources.
  1437 
  1436 
  1438     listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
  1437     listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
  1439     listOfSizes == #default ifTrue:[
  1438     listOfSizes == #default ifTrue:[
  1440 	"/ nothing in resource file; offer at least some.
  1439         "/ nothing in resource file; offer at least some.
  1441 	sizeInfos := #(
  1440         sizeInfos := #(
  1442 			   ( '11.3'' (235mm x 175mm) LCD'   (235 175)    )
  1441                            ( '11.3'' (235mm x 175mm) LCD'   (235 175)    )
  1443 			   ( '17''   (325mm x 245mm)'       (325 245)    )
  1442                            ( '17''   (325mm x 245mm)'       (325 245)    )
  1444 			   ( '19''   (340mm x 270mm)'       (340 270)    )
  1443                            ( '19''   (340mm x 270mm)'       (340 270)    )
  1445 			   ( '20''   (350mm x 280mm)'       (350 280)    )
  1444                            ( '20''   (350mm x 280mm)'       (350 280)    )
  1446 			   ( '21''   (365mm x 285mm)'       (365 285)    )
  1445                            ( '21''   (365mm x 285mm)'       (365 285)    )
  1447 		       ).
  1446                        ).
  1448     ] ifFalse:[
  1447     ] ifFalse:[
  1449 	sizeInfos := resources array:listOfSizes.
  1448         sizeInfos := resources array:listOfSizes.
  1450     ].
  1449     ].
  1451     sizeNames := sizeInfos collect:[:entry | entry at:1].
  1450     sizeNames := sizeInfos collect:[:entry | entry at:1].
  1452     sizes := sizeInfos collect:[:entry | entry at:2].
  1451     sizes := sizeInfos collect:[:entry | entry at:2].
  1453 
  1452 
  1454     screen := Screen current.
  1453     screen := Screen current.
  1470     clipEncodingList selectionIndex:(clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1).
  1469     clipEncodingList selectionIndex:(clipEncodingSyms indexOf:screen clipBoardEncoding ifAbsent:1).
  1471 
  1470 
  1472     ditherList := SelectionInList new.
  1471     ditherList := SelectionInList new.
  1473 
  1472 
  1474     (visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
  1473     (visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
  1475 	ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
  1474         ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
  1476 	ditherSyms := #(threshold ordered floydSteinberg).
  1475         ditherSyms := #(threshold ordered floydSteinberg).
  1477     ] ifFalse:[
  1476     ] ifFalse:[
  1478 	visual ~~ #TrueColor ifTrue:[
  1477         visual ~~ #TrueColor ifTrue:[
  1479 	    ditherStyles := #('nearest color' 'error diffusion').
  1478             ditherStyles := #('nearest color' 'error diffusion').
  1480 	    ditherSyms := #(ordered floydSteinberg).
  1479             ditherSyms := #(ordered floydSteinberg).
  1481 	]
  1480         ]
  1482     ].
  1481     ].
  1483     ditherSyms notNil ifTrue:[    
  1482     ditherSyms notNil ifTrue:[    
  1484 	ditherList list:ditherStyles.
  1483         ditherList list:ditherStyles.
  1485 	ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
  1484         ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
  1486     ].
  1485     ].
  1487 
  1486 
  1488     box := DialogBox new.
  1487     box := DialogBox new.
  1489     box label:(resources string:'Display screen settings').
  1488     box label:(resources string:'Display screen settings').
  1490 
  1489 
  1491     (box addTextLabel:(resources string:'Actual visible screen area:'))
  1490     (box addTextLabel:(resources string:'Actual visible screen area:'))
  1492 	adjust:#left.
  1491         adjust:#left.
  1493 
  1492 
  1494     (box addPopUpList:(resources string:'common sizes:') on:sizeList)
  1493     (box addPopUpList:(resources string:'common sizes:') on:sizeList)
  1495 	label:'monitor size'.
  1494         label:'monitor size'.
  1496 
  1495 
  1497     idx := sizes findFirst:[:entry |
  1496     idx := sizes findFirst:[:entry |
  1498 				((entry at:1) = sizeX value)
  1497                                 ((entry at:1) = sizeX value)
  1499 				and:[((entry at:2) = sizeY value)]
  1498                                 and:[((entry at:2) = sizeY value)]
  1500 			   ].
  1499                            ].
  1501     idx ~~ 0 ifTrue:[
  1500     idx ~~ 0 ifTrue:[
  1502 	sizeList selectionIndex:idx
  1501         sizeList selectionIndex:idx
  1503     ].
  1502     ].
  1504 
  1503 
  1505     sizeList onChangeSend:#value to:[
  1504     sizeList onChangeSend:#value to:[
  1506 					|idx|
  1505                                         |idx|
  1507 
  1506 
  1508 					idx := sizeList selectionIndex.
  1507                                         idx := sizeList selectionIndex.
  1509 					sizeX value:((sizes at:idx) at:1).
  1508                                         sizeX value:((sizes at:idx) at:1).
  1510 					sizeY value:((sizes at:idx) at:2).
  1509                                         sizeY value:((sizes at:idx) at:2).
  1511 				    ].
  1510                                     ].
  1512 
  1511 
  1513     y := box yPosition.
  1512     y := box yPosition.
  1514     component := box addTextLabel:(resources string:'screen size:').
  1513     component := box addTextLabel:(resources string:'screen size:').
  1515     component width:0.3; adjust:#right; borderWidth:0.
  1514     component width:0.3; adjust:#right; borderWidth:0.
  1516 
  1515 
  1517     box yPosition:y.
  1516     box yPosition:y.
  1518     component := box addInputFieldOn:nil tabable:true.
  1517     component := box addInputFieldOn:nil tabable:true.
  1519     component width:0.25; left:0.3; 
  1518     component width:0.25; left:0.3; 
  1520 	      immediateAccept:false; acceptOnLeave:false; 
  1519               immediateAccept:false; acceptOnLeave:false; 
  1521 	      cursorMovementWhenUpdating:#beginOfLine;
  1520               cursorMovementWhenUpdating:#beginOfLine;
  1522 	      converter:(PrintConverter new initForInteger);
  1521               converter:(PrintConverter new initForInteger);
  1523 	      model:sizeX.
  1522               model:sizeX.
  1524 
  1523 
  1525     box yPosition:y.
  1524     box yPosition:y.
  1526     component := box addTextLabel:(' x ').
  1525     component := box addTextLabel:(' x ').
  1527     component width:0.1; left:0.55; adjust:#center; borderWidth:0.
  1526     component width:0.1; left:0.55; adjust:#center; borderWidth:0.
  1528 
  1527 
  1529     box yPosition:y.
  1528     box yPosition:y.
  1530     component := box addInputFieldOn:nil tabable:true.
  1529     component := box addInputFieldOn:nil tabable:true.
  1531     component width:0.25; left:0.65; 
  1530     component width:0.25; left:0.65; 
  1532 	      immediateAccept:false; acceptOnLeave:false; 
  1531               immediateAccept:false; acceptOnLeave:false; 
  1533 	      cursorMovementWhenUpdating:#beginOfLine;
  1532               cursorMovementWhenUpdating:#beginOfLine;
  1534 	      converter:(PrintConverter new initForInteger);
  1533               converter:(PrintConverter new initForInteger);
  1535 	      model:sizeY.
  1534               model:sizeY.
  1536 
  1535 
  1537     box yPosition:y.
  1536     box yPosition:y.
  1538     component := box addTextLabel:('(mm)').
  1537     component := box addTextLabel:('(mm)').
  1539     component width:0.1; left:0.9; adjust:#center; borderWidth:0.
  1538     component width:0.1; left:0.9; adjust:#center; borderWidth:0.
  1540 
  1539 
  1541     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  1540     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  1542 
  1541 
  1543     (box addTextLabel:(resources string:'Screen: depth: %1 visual: %2  (%3)'
  1542     (box addTextLabel:(resources string:'Screen: depth: %1 visual: %2  (%3)'
  1544 				 with:Screen current depth printString
  1543                                  with:Screen current depth printString
  1545 				 with:Screen current visualType
  1544                                  with:Screen current visualType
  1546 				 with:Screen current serverVendor))
  1545                                  with:Screen current serverVendor))
  1547 	adjust:#left.
  1546         adjust:#left.
  1548 
  1547 
  1549     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  1548     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  1550 
  1549 
  1551     box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
  1550     box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
  1552 
  1551 
  1553     visual == #PseudoColor ifTrue:[
  1552     visual == #PseudoColor ifTrue:[
  1554 	box addVerticalSpace.
  1553         box addVerticalSpace.
  1555 	component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette.
  1554         component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette.
  1556 
  1555 
  1557 	box addVerticalSpace.
  1556         box addVerticalSpace.
  1558 	component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
  1557         component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
  1559     ].
  1558     ].
  1560 
  1559 
  1561     ditherSyms notNil ifTrue:[
  1560     ditherSyms notNil ifTrue:[
  1562 	box addVerticalSpace.
  1561         box addVerticalSpace.
  1563 	component := box addPopUpList:(resources string:'image display:') on:ditherList.
  1562         component := box addPopUpList:(resources string:'image display:') on:ditherList.
  1564 	component defaultLabel:'image display'.
  1563         component defaultLabel:'image display'.
  1565 	component superView horizontalLayout:#leftSpace.
  1564         component superView horizontalLayout:#leftSpace.
  1566     ].
  1565     ].
  1567 
  1566 
  1568     box addVerticalSpace.
  1567     box addVerticalSpace.
  1569     box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.
  1568     box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.
  1570 
  1569 
  1572 
  1571 
  1573     component := box addPopUpList:(resources string:'clipBoard encoding:') on:clipEncodingList.
  1572     component := box addPopUpList:(resources string:'clipBoard encoding:') on:clipEncodingList.
  1574     component superView horizontalLayout:#leftSpace.
  1573     component superView horizontalLayout:#leftSpace.
  1575 
  1574 
  1576     box 
  1575     box 
  1577 	addHelpButtonFor:'Launcher/screenSettings.html';
  1576         addHelpButtonFor:'Launcher/screenSettings.html';
  1578 	addAbortButton; addOkButton.
  1577         addAbortAndOkButtons.
  1579     box open.
  1578     box open.
  1580 
  1579 
  1581     box accepted ifTrue:[
  1580     box accepted ifTrue:[
  1582 	Image flushDeviceImages.
  1581         Image flushDeviceImages.
  1583 
  1582 
  1584 	screen visualType == #PseudoColor ifTrue:[
  1583         screen visualType == #PseudoColor ifTrue:[
  1585 	    useFixPalette value ifTrue:[
  1584             useFixPalette value ifTrue:[
  1586 		Color colorAllocationFailSignal handle:[:ex |
  1585                 Color colorAllocationFailSignal handle:[:ex |
  1587 		    self warn:(resources string:'Could not allocate colors.').
  1586                     self warn:(resources string:'Could not allocate colors.').
  1588 		] do:[
  1587                 ] do:[
  1589 		    Color getColorsRed:4 green:8 blue:4 on:screen
  1588                     Color getColorsRed:4 green:8 blue:4 on:screen
  1590 		]
  1589                 ]
  1591 	    ] ifFalse:[
  1590             ] ifFalse:[
  1592 		screen releaseFixColors
  1591                 screen releaseFixColors
  1593 	    ].
  1592             ].
  1594 
  1593 
  1595 	    useFixGrayPalette value ifTrue:[
  1594             useFixGrayPalette value ifTrue:[
  1596 		Color colorAllocationFailSignal handle:[:ex |
  1595                 Color colorAllocationFailSignal handle:[:ex |
  1597 		    self warn:(resources string:'Could not allocate colors.').
  1596                     self warn:(resources string:'Could not allocate colors.').
  1598 		] do:[
  1597                 ] do:[
  1599 		    Color getGrayColors:32 on:screen
  1598                     Color getGrayColors:32 on:screen
  1600 		]
  1599                 ]
  1601 	    ] ifFalse:[
  1600             ] ifFalse:[
  1602 		screen releaseFixGrayColors
  1601                 screen releaseFixGrayColors
  1603 	    ]
  1602             ]
  1604 	].
  1603         ].
  1605 	screen hasColors:isColorMonitor value.
  1604         screen hasColors:isColorMonitor value.
  1606 	screen widthInMillimeter:sizeX value.
  1605         screen widthInMillimeter:sizeX value.
  1607 	screen heightInMillimeter:sizeY value.
  1606         screen heightInMillimeter:sizeY value.
  1608 
  1607 
  1609 	screen supportsDeepIcons:deepIcons value.
  1608         screen supportsDeepIcons:deepIcons value.
  1610 	ditherSyms notNil ifTrue:[
  1609         ditherSyms notNil ifTrue:[
  1611 	    Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
  1610             Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
  1612 	].
  1611         ].
  1613 
  1612 
  1614 	requestor withWaitCursorDo:[
  1613         requestor withWaitCursorDo:[
  1615 	    View defaultStyle:(View defaultStyle).
  1614             View defaultStyle:(View defaultStyle).
  1616 	].
  1615         ].
  1617 
  1616 
  1618 	screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
  1617         screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
  1619     ].
  1618     ].
  1620     box destroy
  1619     box destroy
  1621 
  1620 
  1622     "Modified: 9.9.1996 / 22:43:04 / stefan"
  1621     "Modified: 9.9.1996 / 22:43:04 / stefan"
  1623     "Modified: 21.7.1997 / 19:26:49 / cg"
  1622     "Modified: 21.7.1997 / 19:26:49 / cg"
  1647 
  1646 
  1648     box addHorizontalLine.
  1647     box addHorizontalLine.
  1649 
  1648 
  1650     box 
  1649     box 
  1651         addHelpButtonFor:'Launcher/editSettings.html';
  1650         addHelpButtonFor:'Launcher/editSettings.html';
  1652         addAbortButton; 
  1651         addAbortAndOkButtons.
  1653         addOkButton.
       
  1654 
  1652 
  1655     "/
  1653     "/
  1656     "/ show the box ...
  1654     "/ show the box ...
  1657     "/
  1655     "/
  1658     box open.
  1656     box open.
  1754                                ]).
  1752                                ]).
  1755 
  1753 
  1756     "/ box addHorizontalLine.
  1754     "/ box addHorizontalLine.
  1757 
  1755 
  1758 "/    box addHelpButtonFor:'Launcher/javaSettings.html'.
  1756 "/    box addHelpButtonFor:'Launcher/javaSettings.html'.
  1759     box addAbortButton; addOkButton.
  1757     box addAbortAndOkButtons.
  1760     box open.
  1758     box open.
  1761 
  1759 
  1762     box accepted ifTrue:[
  1760     box accepted ifTrue:[
  1763         JavaMethod forceByteCodeDisplay:showJavaByteCode value. 
  1761         JavaMethod forceByteCodeDisplay:showJavaByteCode value. 
  1764         JavaVM audioEnabled:audio value.
  1762         JavaVM audioEnabled:audio value.
  2069 
  2067 
  2070 You have been warned.') adjust:#left.
  2068 You have been warned.') adjust:#left.
  2071     box addHorizontalLine.
  2069     box addHorizontalLine.
  2072 
  2070 
  2073     component := box 
  2071     component := box 
  2074 		    addLabelledInputField:(resources string:'size of newSpace:')
  2072                     addLabelledInputField:(resources string:'size of newSpace:')
  2075 		    adjust:#right
  2073                     adjust:#right
  2076 		    on:nil "/ newSpaceSize 
  2074                     on:nil "/ newSpaceSize 
  2077 		    tabable:true
  2075                     tabable:true
  2078 		    separateAtX:0.7.
  2076                     separateAtX:0.7.
  2079     component acceptOnLeave:false.
  2077     component acceptOnLeave:false.
  2080     component converter:(PrintConverter new initForNumber).
  2078     component converter:(PrintConverter new initForNumber).
  2081     component model:newSpaceSize.
  2079     component model:newSpaceSize.
  2082     fields add:component.
  2080     fields add:component.
  2083 
  2081 
  2084     box addHorizontalLine.
  2082     box addHorizontalLine.
  2085 
  2083 
  2086 
  2084 
  2087     component := box 
  2085     component := box 
  2088 		    addLabelledInputField:(resources string:'incremental GC allocation trigger:')
  2086                     addLabelledInputField:(resources string:'incremental GC allocation trigger:')
  2089 		    adjust:#right
  2087                     adjust:#right
  2090 		    on:nil "/ igcLimit 
  2088                     on:nil "/ igcLimit 
  2091 		    tabable:true
  2089                     tabable:true
  2092 		    separateAtX:0.7.
  2090                     separateAtX:0.7.
  2093     component acceptOnLeave:false.
  2091     component acceptOnLeave:false.
  2094     component converter:(PrintConverter new initForNumber).
  2092     component converter:(PrintConverter new initForNumber).
  2095     component model:igcLimit.
  2093     component model:igcLimit.
  2096     fields add:component.
  2094     fields add:component.
  2097 
  2095 
  2098     box addTextLabel:'(start IGC whenever this amount has been allocated)'.
  2096     box addTextLabel:'(start IGC whenever this amount has been allocated)'.
  2099     box addHorizontalLine.
  2097     box addHorizontalLine.
  2100 
  2098 
  2101     component := box 
  2099     component := box 
  2102 		    addLabelledInputField:(resources string:'incremental GC freespace trigger:')
  2100                     addLabelledInputField:(resources string:'incremental GC freespace trigger:')
  2103 		    adjust:#right
  2101                     adjust:#right
  2104 		    on:nil "/ igcFreeLimit 
  2102                     on:nil "/ igcFreeLimit 
  2105 		    tabable:true
  2103                     tabable:true
  2106 		    separateAtX:0.7.
  2104                     separateAtX:0.7.
  2107     component acceptOnLeave:false.
  2105     component acceptOnLeave:false.
  2108     component converter:(PrintConverter new initForNumber).
  2106     component converter:(PrintConverter new initForNumber).
  2109     component model:igcFreeLimit.
  2107     component model:igcFreeLimit.
  2110     fields add:component.
  2108     fields add:component.
  2111 
  2109 
  2112     box addTextLabel:'(start IGC whenever freespace drops below this)'.
  2110     box addTextLabel:'(start IGC whenever freespace drops below this)'.
  2113     box addHorizontalLine.
  2111     box addHorizontalLine.
  2114 
  2112 
  2115     component := box 
  2113     component := box 
  2116 		    addLabelledInputField:(resources string:'incremental GC amount:')
  2114                     addLabelledInputField:(resources string:'incremental GC amount:')
  2117 		    adjust:#right
  2115                     adjust:#right
  2118 		    on:nil "/ igcFreeAmount 
  2116                     on:nil "/ igcFreeAmount 
  2119 		    tabable:true
  2117                     tabable:true
  2120 		    separateAtX:0.7.
  2118                     separateAtX:0.7.
  2121     component acceptOnLeave:false.
  2119     component acceptOnLeave:false.
  2122     component converter:(PrintConverter new initForNumber).
  2120     component converter:(PrintConverter new initForNumber).
  2123     component model:igcFreeAmount.
  2121     component model:igcFreeAmount.
  2124     fields add:component.
  2122     fields add:component.
  2125 
  2123 
  2126     box addTextLabel:'(try to keep this amount for peak requests)'.
  2124     box addTextLabel:'(try to keep this amount for peak requests)'.
  2127     box addHorizontalLine.
  2125     box addHorizontalLine.
  2128 
  2126 
  2129     component := box 
  2127     component := box 
  2130 		    addLabelledInputField:(resources string:'oldspace increment:')
  2128                     addLabelledInputField:(resources string:'oldspace increment:')
  2131 		    adjust:#right
  2129                     adjust:#right
  2132 		    on:nil "/ oldIncr 
  2130                     on:nil "/ oldIncr 
  2133 		    tabable:true
  2131                     tabable:true
  2134 		    separateAtX:0.7.
  2132                     separateAtX:0.7.
  2135     component acceptOnLeave:false.
  2133     component acceptOnLeave:false.
  2136     component converter:(PrintConverter new initForNumber).
  2134     component converter:(PrintConverter new initForNumber).
  2137     component model:oldIncr.
  2135     component model:oldIncr.
  2138     fields add:component.
  2136     fields add:component.
  2139 
  2137 
  2140     box addTextLabel:'(increase oldSpace in chunks of this size)'.
  2138     box addTextLabel:'(increase oldSpace in chunks of this size)'.
  2141     box addHorizontalLine.
  2139     box addHorizontalLine.
  2142 
  2140 
  2143     component := box 
  2141     component := box 
  2144 		    addLabelledInputField:(resources string:'oldspace compress limit:')
  2142                     addLabelledInputField:(resources string:'oldspace compress limit:')
  2145 		    adjust:#right
  2143                     adjust:#right
  2146 		    on:nil "/ compressLimit 
  2144                     on:nil "/ compressLimit 
  2147 		    tabable:true
  2145                     tabable:true
  2148 		    separateAtX:0.7.
  2146                     separateAtX:0.7.
  2149     component acceptOnLeave:false.
  2147     component acceptOnLeave:false.
  2150     component converter:(PrintConverter new initForNumber).
  2148     component converter:(PrintConverter new initForNumber).
  2151     component model:compressLimit.
  2149     component model:compressLimit.
  2152     fields add:component.
  2150     fields add:component.
  2153 
  2151 
  2154     box addTextLabel:'(suppress compressing GC if more memory is in use)'.
  2152     box addTextLabel:'(suppress compressing GC if more memory is in use)'.
  2155     box addHorizontalLine.
  2153     box addHorizontalLine.
  2156 
  2154 
  2157     component := box 
  2155     component := box 
  2158 		    addLabelledInputField:(resources string:'stack limit:')
  2156                     addLabelledInputField:(resources string:'stack limit:')
  2159 		    adjust:#right
  2157                     adjust:#right
  2160 		    on:nil 
  2158                     on:nil 
  2161 		    tabable:true
  2159                     tabable:true
  2162 		    separateAtX:0.7.
  2160                     separateAtX:0.7.
  2163     component acceptOnLeave:false.
  2161     component acceptOnLeave:false.
  2164     component converter:(PrintConverter new initForNumber).
  2162     component converter:(PrintConverter new initForNumber).
  2165     component model:stackLimit.
  2163     component model:stackLimit.
  2166     fields add:component.
  2164     fields add:component.
  2167 
  2165 
  2168     box addTextLabel:'(trigger recursionInterrupt if more stack is used by a process)'.
  2166     box addTextLabel:'(trigger recursionInterrupt if more stack is used by a process)'.
  2169     box addHorizontalLine.
  2167     box addHorizontalLine.
  2170 
  2168 
  2171     ObjectMemory supportsJustInTimeCompilation ifTrue:[
  2169     ObjectMemory supportsJustInTimeCompilation ifTrue:[
  2172 	component := box 
  2170         component := box 
  2173 			addLabelledInputField:(resources string:'dynamic code limit:')
  2171                         addLabelledInputField:(resources string:'dynamic code limit:')
  2174 			adjust:#right
  2172                         adjust:#right
  2175 			on:nil
  2173                         on:nil
  2176 			tabable:true
  2174                         tabable:true
  2177 			separateAtX:0.7.
  2175                         separateAtX:0.7.
  2178 	component acceptOnLeave:false.
  2176         component acceptOnLeave:false.
  2179 	component converter:(PrintConverter new initForNumberOrNil).
  2177         component converter:(PrintConverter new initForNumberOrNil).
  2180 	component model:codeLimit.
  2178         component model:codeLimit.
  2181 	fields add:component.
  2179         fields add:component.
  2182 
  2180 
  2183 	box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
  2181         box addTextLabel:'(flush dynamic compiled code to stay within this limit)'.
  2184 	box addHorizontalLine.
  2182         box addHorizontalLine.
  2185 
  2183 
  2186 	component := box 
  2184         component := box 
  2187 			addLabelledInputField:(resources string:'dynamic code GC trigger:')
  2185                         addLabelledInputField:(resources string:'dynamic code GC trigger:')
  2188 			adjust:#right
  2186                         adjust:#right
  2189 			on:nil
  2187                         on:nil
  2190 			tabable:true
  2188                         tabable:true
  2191 			separateAtX:0.7.
  2189                         separateAtX:0.7.
  2192 	component acceptOnLeave:false.
  2190         component acceptOnLeave:false.
  2193 	component converter:(PrintConverter new initForNumberOrNil).
  2191         component converter:(PrintConverter new initForNumberOrNil).
  2194 	component model:codeTrigger.
  2192         component model:codeTrigger.
  2195 	fields add:component.
  2193         fields add:component.
  2196 
  2194 
  2197 	box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'.
  2195         box addTextLabel:'(start incremental GC whenever this amount of code has been allocated)'.
  2198 	box addHorizontalLine.
  2196         box addHorizontalLine.
  2199     ].
  2197     ].
  2200 
  2198 
  2201     box addAbortButton; addOkButton.
  2199     box addAbortAndOkButtons.
  2202     box
  2200     box
  2203 	addHelpButtonFor:'Launcher/memorySettings.html'.
  2201         addHelpButtonFor:'Launcher/memorySettings.html'.
  2204 
  2202 
  2205     "/
  2203     "/
  2206     "/ show the box ...
  2204     "/ show the box ...
  2207     "/
  2205     "/
  2208     box open.
  2206     box open.
  2209 
  2207 
  2210     "/
  2208     "/
  2211     "/ update system settings
  2209     "/ update system settings
  2212     "/
  2210     "/
  2213     box accepted ifTrue:[
  2211     box accepted ifTrue:[
  2214 	fields do:[:comp | comp accept].
  2212         fields do:[:comp | comp accept].
  2215 
  2213 
  2216 	igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
  2214         igcFreeAmount value ~~ ObjectMemory freeSpaceGCAmount ifTrue:[
  2217 	    ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
  2215             ObjectMemory freeSpaceGCAmount:igcFreeAmount value.
  2218 	].
  2216         ].
  2219 	igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
  2217         igcFreeLimit value ~~ ObjectMemory freeSpaceGCLimit ifTrue:[
  2220 	    ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
  2218             ObjectMemory freeSpaceGCLimit:igcFreeLimit value.
  2221 	].
  2219         ].
  2222 	igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
  2220         igcLimit value ~~ ObjectMemory incrementalGCLimit ifTrue:[
  2223 	    ObjectMemory incrementalGCLimit:igcLimit value.
  2221             ObjectMemory incrementalGCLimit:igcLimit value.
  2224 	].
  2222         ].
  2225 	newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
  2223         newSpaceSize value ~~ ObjectMemory newSpaceSize ifTrue:[
  2226 	    ObjectMemory newSpaceSize:newSpaceSize value.
  2224             ObjectMemory newSpaceSize:newSpaceSize value.
  2227 	].
  2225         ].
  2228 	oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
  2226         oldIncr value ~~ ObjectMemory oldSpaceIncrement ifTrue:[
  2229 	    ObjectMemory oldSpaceIncrement:oldIncr value.
  2227             ObjectMemory oldSpaceIncrement:oldIncr value.
  2230 	].
  2228         ].
  2231 	stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[
  2229         stackLimit value ~~ Process defaultMaximumStackSize ifTrue:[
  2232 	    Process defaultMaximumStackSize:stackLimit value.
  2230             Process defaultMaximumStackSize:stackLimit value.
  2233 	].
  2231         ].
  2234 	ObjectMemory oldSpaceCompressLimit:compressLimit value.
  2232         ObjectMemory oldSpaceCompressLimit:compressLimit value.
  2235 	ObjectMemory dynamicCodeLimit:codeLimit value.
  2233         ObjectMemory dynamicCodeLimit:codeLimit value.
  2236 	ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
  2234         ObjectMemory dynamicCodeGCTrigger:codeTrigger value.
  2237     ].
  2235     ].
  2238     box destroy
  2236     box destroy
  2239 
  2237 
  2240     "Modified: 27.2.1997 / 16:50:12 / cg"
  2238     "Modified: 27.2.1997 / 16:50:12 / cg"
  2241 !
  2239 !
  2261 
  2259 
  2262     box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors.
  2260     box addCheckBox:(resources string:'Display error messages (Xlib, Xtlib ...)') on:displayErrors.
  2263     box addCheckBox:(resources string:'Other info messages') on:classInfos.
  2261     box addCheckBox:(resources string:'Other info messages') on:classInfos.
  2264 
  2262 
  2265     box addHelpButtonFor:'Launcher/messageSettings.html'.
  2263     box addHelpButtonFor:'Launcher/messageSettings.html'.
  2266     box addAbortButton; addOkButton.
  2264     box addAbortAndOkButtons.
  2267     box open.
  2265     box open.
  2268 
  2266 
  2269     box accepted ifTrue:[
  2267     box accepted ifTrue:[
  2270 	ObjectMemory infoPrinting:vmInfo value.
  2268         ObjectMemory infoPrinting:vmInfo value.
  2271 	ObjectMemory debugPrinting:vmErrors value.
  2269         ObjectMemory debugPrinting:vmErrors value.
  2272 	Object infoPrinting:classInfos value.
  2270         Object infoPrinting:classInfos value.
  2273 	DeviceWorkstation errorPrinting:displayErrors value.
  2271         DeviceWorkstation errorPrinting:displayErrors value.
  2274     ].
  2272     ].
  2275     box destroy
  2273     box destroy
  2276 
  2274 
  2277     "Modified: 27.1.1997 / 17:46:01 / cg"
  2275     "Modified: 27.1.1997 / 17:46:01 / cg"
  2278 !
  2276 !
  2365     ].
  2363     ].
  2366     box leftIndent:0.
  2364     box leftIndent:0.
  2367 
  2365 
  2368     box 
  2366     box 
  2369         addHelpButtonFor:'Launcher/miscSettings.html';
  2367         addHelpButtonFor:'Launcher/miscSettings.html';
  2370         addAbortButton; 
  2368         addAbortAndOkButtons.
  2371         addOkButton.
       
  2372 
  2369 
  2373     "/
  2370     "/
  2374     "/ show the box ...
  2371     "/ show the box ...
  2375     "/
  2372     "/
  2376     box open.
  2373     box open.
  2502     commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
  2499     commandListPop width:0.75; left:0.25; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
  2503     "/ some common print commands ...
  2500     "/ some common print commands ...
  2504 
  2501 
  2505     commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
  2502     commandList := resources at:'PRINT_COMMANDS' ifAbsent:nil.
  2506     commandList isNil ifTrue:[
  2503     commandList isNil ifTrue:[
  2507 	commandList := PrinterStream defaultCommands.
  2504         commandList := PrinterStream defaultCommands.
  2508 	commandList isNil ifTrue:[
  2505         commandList isNil ifTrue:[
  2509 	    commandList := #('lpr' 
  2506             commandList := #('lpr' 
  2510 			     'lp' 
  2507                              'lp' 
  2511 			    ).
  2508                             ).
  2512 	]
  2509         ]
  2513     ].
  2510     ].
  2514 
  2511 
  2515     commandListPop list:commandList.
  2512     commandListPop list:commandList.
  2516 
  2513 
  2517     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  2514     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  2526     landscapeLabel borderWidth:0.
  2523     landscapeLabel borderWidth:0.
  2527     row add:(landscapeComponent := CheckToggle on:landscape).
  2524     row add:(landscapeComponent := CheckToggle on:landscape).
  2528 
  2525 
  2529     y := box yPosition.
  2526     y := box yPosition.
  2530     box
  2527     box
  2531 	addRow:(1 to:2)
  2528         addRow:(1 to:2)
  2532 	fromX:0
  2529         fromX:0
  2533 	toX:0.5
  2530         toX:0.5
  2534 	collect:[:idx | row at:idx]
  2531         collect:[:idx | row at:idx]
  2535 	tabable:false
  2532         tabable:false
  2536 	horizontalLayout:#leftSpace
  2533         horizontalLayout:#leftSpace
  2537 	verticalLayout:#center.
  2534         verticalLayout:#center.
  2538     y1 := box yPosition.
  2535     y1 := box yPosition.
  2539     box yPosition:y.
  2536     box yPosition:y.
  2540 
  2537 
  2541     box
  2538     box
  2542 	addRow:(3 to:4)
  2539         addRow:(3 to:4)
  2543 	fromX:0.5
  2540         fromX:0.5
  2544 	toX:1.0
  2541         toX:1.0
  2545 	collect:[:idx | row at:idx]
  2542         collect:[:idx | row at:idx]
  2546 	tabable:false
  2543         tabable:false
  2547 	horizontalLayout:#leftSpace
  2544         horizontalLayout:#leftSpace
  2548 	verticalLayout:#center.
  2545         verticalLayout:#center.
  2549 
  2546 
  2550     box yPosition:(box yPosition max:y1).
  2547     box yPosition:(box yPosition max:y1).
  2551 
  2548 
  2552     box makeTabable:(formatComponent).
  2549     box makeTabable:(formatComponent).
  2553     box makeTabable:(landscapeComponent).
  2550     box makeTabable:(landscapeComponent).
  2555     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  2552     box addVerticalSpace; addHorizontalLine; addVerticalSpace.
  2556 
  2553 
  2557     y := box yPosition.
  2554     y := box yPosition.
  2558 
  2555 
  2559     topMarginComponent := box 
  2556     topMarginComponent := box 
  2560 	addLabelledInputField:(resources string:'top margin:')
  2557         addLabelledInputField:(resources string:'top margin:')
  2561 	adjust:#right
  2558         adjust:#right
  2562 	on:nil "/ topMargin 
  2559         on:nil "/ topMargin 
  2563 	tabable:true
  2560         tabable:true
  2564 	from:0.0 to:0.5
  2561         from:0.0 to:0.5
  2565 	separateAtX:0.6.
  2562         separateAtX:0.6.
  2566     topMarginComponent converter:(PrintConverter new initForNumber).
  2563     topMarginComponent converter:(PrintConverter new initForNumber).
  2567     topMarginComponent model:topMargin.
  2564     topMarginComponent model:topMargin.
  2568     y1 := box yPosition.
  2565     y1 := box yPosition.
  2569 
  2566 
  2570     box yPosition:y.
  2567     box yPosition:y.
  2571     unitList := SelectionInList with:#('inch' 'mm').
  2568     unitList := SelectionInList with:#('inch' 'mm').
  2572     unitList selectionIndex:1.
  2569     unitList selectionIndex:1.
  2573 
  2570 
  2574     component := box addComponent:(PopUpList on:unitList).
  2571     component := box addComponent:(PopUpList on:unitList).
  2575     component
  2572     component
  2576 	left:0.6;
  2573         left:0.6;
  2577 	width:0.3.
  2574         width:0.3.
  2578 
  2575 
  2579     box yPosition:y1.
  2576     box yPosition:y1.
  2580 
  2577 
  2581     leftMarginComponent := box 
  2578     leftMarginComponent := box 
  2582 	addLabelledInputField:(resources string:'left margin:')
  2579         addLabelledInputField:(resources string:'left margin:')
  2583 	adjust:#right
  2580         adjust:#right
  2584 	on:nil "/ leftMargin 
  2581         on:nil "/ leftMargin 
  2585 	tabable:true
  2582         tabable:true
  2586 	from:0.0 to:0.5
  2583         from:0.0 to:0.5
  2587 	separateAtX:0.6.
  2584         separateAtX:0.6.
  2588     leftMarginComponent converter:(PrintConverter new initForNumber).
  2585     leftMarginComponent converter:(PrintConverter new initForNumber).
  2589     leftMarginComponent model:leftMargin.
  2586     leftMarginComponent model:leftMargin.
  2590 
  2587 
  2591     rightMarginComponent := box 
  2588     rightMarginComponent := box 
  2592 	addLabelledInputField:(resources string:'right margin:')
  2589         addLabelledInputField:(resources string:'right margin:')
  2593 	adjust:#right
  2590         adjust:#right
  2594 	on:nil "/ rightMargin 
  2591         on:nil "/ rightMargin 
  2595 	tabable:true
  2592         tabable:true
  2596 	from:0.0 to:0.5
  2593         from:0.0 to:0.5
  2597 	separateAtX:0.6.
  2594         separateAtX:0.6.
  2598     rightMarginComponent converter:(PrintConverter new initForNumber).
  2595     rightMarginComponent converter:(PrintConverter new initForNumber).
  2599     rightMarginComponent model:rightMargin.
  2596     rightMarginComponent model:rightMargin.
  2600 
  2597 
  2601     bottomMarginComponent := box 
  2598     bottomMarginComponent := box 
  2602 	addLabelledInputField:(resources string:'bottom margin:')
  2599         addLabelledInputField:(resources string:'bottom margin:')
  2603 	adjust:#right
  2600         adjust:#right
  2604 	on:nil "/ bottomMargin 
  2601         on:nil "/ bottomMargin 
  2605 	tabable:true
  2602         tabable:true
  2606 	from:0.0 to:0.5
  2603         from:0.0 to:0.5
  2607 	separateAtX:0.6.
  2604         separateAtX:0.6.
  2608     bottomMarginComponent converter:(PrintConverter new initForNumber).
  2605     bottomMarginComponent converter:(PrintConverter new initForNumber).
  2609     bottomMarginComponent model:bottomMargin.
  2606     bottomMarginComponent model:bottomMargin.
  2610 
  2607 
  2611     box addHorizontalLine.
  2608     box addHorizontalLine.
  2612     supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor.
  2609     supportsColorComponent := box addCheckBox:(resources string:'Color printer') on:supportsColor.
  2613     box addVerticalSpace.
  2610     box addVerticalSpace.
  2614 
  2611 
  2615     updater := [ |p fg hasPageSize hasMargins|
  2612     updater := [ |p fg hasPageSize hasMargins|
  2616 
  2613 
  2617 		       printerType selectionIndex ~~ 0 ifTrue:[
  2614                        printerType selectionIndex ~~ 0 ifTrue:[
  2618 			   p := possiblePrinters at:(printerType selectionIndex).
  2615                            p := possiblePrinters at:(printerType selectionIndex).
  2619 			   hasPageSize := p supportsPageSizes. 
  2616                            hasPageSize := p supportsPageSizes. 
  2620 			   hasMargins := p supportsMargins. 
  2617                            hasMargins := p supportsMargins. 
  2621 		       ] ifFalse:[
  2618                        ] ifFalse:[
  2622 			   hasPageSize := false.
  2619                            hasPageSize := false.
  2623 			   hasMargins := false.
  2620                            hasMargins := false.
  2624 		       ].
  2621                        ].
  2625 		       hasPageSize ifTrue:[
  2622                        hasPageSize ifTrue:[
  2626 			  fg := Button new foregroundColor.
  2623                           fg := Button new foregroundColor.
  2627 			  formatComponent enable.
  2624                           formatComponent enable.
  2628 			  landscapeComponent enable.
  2625                           landscapeComponent enable.
  2629 
  2626 
  2630 			  formatComponent label:p pageFormat.
  2627                           formatComponent label:p pageFormat.
  2631 			  pageFormat value:(p pageFormat).
  2628                           pageFormat value:(p pageFormat).
  2632 			  landscape value:(p landscape).
  2629                           landscape value:(p landscape).
  2633 		       ] ifFalse:[ 
  2630                        ] ifFalse:[ 
  2634 			  fg := Button new disabledForegroundColor.
  2631                           fg := Button new disabledForegroundColor.
  2635 			  formatComponent disable.
  2632                           formatComponent disable.
  2636 			  landscapeComponent disable.
  2633                           landscapeComponent disable.
  2637 
  2634 
  2638 			  formatComponent label:'unknown'.
  2635                           formatComponent label:'unknown'.
  2639 			  landscape value:nil.
  2636                           landscape value:nil.
  2640 		       ].
  2637                        ].
  2641 		       hasMargins ifTrue:[
  2638                        hasMargins ifTrue:[
  2642 			  unitList selectionIndex == 2 ifTrue:[
  2639                           unitList selectionIndex == 2 ifTrue:[
  2643 			      unit := #mm
  2640                               unit := #mm
  2644 			  ] ifFalse:[
  2641                           ] ifFalse:[
  2645 			      unit := #inch
  2642                               unit := #inch
  2646 			  ].
  2643                           ].
  2647 
  2644 
  2648 			  topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
  2645                           topMargin value:(UnitConverter convert:p topMargin from:#inch to:unit).
  2649 			  leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
  2646                           leftMargin value:(UnitConverter convert:p leftMargin from:#inch to:unit).
  2650 			  rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
  2647                           rightMargin value:(UnitConverter convert:p rightMargin from:#inch to:unit).
  2651 			  bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
  2648                           bottomMargin value:(UnitConverter convert:p bottomMargin from:#inch to:unit).
  2652 
  2649 
  2653 			  topMarginComponent enable.
  2650                           topMarginComponent enable.
  2654 			  leftMarginComponent enable.
  2651                           leftMarginComponent enable.
  2655 			  rightMarginComponent enable.
  2652                           rightMarginComponent enable.
  2656 			  bottomMarginComponent enable.
  2653                           bottomMarginComponent enable.
  2657 		       ] ifFalse:[ 
  2654                        ] ifFalse:[ 
  2658 			  topMarginComponent disable.
  2655                           topMarginComponent disable.
  2659 			  leftMarginComponent disable.
  2656                           leftMarginComponent disable.
  2660 			  rightMarginComponent disable.
  2657                           rightMarginComponent disable.
  2661 			  bottomMarginComponent disable.
  2658                           bottomMarginComponent disable.
  2662 		       ].
  2659                        ].
  2663 		       formatLabel foregroundColor:fg.
  2660                        formatLabel foregroundColor:fg.
  2664 		       landscapeLabel foregroundColor:fg.
  2661                        landscapeLabel foregroundColor:fg.
  2665 
  2662 
  2666 		       p notNil ifTrue:[ 
  2663                        p notNil ifTrue:[ 
  2667 			   commandList := p defaultCommands.
  2664                            commandList := p defaultCommands.
  2668 			   commandList notNil ifTrue:[
  2665                            commandList notNil ifTrue:[
  2669 				commandListPop list:commandList 
  2666                                 commandListPop list:commandList 
  2670 			   ].
  2667                            ].
  2671 
  2668 
  2672 			   printCommand value:(p printCommand).
  2669                            printCommand value:(p printCommand).
  2673 		       ].
  2670                        ].
  2674 		       p supportsPostscript ifFalse:[
  2671                        p supportsPostscript ifFalse:[
  2675 			   supportsColorComponent disable.
  2672                            supportsColorComponent disable.
  2676 			   supportsColor value:false
  2673                            supportsColor value:false
  2677 		       ] ifTrue:[
  2674                        ] ifTrue:[
  2678 			   supportsColorComponent enable.
  2675                            supportsColorComponent enable.
  2679 			   supportsColor value:(Printer supportsColor).
  2676                            supportsColor value:(Printer supportsColor).
  2680 		       ]
  2677                        ]
  2681 		     ].
  2678                      ].
  2682     unitList onChangeSend:#value to:updater.
  2679     unitList onChangeSend:#value to:updater.
  2683     printerType onChangeSend:#value to:updater.
  2680     printerType onChangeSend:#value to:updater.
  2684     updater value.
  2681     updater value.
  2685 
  2682 
  2686     box addVerticalSpace;
  2683     box addVerticalSpace;
  2687 	addHelpButtonFor:'Launcher/printerSettings.html';
  2684         addHelpButtonFor:'Launcher/printerSettings.html';
  2688 	addAbortButton; addOkButton.
  2685         addAbortAndOkButtons.
  2689     box open.
  2686     box open.
  2690 
  2687 
  2691     box accepted ifTrue:[
  2688     box accepted ifTrue:[
  2692 	Printer := possiblePrinters at:(printerType selectionIndex).
  2689         Printer := possiblePrinters at:(printerType selectionIndex).
  2693 	Printer printCommand:printCommand value.
  2690         Printer printCommand:printCommand value.
  2694 
  2691 
  2695 	Printer supportsPageSizes ifTrue:[
  2692         Printer supportsPageSizes ifTrue:[
  2696 	    Printer pageFormat:(pageFormat selection).
  2693             Printer pageFormat:(pageFormat selection).
  2697 	    Printer landscape:(landscape value).
  2694             Printer landscape:(landscape value).
  2698 	].
  2695         ].
  2699 	Printer supportsMargins ifTrue:[
  2696         Printer supportsMargins ifTrue:[
  2700 	    unitList selectionIndex == 2 ifTrue:[
  2697             unitList selectionIndex == 2 ifTrue:[
  2701 		unit := #mm
  2698                 unit := #mm
  2702 	    ] ifFalse:[
  2699             ] ifFalse:[
  2703 		unit := #inch
  2700                 unit := #inch
  2704 	    ].
  2701             ].
  2705 	    Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
  2702             Printer topMargin:(UnitConverter convert:topMargin value from:unit to:#inch).
  2706 	    Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
  2703             Printer leftMargin:(UnitConverter convert:leftMargin value from:unit to:#inch).
  2707 	    Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
  2704             Printer rightMargin:(UnitConverter convert:rightMargin value from:unit to:#inch).
  2708 	    Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
  2705             Printer bottomMargin:(UnitConverter convert:bottomMargin value from:unit to:#inch).
  2709 	].
  2706         ].
  2710 	Printer supportsPostscript ifTrue:[
  2707         Printer supportsPostscript ifTrue:[
  2711 	    Printer supportsColor:supportsColor value.
  2708             Printer supportsColor:supportsColor value.
  2712 	].
  2709         ].
  2713     ].
  2710     ].
  2714     box destroy
  2711     box destroy
  2715 
  2712 
  2716     "Modified: 9.9.1996 / 22:43:51 / stefan"
  2713     "Modified: 9.9.1996 / 22:43:51 / stefan"
  2717     "Modified: 28.2.1997 / 14:00:13 / cg"
  2714     "Modified: 28.2.1997 / 14:00:13 / cg"
  3127     box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier.
  3124     box addCheckBox:(resources string:'show error notifier before opening debugger') on:showErrorNotifier.
  3128     box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack.
  3125     box addCheckBox:(resources string:'verbose backtrace by default in debugger') on:showVerboseStack.
  3129 
  3126 
  3130     box 
  3127     box 
  3131         addHelpButtonFor:'Launcher/sourceSettings.html';
  3128         addHelpButtonFor:'Launcher/sourceSettings.html';
  3132         addAbortButton; 
  3129         addAbortAndOkButtons.
  3133         addOkButton.
       
  3134 
  3130 
  3135     "/
  3131     "/
  3136     "/ show the box ...
  3132     "/ show the box ...
  3137     "/
  3133     "/
  3138     box open.
  3134     box open.
  3358         ].
  3354         ].
  3359     ].
  3355     ].
  3360 
  3356 
  3361     box 
  3357     box 
  3362         addHelpButtonFor:'Launcher/compilerSettings.html';
  3358         addHelpButtonFor:'Launcher/compilerSettings.html';
  3363         addAbortButton; 
  3359         addAbortAndOkButtons.
  3364         addOkButton.
       
  3365 
  3360 
  3366     box open.
  3361     box open.
  3367 
  3362 
  3368     box accepted ifTrue:[
  3363     box accepted ifTrue:[
  3369         thisIsADemoVersion  ifFalse:[
  3364         thisIsADemoVersion  ifFalse:[
  3423     box addHorizontalLine.
  3418     box addHorizontalLine.
  3424     box addCheckBox:(resources string:'Use hierarchical inspector') on:useNewInspector.
  3419     box addCheckBox:(resources string:'Use hierarchical inspector') on:useNewInspector.
  3425 
  3420 
  3426     box 
  3421     box 
  3427         addHelpButtonFor:'Launcher/toolSettings.html';
  3422         addHelpButtonFor:'Launcher/toolSettings.html';
  3428         addAbortButton; 
  3423         addAbortAndOkButtons.
  3429         addOkButton.
       
  3430 
  3424 
  3431     "/
  3425     "/
  3432     "/ show the box ...
  3426     "/ show the box ...
  3433     "/
  3427     "/
  3434     box open.
  3428     box open.
  3468     "
  3462     "
  3469      search resources directory for a list of .style files ...
  3463      search resources directory for a list of .style files ...
  3470     "
  3464     "
  3471     someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
  3465     someRsrcFile := Smalltalk getSystemFileName:('resources' asFilename constructString:'normal.style').
  3472     someRsrcFile notNil ifTrue:[
  3466     someRsrcFile notNil ifTrue:[
  3473 	resourceDir := someRsrcFile asFilename directoryName
  3467         resourceDir := someRsrcFile asFilename directoryName
  3474     ] ifFalse:[
  3468     ] ifFalse:[
  3475 	resourceDir := Smalltalk getSystemFileName:'resources'.
  3469         resourceDir := Smalltalk getSystemFileName:'resources'.
  3476     ].
  3470     ].
  3477 
  3471 
  3478     resourceDir isNil ifTrue:[
  3472     resourceDir isNil ifTrue:[
  3479 	self warn:'no styles found (missing ''resources'' directory)'.
  3473         self warn:'no styles found (missing ''resources'' directory)'.
  3480 	^ self
  3474         ^ self
  3481     ].
  3475     ].
  3482     dir := resourceDir asFilename directoryContents.
  3476     dir := resourceDir asFilename directoryContents.
  3483 
  3477 
  3484     list := SelectionInList new.
  3478     list := SelectionInList new.
  3485 
  3479 
  3486     listUpdater := [
  3480     listUpdater := [
  3487 	|listOfStyles lastSelection|
  3481         |listOfStyles lastSelection|
  3488 
  3482 
  3489 	lastSelection := list selection.
  3483         lastSelection := list selection.
  3490 	listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
  3484         listOfStyles := dir select:[:aFileName | aFileName asFilename hasSuffix:'style'].
  3491 	listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
  3485         listOfStyles := listOfStyles collect:[:aFileName | aFileName asFilename withoutSuffix name].
  3492 	Filename isCaseSensitive ifFalse:[
  3486         Filename isCaseSensitive ifFalse:[
  3493 	    listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
  3487             listOfStyles := listOfStyles collect:[:aStyleName | aStyleName asLowercase].
  3494 	].
  3488         ].
  3495 	listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil.
  3489         listOfStyles remove:'generic' ifAbsent:nil; remove:'mswindows3' ifAbsent:nil.
  3496 	showStandardStylesOnly value ifTrue:[
  3490         showStandardStylesOnly value ifTrue:[
  3497 	    listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName].
  3491             listOfStyles := listOfStyles select:[:aStyleName | standardStyles includes:aStyleName].
  3498 	].
  3492         ].
  3499 
  3493 
  3500 	listOfStyles sort.
  3494         listOfStyles sort.
  3501 	list list:listOfStyles.
  3495         list list:listOfStyles.
  3502 	list selection:lastSelection.
  3496         list selection:lastSelection.
  3503     ].
  3497     ].
  3504     listUpdater value.
  3498     listUpdater value.
  3505 
  3499 
  3506     showStandardStylesOnly onChangeSend:#value to:listUpdater.
  3500     showStandardStylesOnly onChangeSend:#value to:listUpdater.
  3507 
  3501 
  3508     infoForwarder := [
  3502     infoForwarder := [
  3509 			|nm sheet comment|
  3503                         |nm sheet comment|
  3510 
  3504 
  3511 			comment := ''.
  3505                         comment := ''.
  3512 			nm := list selection.
  3506                         nm := list selection.
  3513 			nm notNil ifTrue:[
  3507                         nm notNil ifTrue:[
  3514 			    sheet := ViewStyle fromFile:(nm , '.style').
  3508                             sheet := ViewStyle fromFile:(nm , '.style').
  3515 			    comment := (sheet at:#comment ifAbsent:'') withoutSeparators.
  3509                             comment := (sheet at:#comment ifAbsent:'') withoutSeparators.
  3516 			].
  3510                         ].
  3517 			comment := comment withCRs asStringCollection.
  3511                         comment := comment withCRs asStringCollection.
  3518 			comment size == 1 ifTrue:[
  3512                         comment size == 1 ifTrue:[
  3519 			    comment := comment first
  3513                             comment := comment first
  3520 			].
  3514                         ].
  3521 			infoLabel label:comment
  3515                         infoLabel label:comment
  3522 		       ].
  3516                        ].
  3523 
  3517 
  3524     list onChangeSend:#value to:infoForwarder.
  3518     list onChangeSend:#value to:infoForwarder.
  3525 
  3519 
  3526     box := Dialog new.
  3520     box := Dialog new.
  3527     box label:(resources string:'Style selection').
  3521     box label:(resources string:'Style selection').
  3534 
  3528 
  3535     box addVerticalSpace.
  3529     box addVerticalSpace.
  3536 
  3530 
  3537     (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
  3531     (infoLabel := box addTextLabel:'\\' withCRs) adjust:#centerLeft.
  3538 
  3532 
  3539     box addAbortButton.
  3533     box addAbortAndOkButtons.
  3540 
       
  3541 "/ mhmh - the newLauncher does not yet handle apply (without close) correctly
  3534 "/ mhmh - the newLauncher does not yet handle apply (without close) correctly
  3542 "/    b := box addButton:(Button label:(resources string:'apply')).
  3535 "/    b := box addButton:(Button label:(resources string:'apply')).
  3543 "/    b action:[didApply := true. requestor changeViewStyleTo:(list selection)].
  3536 "/    b action:[didApply := true. requestor changeViewStyleTo:(list selection)].
  3544 
  3537 
  3545     box addOkButton.
       
  3546 
       
  3547     (standardStyles includes:View defaultStyle) ifFalse:[
  3538     (standardStyles includes:View defaultStyle) ifFalse:[
  3548 	showStandardStylesOnly value:false
  3539         showStandardStylesOnly value:false
  3549     ].
  3540     ].
  3550     list selection:(View defaultStyle).
  3541     list selection:(View defaultStyle).
  3551 
  3542 
  3552     box stickAtBottomWithVariableHeight:scrView.
  3543     box stickAtBottomWithVariableHeight:scrView.
  3553     box stickAtBottomWithFixHeight:infoLabel.
  3544     box stickAtBottomWithFixHeight:infoLabel.
  3554     didApply := false.
  3545     didApply := false.
  3555     box open.
  3546     box open.
  3556 
  3547 
  3557     box destroy.
  3548     box destroy.
  3558     box accepted ifTrue:[
  3549     box accepted ifTrue:[
  3559 	((newStyle := list selection) ~= View defaultStyle
  3550         ((newStyle := list selection) ~= View defaultStyle
  3560 	or:[didApply ~~ true]) ifTrue:[
  3551         or:[didApply ~~ true]) ifTrue:[
  3561 	    requestor changeViewStyleTo:newStyle.
  3552             requestor changeViewStyleTo:newStyle.
  3562 	].
  3553         ].
  3563     ].
  3554     ].
  3564 
  3555 
  3565     "
  3556     "
  3566      self viewStyleSettingsFor:nil
  3557      self viewStyleSettingsFor:nil
  3567     "
  3558     "
  3992     |box y cvsRootHolder component resources defaultsList|
  3983     |box y cvsRootHolder component resources defaultsList|
  3993 
  3984 
  3994     resources := requestor class classResources.
  3985     resources := requestor class classResources.
  3995 
  3986 
  3996     OperatingSystem isUNIXlike ifTrue:[
  3987     OperatingSystem isUNIXlike ifTrue:[
  3997 	defaultsList := #('/files/CVS' '/CVS' 'host:/files/CVS' 'host:/CVS').
  3988         defaultsList := #('/files/CVS' '/CVS' 'host:/files/CVS' 'host:/CVS').
  3998     ] ifFalse:[
  3989     ] ifFalse:[
  3999 	OperatingSystem isMSDOSlike ifTrue:[
  3990         OperatingSystem isMSDOSlike ifTrue:[
  4000 	    defaultsList := #(':local:c:\files\CVS' ':local:c:\CVS' 'host:/files/CVS' 'host:/CVS').
  3991             defaultsList := #(':local:c:\files\CVS' ':local:c:\CVS' 'host:/files/CVS' 'host:/CVS').
  4001 	] ifFalse:[
  3992         ] ifFalse:[
  4002 	    defaultsList := #('host:/files/CVS' 'host:/CVS').
  3993             defaultsList := #('host:/files/CVS' 'host:/CVS').
  4003 	]
  3994         ]
  4004     ].
  3995     ].
  4005 
  3996 
  4006     cvsRootHolder := CVSSourceCodeManager repositoryName ? '/files/CVS'.
  3997     cvsRootHolder := CVSSourceCodeManager repositoryName ? '/files/CVS'.
  4007     cvsRootHolder := cvsRootHolder asValue.
  3998     cvsRootHolder := cvsRootHolder asValue.
  4008 
  3999 
  4033 "/                    separateAtX:0.5.
  4024 "/                    separateAtX:0.5.
  4034 "/    component acceptOnLeave:false.
  4025 "/    component acceptOnLeave:false.
  4035 "/    component model:cvsRootHolder.
  4026 "/    component model:cvsRootHolder.
  4036 
  4027 
  4037     box 
  4028     box 
  4038 	addHelpButtonFor:'Launcher/sourceSettings.html';
  4029         addHelpButtonFor:'Launcher/sourceSettings.html';
  4039 	addAbortButton; 
  4030         addAbortAndOkButtons.
  4040 	addOkButton.
       
  4041 
  4031 
  4042     "/
  4032     "/
  4043     "/ show the box ...
  4033     "/ show the box ...
  4044     "/
  4034     "/
  4045     box extent:400@300.
  4035     box extent:400@300.
  4047 
  4037 
  4048     "/
  4038     "/
  4049     "/ update system settings
  4039     "/ update system settings
  4050     "/
  4040     "/
  4051     box accepted ifTrue:[
  4041     box accepted ifTrue:[
  4052 	CVSSourceCodeManager initializeForRepository:cvsRootHolder value
  4042         CVSSourceCodeManager initializeForRepository:cvsRootHolder value
  4053     ].
  4043     ].
  4054     box destroy
  4044     box destroy
  4055 
  4045 
  4056     "Modified: / 16.4.1998 / 17:18:16 / ca"
  4046     "Modified: / 16.4.1998 / 17:18:16 / ca"
  4057     "Modified: / 12.8.1998 / 17:09:02 / cg"
  4047     "Modified: / 12.8.1998 / 17:09:02 / cg"
  4141         model == allOfThem ifTrue:[
  4131         model == allOfThem ifTrue:[
  4142             box addVerticalSpace
  4132             box addVerticalSpace
  4143         ]
  4133         ]
  4144     ].
  4134     ].
  4145 
  4135 
  4146     box addAbortButton; addOkButton.
  4136     box addAbortAndOkButtons.
  4147     defaultButton := Button label:(resources string:'defaults').
  4137     defaultButton := Button label:(resources string:'defaults').
  4148 
  4138 
  4149     (DialogBox styleSheet at:'dialogBox.okAtLeft') ifTrue:[
  4139     (DialogBox styleSheet at:'dialogBox.okAtLeft') ifTrue:[
  4150         box addButton:defaultButton after:nil.
  4140         box addButton:defaultButton after:nil.
  4151     ] ifFalse:[
  4141     ] ifFalse:[
  4258 
  4248 
  4259     syntaxColoringBox enable.  colorMenu enable.  syntaxEmphasisesBox enable.  syntaxColoringResetBox enable. 
  4249     syntaxColoringBox enable.  colorMenu enable.  syntaxEmphasisesBox enable.  syntaxColoringResetBox enable. 
  4260 
  4250 
  4261     box 
  4251     box 
  4262 "/        addHelpButtonFor:'Launcher/sourceSettings.html';
  4252 "/        addHelpButtonFor:'Launcher/sourceSettings.html';
  4263         addAbortButton; 
  4253         addAbortAndOkButtons.
  4264         addOkButton.
       
  4265 
  4254 
  4266     "/
  4255     "/
  4267     "/ show the box ...
  4256     "/ show the box ...
  4268     "/
  4257     "/
  4269     box extent:400@300.
  4258     box extent:400@300.
  4283 ! !
  4272 ! !
  4284 
  4273 
  4285 !AbstractLauncherApplication class methodsFor:'documentation'!
  4274 !AbstractLauncherApplication class methodsFor:'documentation'!
  4286 
  4275 
  4287 version
  4276 version
  4288     ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.14 1999-03-06 01:59:44 cg Exp $'
  4277     ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.15 1999-03-06 02:15:15 cg Exp $'
  4289 ! !
  4278 ! !