--- a/ResourceSelectionBrowser.st Mon Nov 05 18:26:34 2001 +0100
+++ b/ResourceSelectionBrowser.st Mon Nov 05 18:28:16 2001 +0100
@@ -929,30 +929,24 @@
iconOn:aGC
"registers and returns an icon indicating the resource type"
+ |cls sel image imageKey|
+
self resourceType isNil ifTrue: [^nil].
- icon isNil
- ifTrue:
- [
- |cls sel image imageKey|
+
+ icon isNil ifTrue:[
((self resourceType = #image) or: [resourceType = #fileImage])
- ifTrue:
- [
- cls := method who methodClass soleInstance.
- sel := method who methodSelector.
- ]
- ifFalse:
- [
+ ifTrue:[
+ cls := method mclass theNonMetaclass.
+ sel := method selector.
+ ] ifFalse: [
cls := SystemBrowser.
sel := (resourceType, 'Icon') asSymbol.
].
imageKey := (cls name, sel) asSymbol.
(icon := aGC registeredImageAt: imageKey) isNil
- ifTrue:
- [
+ ifTrue: [
image := cls perform: sel.
- image extent y > 18
- ifTrue:
- [
+ (image extent y > 18) ifTrue: [
image := image magnifiedBy: 18/image extent y
].
aGC registerImage: image key: imageKey.
@@ -960,6 +954,8 @@
].
].
^icon
+
+ "Modified: / 5.11.2001 / 16:48:35 / cg"
!
method: aMethod