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" |
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 ! |
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" |
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'). |