display.rc
changeset 8 d82829c0d867
parent 7 57c09d1b7f69
child 10 43d0db9ff204
--- a/display.rc	Mon Oct 10 04:36:13 1994 +0100
+++ b/display.rc	Mon Nov 21 18:37:56 1994 +0100
@@ -2,6 +2,7 @@
  * $Header$
  *
  * DONT add site specific things here - use your own d_xxx.rc file instead
+ * where xxx stands for your displays hostname(s)
  *
  * display related configuration:
  *   first do some common setup, then try to find a
@@ -91,17 +92,18 @@
  *
  * the following line puts paste onto the right button (as in xterm):
  *"
-"/ XWorkstation buttonTranslation:#(select #menu #paste)
+"/ XWorkstation buttonTranslation:#(select #menu #paste).
 
 "*
  * while that one puts the pop-up menu both on the middle and right buttons:
  *"
-XWorkstation buttonTranslation:#(select #menu #menu)
+"/ XWorkstation buttonTranslation:#(select #menu #menu).
+XWorkstation buttonTranslation:#(1 2 2).
 
 "*
  * lefthanders can use:
  *"
-"/ XWorkstation buttonTranslation:#(#menu #menu #select)
+"/ XWorkstation buttonTranslation:#(#menu #menu #select).
 !
 
 "*
@@ -154,7 +156,7 @@
 
 "*
  * find out, on what type of display we run
- * (they should have added this to the x-protocol)
+ * (boy, they should have added this to the x-protocol)
  *
  * look for a file named 'd_<displays-hostname>.rc' and file it in
  *"
@@ -172,7 +174,10 @@
 display := displayVar.
 
 displayVar notNil ifTrue:[
-    ((displayVar startsWith:':0') or:[displayVar startsWith:'unix:0'])  ifTrue:[
+    ((displayVar startsWith:':0') 
+    or:[(displayVar startsWith:'unix:')
+    or:[displayVar startsWith:'shm:']]) ifTrue:[
+	"running on a local display"
 	display := OperatingSystem getHostName.
     ] ifFalse:[
 	(displayVar endsWith:':0') ifTrue:[
@@ -193,9 +198,10 @@
 	    displayType := display.
 	    s close.
 	].
+
 	"otherwise ..."
 	displayType isNil ifTrue:[
-	    "just an example - stuff could also be hardwired here ..."
+	    "just an example - stuff can also be hardwired here ..."
 	    display notNil ifTrue:[
 		(display startsWith:'clam') ifTrue:[
 		    displayType := 'next'
@@ -212,10 +218,10 @@
 		(display startsWith:'hp') ifTrue:[
 		    displayType := 'hpux'
 		].
-		(display startsWith:'slsv') ifTrue:[
-		    "all those machines here at SEL are suns"
-		    displayType := 'sun'
-		].
+"/                (display startsWith:'slsv') ifTrue:[
+"/                    "all those machines here at SEL are suns"
+"/                    displayType := 'sun'
+"/                ].
 	    ].
 	].
     ].
@@ -238,7 +244,7 @@
 
 displayType notNil ifTrue:[
     (Smalltalk at:#'_ImageDisplayName') ~= displayType ifTrue:[
-	('trying display setup d_' , displayType , '.rc ...') errorPrintNewline.
+	('trying display setup d_' , displayType , '.rc ...') errorPrintNL.
 	Smalltalk fileIn:('d_' , displayType , '.rc')
     ].
     Smalltalk at:#'_ImageDisplayName' put:displayType
@@ -271,46 +277,13 @@
     type = 'hpux' ifTrue:[
 	View defaultStyle:#motif 
     ].
+    View defaultStyle isNil ifTrue:[
+	Display hasGreyscales ifTrue:[
+	    View defaultStyle:#iris
+	] ifFalse:[
+	    View defaultStyle:#normal
+	]
+    ].
+    'no style set in display.rc - using default' errorPrintNL
 ]
 !
-
-"*
- * take a smaller font on small (i.e. vga) screens
- *"
-|sz|
-
-sz := 12.
-Display width < 800 ifTrue:[
-    sz := 10
-].
-
-"*
- * this defines the default font for all views (actually for all GC's)
- *"
-GraphicsContext defaultFont:(Font family:'courier' face:'medium' style:'roman' size:sz).
-
-"*
- * this defines the default font for menu views
- *"
-(View defaultStyle == #openwin) ifTrue:[
-    MenuView defaultFont:(Font family:'lucida' face:'medium' style:'roman' size:sz).
-    Launcher defaultFont:(Font family:'lucida' face:'medium' style:'roman' size:sz).
-] ifFalse:[
-    (View defaultStyle == #iris) ifTrue:[
-	MenuView defaultFont:(Font family:'helvetica' face:'bold' style:'oblique' size:sz).
-	SelectionInListView defaultFont:(Font family:'helvetica' face:'medium' style:'roman' size:sz).
-	Launcher defaultFont:(Font family:'helvetica' face:'bold' style:'oblique' size:sz).
-    ] ifFalse:[
-	MenuView defaultFont:(Font family:'helvetica' face:'bold' style:'roman' size:sz).
-	Launcher defaultFont:(Font family:'helvetica' face:'bold' style:'roman' size:sz).
-	(View defaultStyle == #mswindows) ifTrue:[
-	    SelectionInListView defaultFont:(Font family:'courier' face:'bold' style:'roman' size:sz).
-	]
-    ]
-].
-
-"*
- * this defines the default font for code views
- *"
-CodeView defaultFont:(Font family:'courier' face:'medium' style:'roman' size:sz).
-!