Author: jmorliaguet
Date: Fri Nov 25 15:29:03 2005
New Revision: 1929

Modified:
   cpsskins/branches/jmo-perspectives/elements/interfaces.py
   cpsskins/branches/jmo-perspectives/elements/theme.py
   cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py
   cpsskins/branches/jmo-perspectives/relations/tool.py
Log:

- removed references to deprecated theme.getStorage()



Modified: cpsskins/branches/jmo-perspectives/elements/interfaces.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/elements/interfaces.py   (original)
+++ cpsskins/branches/jmo-perspectives/elements/interfaces.py   Fri Nov 25 
15:29:03 2005
@@ -240,10 +240,6 @@
         """Set the theme as the default theme.
         """
 
-    def getStorage(iface):
-        """Return the storage implementing the given interface
-        """
-
     def getPerspectiveByName(name):
         """Return a perspective by name
         """

Modified: cpsskins/branches/jmo-perspectives/elements/theme.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/elements/theme.py        (original)
+++ cpsskins/branches/jmo-perspectives/elements/theme.py        Fri Nov 25 
15:29:03 2005
@@ -73,15 +73,6 @@
     def isDefault(self):
         return getThemeManager().isDefault(self)
 
-    def getStorage(self, iface):
-        """Return a storage implementing a given interface
-        """
-        iface_providedBy = iface.providedBy
-        for v in self.values():
-            if not iface_providedBy(v):
-                continue
-            return v
-
     def getPerspectiveByName(self, name):
         """Return a perspective by name."""
         return getUtility(IResourceManager, 'perspectives').lookup(name, self)

Modified: 
cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py     
(original)
+++ cpsskins/branches/jmo-perspectives/engines/default/filters/style/css.py     
Fri Nov 25 15:29:03 2005
@@ -19,11 +19,11 @@
 
 from zope.app.publisher.browser import BrowserView
 from zope.interface import implements, Interface
+from zope.component import getUtility
 
 from cpsskins.engines.default.formats.storage import IFormatStorage
 from cpsskins.engines.default.formats.style import IStyle
 from cpsskins.engines.default.filters.style import ICSSRenderer
-from cpsskins.utils import getThemeManager
 
 class IStylesheetView(Interface):
 
@@ -38,9 +38,7 @@
     def renderCSS(self):
         """Render the styles in CSS
         """
-        tmutil = getThemeManager()
-        theme = tmutil.getEffectiveTheme(self.context)
-        formats = theme.getStorage(IFormatStorage)
+        formats = getUtility(IFormatStorage, context=self.context)
         isStyle = IStyle.providedBy
 
         response = self.request.response

Modified: cpsskins/branches/jmo-perspectives/relations/tool.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/relations/tool.py        (original)
+++ cpsskins/branches/jmo-perspectives/relations/tool.py        Fri Nov 25 
15:29:03 2005
@@ -28,7 +28,6 @@
 
     def __init__(self, context):
         self.context = context
-        # Set the storage
         self.storage = getUtility(IRelationStorage, context=context)
 
     def getStorage(self):
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to