bitmap file finding cleanup
authorClaus Gittinger <cg@exept.de>
Wed, 11 Oct 2006 13:21:46 +0200
changeset 4642 9eb7fed99649
parent 4641 448cfd73ba35
child 4643 2f1b2d98d0b5
bitmap file finding cleanup
Form.st
--- a/Form.st	Tue Oct 10 19:06:07 2006 +0200
+++ b/Form.st	Wed Oct 11 13:21:46 2006 +0200
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libview' }"
 
 GraphicsMedium subclass:#Form
@@ -564,26 +563,25 @@
     "find the bitmap file in one of the standard places;
      return the pathName or nil"
 
-    |aStream path|
+    |path|
 
     ((fileName at:1) == $/) ifTrue:[^ fileName].
     (fileName startsWith:'../') ifTrue:[^ fileName].
     (fileName startsWith:'./') ifTrue:[^ fileName].
     fileName asFilename exists ifTrue:[^ fileName].
 
-    aStream := Smalltalk bitmapFileStreamFor:fileName.
-    aStream notNil ifTrue:[
-	path := aStream pathName.
-	aStream close.
-	^ path
+    path := Smalltalk getBitmapFileName:fileName.
+    path notNil ifTrue:[
+        ^ path
     ].
+
     AdditionalBitmapDirectoryNames notNil ifTrue:[
-	AdditionalBitmapDirectoryNames do:[:aPath |
-	    path := aPath , '/' , fileName.
-	    (OperatingSystem isReadable:path) ifTrue:[
-		^ path
-	    ]
-	]
+        AdditionalBitmapDirectoryNames do:[:aPath |
+            path := aPath , '/' , fileName.
+            (OperatingSystem isReadable:path) ifTrue:[
+                ^ path
+            ]
+        ]
     ].
     ^ nil
 ! !
@@ -1197,7 +1195,6 @@
     "Modified: 23.4.1996 / 10:12:48 / cg"
 ! !
 
-
 !Form methodsFor:'converting'!
 
 asForm
@@ -2174,7 +2171,7 @@
 !Form class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.136 2006-09-18 19:49:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Form.st,v 1.137 2006-10-11 11:21:46 cg Exp $'
 ! !
 
 Form initialize!