From 40fc6e2e47b956eabc34d8b772c066d8f8f0d530 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 16 Oct 2007 15:18:43 +0000 Subject: 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) --- (limited to 'lib') diff --git a/lib/sugar/Makefile.am b/lib/sugar/Makefile.am index 8c1946d..3446830 100644 --- a/lib/sugar/Makefile.am +++ b/lib/sugar/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = activity bundle clipboard graphics objects presence datastore +SUBDIRS = activity bundle clipboard graphics presence datastore sugardir = $(pythondir)/sugar sugar_PYTHON = \ diff --git a/lib/sugar/graphics/objectchooser.py b/lib/sugar/graphics/objectchooser.py index 114665f..7522a9d 100644 --- a/lib/sugar/graphics/objectchooser.py +++ b/lib/sugar/graphics/objectchooser.py @@ -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' -- cgit v0.9.1