Author: jmorliaguet
Date: Mon Nov  7 20:51:32 2005
New Revision: 29220

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/thememanager.py
Log:

- we use the utility API to find intids and the image cache



Modified: z3lab/cpsskins/branches/jmo-perspectives/thememanager.py
==============================================================================
--- z3lab/cpsskins/branches/jmo-perspectives/thememanager.py    (original)
+++ z3lab/cpsskins/branches/jmo-perspectives/thememanager.py    Mon Nov  7 
20:51:32 2005
@@ -23,7 +23,7 @@
 from zope.app.intid import IntIds
 from zope.app.intid.interfaces import IIntIds
 from zope.app.traversing.api import getParent
-from zope.component import queryUtility, getUtilitiesFor
+from zope.component import queryUtility, getUtilitiesFor, getUtility
 from zope.interface import implements
 
 from caching import ImageCache
@@ -71,15 +71,15 @@
         self.registerUtility(IImageCache, IMAGE_CACHE_NAME)
 
     def registerUtility(self, interface, name):
-        reg = UtilityRegistration(name, interface, self[name])
+        reg = UtilityRegistration('', interface, self[name])
         self.registrationManager.addRegistration(reg)
         reg.status = ActiveStatus
 
     def getIdRegistry(self):
-        return self[UIDS_NAME]
+        return getUtility(IIntIds, '', context=self)
 
     def getImageCache(self):
-        return self[IMAGE_CACHE_NAME]
+        return getUtility(IImageCache, '', context=self)
 
     def registerElement(self, element):
         id = self.getIdRegistry().register(element)
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to