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:
Marco Pesenti Gritti
2007-10-16 17:18:43 +02:00
parent 05236c6670
commit 40fc6e2e47
5 changed files with 12 additions and 31 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
SUBDIRS = activity bundle clipboard graphics objects presence datastore
SUBDIRS = activity bundle clipboard graphics presence datastore
sugardir = $(pythondir)/sugar
sugar_PYTHON = \
+1 -4
View File
@@ -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'