StandardSystemView.st
changeset 3315 995d017b5107
parent 3301 1bcebb26ecbb
child 3346 bf96cfb1f6ac
--- a/StandardSystemView.st	Wed Sep 27 09:45:41 2000 +0200
+++ b/StandardSystemView.st	Wed Sep 27 15:28:31 2000 +0200
@@ -14,7 +14,7 @@
 
 TopView subclass:#StandardSystemView
 	instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed
-		application windowEventsForApplication'
+		application windowEventsForApplication deviceIcon'
 	classVariableNames:'DefaultIcon IncludeHostNameInLabel DefaultExtent
 		WindowLabelFormat DefaultMinExtent'
 	poolDictionaries:''
@@ -361,19 +361,19 @@
     |n nm i|
 
     (i := DefaultIcon) isNil ifTrue:[
-        i := self classResources at:'ICON' default:nil.
-        i isNil ifTrue:[
-            OperatingSystem platformName == #win32 ifTrue:[
-                n := 'stx_16x16.xpm'.
-            ] ifFalse:[
-                n := 'SmalltalkX.xbm'.
-            ].
-            nm := ClassResources at:'ICON_FILE' default:n.
-            i := Smalltalk imageFromFileNamed:nm inPackage:'stx:libtool'.
-        ].
-        i notNil ifTrue:[
-            DefaultIcon := i := i onDevice:Display
-        ]
+	i := self classResources at:'ICON' default:nil.
+	i isNil ifTrue:[
+	    OperatingSystem platformName == #win32 ifTrue:[
+		n := 'stx_16x16.xpm'.
+	    ] ifFalse:[
+		n := 'SmalltalkX.xbm'.
+	    ].
+	    nm := ClassResources at:'ICON_FILE' default:n.
+	    i := Smalltalk imageFromFileNamed:nm inPackage:'stx:libtool'.
+	].
+	i notNil ifTrue:[
+	    DefaultIcon := i := i onDevice:Display
+	]
     ].
     ^ i
 
@@ -1355,10 +1355,11 @@
     l := self windowLabelFor:label.
 
     icon notNil ifTrue:[
-	icn := self convertedIcon:icon.
-	(icnMask := icon mask) notNil ifTrue:[
-	    icnMask := self convertedIconMask:icnMask
-	]
+        icn := self convertedIcon:icon.
+        (icnMask := icon mask) notNil ifTrue:[
+            icnMask := self convertedIconMask:icnMask
+        ].
+        deviceIcon := icn.
     ].
 
     "/ give global eventListeners a chance to intercept windowCreation
@@ -1368,20 +1369,20 @@
     org := left @ top.
 
     drawableId := device 
-		      createWindowFor:self 
-		      type:nil
-		      origin:org
-		      extent:(width @ height)
-		      minExtent:minExtent
-		      maxExtent:maxExtent
-		      borderWidth:borderWidth
-		      subViewOf:nil 
-		      style:(self windowStyle)
-		      inputOnly:(self isInputOnly)
-		      label:l
-		      owner:nil
-		      icon:icn iconMask:icnMask
-		      iconView:iconView.
+                      createWindowFor:self 
+                      type:nil
+                      origin:org
+                      extent:(width @ height)
+                      minExtent:minExtent
+                      maxExtent:maxExtent
+                      borderWidth:borderWidth
+                      subViewOf:nil 
+                      style:(self windowStyle)
+                      inputOnly:(self isInputOnly)
+                      label:l
+                      owner:nil
+                      icon:icn iconMask:icnMask
+                      iconView:iconView.
 
     Lobby registerChange:self.
 
@@ -1392,7 +1393,7 @@
     originChanged := false.
 
     (borderColor notNil and:[borderColor ~= Black]) ifTrue:[
-	self setBorderColor
+        self setBorderColor
     ].
 
 "/  (viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[
@@ -1404,17 +1405,17 @@
 "/  ].
 
     viewShape notNil ifTrue:[
-	self setViewShape
+        self setViewShape
     ].
 
     (backed notNil and:[backed ~~ false]) ifTrue:[
-	device setBackingStore:backed in:drawableId
+        device setBackingStore:backed in:drawableId
     ].
     self saveUnder ifTrue:[
-	device setSaveUnder:true in:drawableId
+        device setSaveUnder:true in:drawableId
     ].
     cursor notNil ifTrue:[
-	self setCursor
+        self setCursor
     ].
     device setWindowClass:('Stx', self className) name:name in:drawableId.
 
@@ -1446,23 +1447,23 @@
     super recreate.
 
     iconView notNil ifTrue:[
-        iconView recreate.
-        device setWindowIconWindow:iconView in:drawableId.
-        iconView setRealized:true.
+	iconView recreate.
+	device setWindowIconWindow:iconView in:drawableId.
+	iconView setRealized:true.
     ] ifFalse:[
-        icon notNil ifTrue:[
-            i := self convertedIcon:icon.
-            (i notNil and:[i id notNil]) ifTrue:[
-                (m := icon mask) notNil ifTrue:[
-                    m := self convertedIconMask:m.
-                ].
-                device setWindowIcon:i mask:m in:drawableId
-            ]
-        ].
+	icon notNil ifTrue:[
+	    i := self convertedIcon:icon.
+	    (i notNil and:[i id notNil]) ifTrue:[
+		(m := icon mask) notNil ifTrue:[
+		    m := self convertedIconMask:m.
+		].
+		device setWindowIcon:i mask:m in:drawableId
+	    ]
+	].
     ].
 
     iconLabel notNil ifTrue:[
-        device setIconName:iconLabel in:drawableId
+	device setIconName:iconLabel in:drawableId
     ]
 
     "Modified: 4.4.1997 / 16:16:40 / cg"
@@ -1471,6 +1472,6 @@
 !StandardSystemView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.132 2000-09-06 13:50:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.133 2000-09-27 13:28:31 cg Exp $'
 ! !
 StandardSystemView initialize!