detect win32 configurations;
invoke d_windows.rc if so;
do keyboard.rc early, to allow for redefinition in d_xxx.rc
--- a/display.rc Sat Sep 12 15:47:36 1998 +0200
+++ b/display.rc Sat Sep 12 15:48:41 1998 +0200
@@ -12,6 +12,14 @@
* display specific initialization file.
*"
+"/ common keyboard setup;
+"/ might be changed later by a display-specific
+"/ rc file (especially, d_windows does this)
+
+'display.rc [info]: reading ''keyboard.rc'' ...' infoPrintCR.
+Smalltalk fileIn:'keyboard.rc'.
+!
+
"*
* mouse-button translation
*
@@ -209,7 +217,7 @@
* look for a file named 'd_<displayname>.rc' and file it in
*"
-|arguments displayVar display displayType s idx|
+|arguments displayVar display displayType isWindowsDisplay s idx|
"find display name from environment or -display argument"
@@ -225,12 +233,19 @@
displayVar isNil ifTrue:[
displayVar := OperatingSystem getEnvironment:'DISPLAY'.
].
+
+isWindowsDisplay := (Display platformName = 'WIN32').
+
display := displayVar.
-displayVar notNil ifTrue:[
+(displayVar notNil or:[Display platformName = 'WIN32']) ifTrue:[
+ "/ figure out the hostname of the display,
+ "/ to read d_<hostname>.rc
+
((displayVar startsWith:':0')
or:[(displayVar startsWith:'unix:')
- or:[displayVar startsWith:'shm:']]) ifTrue:[
+ or:[displayVar startsWith:'shm:'
+ or:[isWindowsDisplay]]]) ifTrue:[
"running on a local display"
display := OperatingSystem getHostName.
] ifFalse:[
@@ -242,6 +257,17 @@
]
]
].
+
+ "/ if no host specific info,
+ "/ take the display vendow information,
+ "/ to read d_<vendor>.rc
+
+ display isNil ifTrue:[
+ isWindowsDisplay ifTrue:[
+ display := 'windows'
+ ]
+ ].
+
display isNil ifTrue:[
'display.rc [warning]: cannot determine display I am running on' errorPrintCR.
] ifFalse:[
@@ -351,7 +377,8 @@
(displayVar startsWith:':0') ifTrue:[
displayType := OperatingSystem getSystemType.
] ifFalse:[
- (displayVar startsWith:(OperatingSystem getHostName , ':0')) ifTrue:[
+ ((displayVar startsWith:(OperatingSystem getHostName , ':0'))
+ or:[isWindowsDisplay]) ifTrue:[
displayType := OperatingSystem getSystemType.
]
]
@@ -417,13 +444,14 @@
Smalltalk at:#'_ImageDisplayHasGreyscales' put:Display hasGreyscales.
!
-"*
- * set a default style, if not been set by rc-file
- * this is set according the system we are running on.
- * Notice: normally, the below is not needed, since the style
- * is always set by the d_xxx.rc file.
- * Except, when the d_xxx.rc is not present.
- *"
+"/
+"/ set a default style, if not been set by rc-file
+"/ this is set according the system we are running on.
+"/ Notice: normally, the below is not needed, since the style
+"/ is always set by the d_xxx.rc file.
+"/ Except, when the d_xxx.rc is not present.
+"/
+
|type|
View defaultStyle isNil ifTrue:[
@@ -479,3 +507,4 @@
View defaultStyle infoPrintCR
]
!
+