WarningBox.st
changeset 2786 06de7ca4b263
parent 2785 ac6eb18aa58e
child 3121 8e4d21e008c9
--- a/WarningBox.st	Mon Aug 18 19:13:54 2003 +0200
+++ b/WarningBox.st	Mon Aug 18 19:23:10 2003 +0200
@@ -153,21 +153,11 @@
 
     <resource: #style (#'errorBox.icon' #'errorBox.iconFile')>
 
-    |img imgFileName|
-
     ErrorBitmap isNil ifTrue:[
-        img := self styleSheet at:'errorBox.icon'.
-        img isNil ifTrue:[
-            imgFileName := StyleSheet at:'errorBox.iconFile' default:'bitmaps/Error.xbm'.
-            img := Smalltalk imageFromFileNamed:imgFileName forClass:self.
+        ErrorBitmap := self iconBitmapFromStyle:'errorBox.icon' orStyleFile:'errorBox.iconFile' orFilename:'bitmaps/Error.xbm'.
+        ErrorBitmap isNil ifTrue:[
+            ErrorBitmap := self warnIconBitmap.
         ].
-        img notNil ifTrue:[
-            img := img onDevice:Display
-        ].
-        img isNil ifTrue:[
-            img := self warnIconBitmap.
-        ].
-        ErrorBitmap := img
     ].
     ^ ErrorBitmap
 
@@ -214,18 +204,8 @@
 
     <resource: #style (#'warningBox.icon' #'warningBox.iconFile')>
 
-    |img imgFileName|
-
     WarnBitmap isNil ifTrue:[
-        img := self styleSheet at:'warningBox.icon'.
-        img isNil ifTrue:[
-            imgFileName := StyleSheet at:'warningBox.iconFile' default:'bitmaps/Warning.xbm'.
-            img := Smalltalk imageFromFileNamed:imgFileName forClass:self.
-        ].
-        img notNil ifTrue:[
-            img := img onDevice:Display
-        ].
-        WarnBitmap := img
+        WarnBitmap := self iconBitmapFromStyle:'warningBox.icon' orStyleFile:'warningBox.iconFile' orFilename:'bitmaps/Warning.xbm'.
     ].
     ^ WarnBitmap
 
@@ -283,5 +263,5 @@
 !WarningBox class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.32 2003-08-18 17:13:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/WarningBox.st,v 1.33 2003-08-18 17:23:10 cg Exp $'
 ! !