check for imagefile without extension first
authorca
Tue, 26 Mar 1996 16:11:57 +0100
changeset 179 14271a2e3625
parent 178 71f018cd6286
child 180 06576076fec7
check for imagefile without extension first
Icon.st
--- a/Icon.st	Mon Mar 25 23:14:40 1996 +0100
+++ b/Icon.st	Tue Mar 26 16:11:57 1996 +0100
@@ -100,10 +100,16 @@
     icon isNil ifTrue:[
         nm := self replacementNameFor:aName.
         nm notNil ifTrue:[
-            icon := Image fromFile:('bitmaps/' , nm , '.xbm').
+            icon := Image fromFile:('bitmaps/' , nm).
+            icon isNil ifTrue:[
+                icon := Image fromFile:('bitmaps/' , nm , '.xbm').
+            ]
         ].
         icon isNil ifTrue:[
-            icon := Image fromFile:('bitmaps/' , aName , '.xbm').
+            icon := Image fromFile:('bitmaps/' , aName).
+            icon isNil ifTrue:[
+                icon := Image fromFile:('bitmaps/' , aName , '.xbm').
+            ].
             icon isNil ifTrue:[
                 ('ICON: no icon named ' , aName) infoPrintNL.
                 ^ nil
@@ -132,6 +138,6 @@
 !Icon class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/Icon.st,v 1.7 1996-03-07 18:37:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/Icon.st,v 1.8 1996-03-26 15:11:57 ca Exp $'
 ! !
 Icon initialize!