Simplify the API to get icon/description for objects.
Get rid of the service for now, it's not necessary until we allow activities to extend the mime type -> generic type mapping (post 1.0)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
SUBDIRS = activity bundle clipboard graphics objects presence datastore
|
||||
SUBDIRS = activity bundle clipboard graphics presence datastore
|
||||
|
||||
sugardir = $(pythondir)/sugar
|
||||
sugar_PYTHON = \
|
||||
|
||||
@@ -148,10 +148,7 @@ class CollapsedEntry(CanvasRoundBox):
|
||||
|
||||
mime_type = self.jobject.metadata['mime_type']
|
||||
if not self._icon_name and mime_type:
|
||||
type = objecttype.get_registry().get_type_for_mime(mime_type)
|
||||
if type:
|
||||
self._icon_name = type.icon
|
||||
|
||||
self._icon_name = mime.get_mime_icon(mime_type)
|
||||
if not self._icon_name:
|
||||
self._icon_name = 'image-missing'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user