Author: jmorliaguet
Date: Wed Oct 12 05:05:18 2005
New Revision: 28161

Modified:
   z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/interfaces.py
   
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
Log:

- the 'engines' attribute is now called 'engine' and is a named identifier
  instead of being a list of identifiers.



Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/interfaces.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/interfaces.py    
    (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/engines/interfaces.py    
    Wed Oct 12 05:05:18 2005
@@ -1,5 +1,5 @@
 
-from zope.interface import Interface
+from zope.interface.interfaces import IInterface
 
-class IEngine(Interface):
-    """Theme engines must implement this"""
+class IEngine(IInterface):
+    """A type interface for identifying engines"""

Modified: 
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
==============================================================================
--- 
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
   (original)
+++ 
z3lab/cpsskins/branches/jmo-perspectives/configuration/renderers/metaconfigure.py
   Wed Oct 12 05:05:18 2005
@@ -34,9 +34,9 @@
 
 class Renderer(object):
 
-    def __init__(self, _context, engines, for_):
+    def __init__(self, _context, engine, for_):
         self._context = _context
-        self.engines = engines
+        self.engine = engine
         self.for_ = for_
         self.filters = []
 
@@ -44,21 +44,21 @@
         self.filters.append(name)
 
     def __call__(self):
-        renderer(self._context, self.engines, self.for_)
+        engine = self.engine
+        renderer(self._context, engine, self.for_)
 
         for iface in self.for_:
-            for engine in self.engines:
-                renderer_registry.register((iface, engine), self.filters)
+            renderer_registry.register((iface, engine), self.filters)
 
-def renderer(_context, engines, for_):
+def renderer(_context, engine, for_):
 
     if not for_:
         raise ConfigurationError, \
             "Must specify a list of interfaces for the elements to render."
 
-    if not engines:
+    if not engine:
         raise ConfigurationError, \
-            "Must specify a list of engines."
+            "Must specify a rendering engine."
 
     for iface in for_:
         if iface in registered_adapters:
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to