MIMETypeIconLibrary.st
changeset 3398 27762e2393d8
parent 3397 68901dc6d90b
child 3399 5f9df070dfed
equal deleted inserted replaced
3397:68901dc6d90b 3398:27762e2393d8
    33  hereby transferred.
    33  hereby transferred.
    34 "
    34 "
    35 ! !
    35 ! !
    36 
    36 
    37 !MIMETypeIconLibrary class methodsFor:'initialization'!
    37 !MIMETypeIconLibrary class methodsFor:'initialization'!
       
    38 
       
    39 flushIcons
       
    40     "remove any cached icons. Call this eg. after a style change"
       
    41 
       
    42     Icons := nil
       
    43 
       
    44     "
       
    45      self flushIcons
       
    46     "
       
    47 !
    38 
    48 
    39 initialize
    49 initialize
    40     "/ now done lazily, when the first icon is asked for
    50     "/ now done lazily, when the first icon is asked for
    41     "/ self initializeIcons
    51     "/ self initializeIcons
    42 !
    52 !
   224     ].
   234     ].
   225     ^ anIcon
   235     ^ anIcon
   226 !
   236 !
   227 
   237 
   228 fileTypeIconKeyFor:aFilename
   238 fileTypeIconKeyFor:aFilename
       
   239     "return an icon-key for a fileName.
       
   240      This does not look at the file's suffix or into the file's contents,
       
   241      for more detailed key i.e. it only returns keys for the common broad categories"
       
   242 
   229     |info|
   243     |info|
   230 
   244 
   231     info := aFilename linkInfo.
   245     info := aFilename linkInfo.
   232     info isNil ifTrue:[
   246     info isNil ifTrue:[
   233         ^ nil.
   247         ^ nil.
   559 ! !
   573 ! !
   560 
   574 
   561 !MIMETypeIconLibrary class methodsFor:'documentation'!
   575 !MIMETypeIconLibrary class methodsFor:'documentation'!
   562 
   576 
   563 version
   577 version
   564     ^ '$Header: /cvs/stx/stx/libview2/MIMETypeIconLibrary.st,v 1.21 2014-11-23 02:23:55 cg Exp $'
   578     ^ '$Header: /cvs/stx/stx/libview2/MIMETypeIconLibrary.st,v 1.22 2014-11-23 13:42:46 cg Exp $'
   565 !
   579 !
   566 
   580 
   567 version_CVS
   581 version_CVS
   568     ^ '$Header: /cvs/stx/stx/libview2/MIMETypeIconLibrary.st,v 1.21 2014-11-23 02:23:55 cg Exp $'
   582     ^ '$Header: /cvs/stx/stx/libview2/MIMETypeIconLibrary.st,v 1.22 2014-11-23 13:42:46 cg Exp $'
   569 ! !
   583 ! !
   570 
   584 
   571 
   585 
   572 MIMETypeIconLibrary initialize!
   586 MIMETypeIconLibrary initialize!