Launcher.st
changeset 1196 f9244c34ec4a
parent 1192 d02f05f72b84
child 1197 9ac65db386ba
--- a/Launcher.st	Mon Jun 23 13:38:04 1997 +0200
+++ b/Launcher.st	Mon Jun 23 15:33:49 1997 +0200
@@ -1404,7 +1404,7 @@
 
     |box listOfSizes sizeInfos
      sizes sizeNames sizeList sizeX sizeY deepIcons
-     isColorMonitor useFixPalette idx ditherStyles ditherSyms ditherList
+     isColorMonitor useFixPalette useFixGrayPalette idx ditherStyles ditherSyms ditherList
      y component screen visual|
 
     listOfSizes := resources at:'LIST_OF_OFFERED_SCREEN_SIZES' default:#default.
@@ -1429,6 +1429,7 @@
     isColorMonitor := screen hasColors asValue.
     deepIcons := screen supportsDeepIcons asValue.
     useFixPalette := screen fixColors notNil asValue.
+    useFixGrayPalette := screen fixGrayColors notNil asValue.
 
     sizeList := SelectionInList with:sizeNames.
     sizeX := screen widthInMillimeter asValue.
@@ -1522,6 +1523,9 @@
     visual == #PseudoColor ifTrue:[
         box addVerticalSpace.
         component := box addCheckBox:(resources string:'use fix color palette (6x6x4)') on:useFixPalette.
+
+        box addVerticalSpace.
+        component := box addCheckBox:(resources string:'use fix gray color palette (16)') on:useFixGrayPalette.
     ].
 
     ditherSyms notNil ifTrue:[
@@ -1551,6 +1555,16 @@
                 ]
             ] ifFalse:[
                 screen releaseFixColors
+            ].
+
+            useFixGrayPalette value ifTrue:[
+                Color colorAllocationFailSignal handle:[:ex |
+                    self warn:(resources string:'Could not allocate colors.').
+                ] do:[
+                    Color getGrayColors:16 on:screen
+                ]
+            ] ifFalse:[
+                screen releaseFixGrayColors
             ]
         ].
         screen hasColors:isColorMonitor value.
@@ -1569,7 +1583,7 @@
     box destroy
 
     "Modified: 9.9.1996 / 22:43:04 / stefan"
-    "Modified: 20.6.1997 / 15:28:32 / cg"
+    "Modified: 23.6.1997 / 15:32:37 / cg"
 !
 
 fontSettings
@@ -4730,5 +4744,5 @@
 !Launcher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.273 1997-06-20 13:29:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.274 1997-06-23 13:33:49 cg Exp $'
 ! !