--- a/MIMETypeIconLibrary.st Thu Jan 18 17:17:40 2018 +0100
+++ b/MIMETypeIconLibrary.st Thu Jan 18 20:31:08 2018 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 2004 by eXept Software AG
All Rights Reserved
@@ -64,6 +62,10 @@
!
initializeIcons
+ "initialize my icon mapping, which maps MIMEType to icon keys.
+ The iconKey is used as (part of) a selector into the ToolbarIconLibrary
+ (see iconForFile:aFilename)"
+
|icons matchedIcons defaults resources addMapping fileNameToImageMap|
icons := Dictionary new.
@@ -224,7 +226,8 @@
!MIMETypeIconLibrary class methodsFor:'accessing'!
addOnIconsFor:aFilename to:anIcon
- "given a fileName, return an appropriate icon, especially an overlaid icon if linked or locked"
+ "given a fileName, return an appropriate icon,
+ especially an overlaid icon if linked or locked"
|addOnIcon addIcns|
@@ -289,6 +292,10 @@
icn := self iconForKeyMatching:(self iconKeyForFile:aFilename).
^ self addOnIconsFor:aFilename to:icn.
+
+ "
+ self iconForFile:'/foo/bar/baz.c' asFilename
+ "
!
iconForKey:mimeTypeOrKey