--- a/AbstractLauncherApplication.st Thu May 20 17:32:55 1999 +0200
+++ b/AbstractLauncherApplication.st Thu May 20 18:33:00 1999 +0200
@@ -1455,22 +1455,23 @@
|box listOfSizes sizeInfos
sizes sizeNames sizeList sizeX sizeY deepIcons
isColorMonitor useFixPalette useFixGrayPalette idx ditherStyles ditherSyms ditherList
- y component screen visual clipEncodings clipEncodingSyms clipEncodingList resources|
+ y component screen visual clipEncodings clipEncodingSyms clipEncodingList resources
+ activateOnClick|
resources := requestor class classResources.
listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
listOfSizes == #default ifTrue:[
- "/ nothing in resource file; offer at least some.
- sizeInfos := #(
- ( '11.3'' (235mm x 175mm) LCD' (235 175) )
- ( '17'' (325mm x 245mm)' (325 245) )
- ( '19'' (340mm x 270mm)' (340 270) )
- ( '20'' (350mm x 280mm)' (350 280) )
- ( '21'' (365mm x 285mm)' (365 285) )
- ).
+ "/ nothing in resource file; offer at least some.
+ sizeInfos := #(
+ ( '11.3'' (235mm x 175mm) LCD' (235 175) )
+ ( '17'' (325mm x 245mm)' (325 245) )
+ ( '19'' (340mm x 270mm)' (340 270) )
+ ( '20'' (350mm x 280mm)' (350 280) )
+ ( '21'' (365mm x 285mm)' (365 285) )
+ ).
] ifFalse:[
- sizeInfos := resources array:listOfSizes.
+ sizeInfos := resources array:listOfSizes.
].
sizeNames := sizeInfos collect:[:entry | entry at:1].
sizes := sizeInfos collect:[:entry | entry at:2].
@@ -1482,6 +1483,9 @@
deepIcons := screen supportsDeepIcons asValue.
useFixPalette := screen fixColors notNil asValue.
useFixGrayPalette := screen fixGrayColors notNil asValue.
+ screen platformName = 'WIN32' ifTrue:[
+ activateOnClick := (screen activateOnClick:nil) asValue.
+ ].
sizeList := SelectionInList with:sizeNames.
sizeX := screen widthInMillimeter asValue.
@@ -1496,55 +1500,55 @@
ditherList := SelectionInList new.
(visual == #StaticGray or:[visual == #GrayScale]) ifTrue:[
- ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
- ditherSyms := #(threshold ordered floydSteinberg).
+ ditherStyles := #('threshold' 'ordered dither' 'error diffusion').
+ ditherSyms := #(threshold ordered floydSteinberg).
] ifFalse:[
- visual ~~ #TrueColor ifTrue:[
- ditherStyles := #('nearest color' 'error diffusion').
- ditherSyms := #(ordered floydSteinberg).
- ]
+ visual ~~ #TrueColor ifTrue:[
+ ditherStyles := #('nearest color' 'error diffusion').
+ ditherSyms := #(ordered floydSteinberg).
+ ]
].
ditherSyms notNil ifTrue:[
- ditherList list:ditherStyles.
- ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
+ ditherList list:ditherStyles.
+ ditherList selectionIndex:(ditherSyms indexOf:(Image ditherAlgorithm) ifAbsent:#threshold).
].
box := DialogBox new.
box label:(resources string:'Display screen settings').
(box addTextLabel:(resources string:'Actual visible screen area:'))
- adjust:#left.
+ adjust:#left.
(box addPopUpList:(resources string:'common sizes:') on:sizeList)
- label:'monitor size'.
+ label:'monitor size'.
idx := sizes findFirst:[:entry |
- ((entry at:1) = sizeX value)
- and:[((entry at:2) = sizeY value)]
- ].
+ ((entry at:1) = sizeX value)
+ and:[((entry at:2) = sizeY value)]
+ ].
idx ~~ 0 ifTrue:[
- sizeList selectionIndex:idx
+ sizeList selectionIndex:idx
].
sizeList onChangeSend:#value to:[
- |idx|
-
- idx := sizeList selectionIndex.
- sizeX value:((sizes at:idx) at:1).
- sizeY value:((sizes at:idx) at:2).
- ].
+ |idx|
+
+ idx := sizeList selectionIndex.
+ sizeX value:((sizes at:idx) at:1).
+ sizeY value:((sizes at:idx) at:2).
+ ].
y := box yPosition.
- component := box addTextLabel:(resources string:'screen size:').
+ component := box addTextLabel:(resources string:'Screen size:').
component width:0.3; adjust:#right; borderWidth:0.
box yPosition:y.
component := box addInputFieldOn:nil tabable:true.
component width:0.25; left:0.3;
- immediateAccept:false; acceptOnLeave:false;
- cursorMovementWhenUpdating:#beginOfLine;
- converter:(PrintConverter new initForInteger);
- model:sizeX.
+ immediateAccept:false; acceptOnLeave:false;
+ cursorMovementWhenUpdating:#beginOfLine;
+ converter:(PrintConverter new initForInteger);
+ model:sizeX.
box yPosition:y.
component := box addTextLabel:(' x ').
@@ -1553,10 +1557,10 @@
box yPosition:y.
component := box addInputFieldOn:nil tabable:true.
component width:0.25; left:0.65;
- immediateAccept:false; acceptOnLeave:false;
- cursorMovementWhenUpdating:#beginOfLine;
- converter:(PrintConverter new initForInteger);
- model:sizeY.
+ immediateAccept:false; acceptOnLeave:false;
+ cursorMovementWhenUpdating:#beginOfLine;
+ converter:(PrintConverter new initForInteger);
+ model:sizeY.
box yPosition:y.
component := box addTextLabel:('(mm)').
@@ -1565,86 +1569,95 @@
box addVerticalSpace; addHorizontalLine; addVerticalSpace.
(box addTextLabel:(resources string:'Screen: depth: %1 visual: %2 (%3)'
- with:Screen current depth printString
- with:Screen current visualType
- with:Screen current serverVendor))
- adjust:#left.
+ with:Screen current depth printString
+ with:Screen current visualType
+ with:Screen current serverVendor))
+ adjust:#left.
box addVerticalSpace; addHorizontalLine; addVerticalSpace.
- box addCheckBox:(resources string:'color monitor') on:isColorMonitor.
+ box addCheckBox:(resources string:'Color monitor') on:isColorMonitor.
visual == #PseudoColor ifTrue:[
- box addVerticalSpace.
- component := box addCheckBox:(resources string:'use fix color palette %1' with:'(4x8x4)') on:useFixPalette.
-
- box addVerticalSpace.
- component := box addCheckBox:(resources string:'use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
+ box addVerticalSpace.
+ component := box addCheckBox:(resources string:'Use fix color palette %1' with:'(4x8x4)') on:useFixPalette.
+
+ box addVerticalSpace.
+ component := box addCheckBox:(resources string:'Use fix gray color palette %1' with:'(32)') on:useFixGrayPalette.
].
ditherSyms notNil ifTrue:[
- box addVerticalSpace.
- component := box addPopUpList:(resources string:'image display:') on:ditherList.
- component defaultLabel:'image display'.
- component superView horizontalLayout:#leftSpace.
+ box addVerticalSpace.
+ component := box addPopUpList:(resources string:'Amage display:') on:ditherList.
+ component defaultLabel:'image display'.
+ component superView horizontalLayout:#leftSpace.
].
box addVerticalSpace.
- box addCheckBox:(resources string:'allow colored/grayscale icons') on:deepIcons.
+ box addCheckBox:(resources string:'Allow colored/grayscale icons') on:deepIcons.
+
+ activateOnClick notNil ifTrue:[
+ box addVerticalSpace.
+ box addCheckBox:(resources string:'Activate for focus') on:activateOnClick.
+ ].
box addVerticalSpace; addHorizontalLine; addVerticalSpace.
- component := box addPopUpList:(resources string:'clipBoard encoding:') on:clipEncodingList.
+ component := box addPopUpList:(resources string:'ClipBoard encoding:') on:clipEncodingList.
component superView horizontalLayout:#leftSpace.
box
- addHelpButtonFor:'Launcher/screenSettings.html';
- addAbortAndOkButtons.
+ addHelpButtonFor:'Launcher/screenSettings.html';
+ addAbortAndOkButtons.
box open.
box accepted ifTrue:[
- Image flushDeviceImages.
-
- screen visualType == #PseudoColor ifTrue:[
- useFixPalette value ifTrue:[
- Color colorAllocationFailSignal handle:[:ex |
- self warn:(resources string:'Could not allocate colors.').
- ] do:[
- Color getColorsRed:4 green:8 blue:4 on:screen
- ]
- ] ifFalse:[
- screen releaseFixColors
- ].
-
- useFixGrayPalette value ifTrue:[
- Color colorAllocationFailSignal handle:[:ex |
- self warn:(resources string:'Could not allocate colors.').
- ] do:[
- Color getGrayColors:32 on:screen
- ]
- ] ifFalse:[
- screen releaseFixGrayColors
- ]
- ].
- screen hasColors:isColorMonitor value.
- screen widthInMillimeter:sizeX value.
- screen heightInMillimeter:sizeY value.
-
- screen supportsDeepIcons:deepIcons value.
- ditherSyms notNil ifTrue:[
- Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
- ].
-
- requestor withWaitCursorDo:[
- View defaultStyle:(View defaultStyle).
- ].
-
- screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
+ Image flushDeviceImages.
+
+ screen visualType == #PseudoColor ifTrue:[
+ useFixPalette value ifTrue:[
+ Color colorAllocationFailSignal handle:[:ex |
+ self warn:(resources string:'Could not allocate colors.').
+ ] do:[
+ Color getColorsRed:4 green:8 blue:4 on:screen
+ ]
+ ] ifFalse:[
+ screen releaseFixColors
+ ].
+
+ useFixGrayPalette value ifTrue:[
+ Color colorAllocationFailSignal handle:[:ex |
+ self warn:(resources string:'Could not allocate colors.').
+ ] do:[
+ Color getGrayColors:32 on:screen
+ ]
+ ] ifFalse:[
+ screen releaseFixGrayColors
+ ]
+ ].
+ screen hasColors:isColorMonitor value.
+ screen widthInMillimeter:sizeX value.
+ screen heightInMillimeter:sizeY value.
+
+ activateOnClick notNil ifTrue:[
+ screen activateOnClick:activateOnClick value.
+ ].
+
+ screen supportsDeepIcons:deepIcons value.
+ ditherSyms notNil ifTrue:[
+ Image ditherAlgorithm:(ditherSyms at:ditherList selectionIndex).
+ ].
+
+ requestor withWaitCursorDo:[
+ View defaultStyle:(View defaultStyle).
+ ].
+
+ screen clipBoardEncoding:(clipEncodingSyms at:clipEncodingList selectionIndex).
].
box destroy
- "Modified: 9.9.1996 / 22:43:04 / stefan"
- "Modified: 21.7.1997 / 19:26:49 / cg"
+ "Modified: / 9.9.1996 / 22:43:04 / stefan"
+ "Modified: / 20.5.1999 / 18:24:56 / cg"
!
editSettingsFor:requestor
@@ -4340,5 +4353,5 @@
!AbstractLauncherApplication class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.29 1999-05-20 15:32:55 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/AbstractLauncherApplication.st,v 1.30 1999-05-20 16:33:00 cg Exp $'
! !