Author: jmorliaguet
Date: Fri Nov 25 14:56:09 2005
New Revision: 1928

Modified:
   cpsskins/branches/jmo-perspectives/configuration/storages/metaconfigure.py
   cpsskins/branches/jmo-perspectives/controllers/theme.py
Log:

- removed storage registry and local theme storages



Modified: 
cpsskins/branches/jmo-perspectives/configuration/storages/metaconfigure.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/configuration/storages/metaconfigure.py  
(original)
+++ cpsskins/branches/jmo-perspectives/configuration/storages/metaconfigure.py  
Fri Nov 25 14:56:09 2005
@@ -19,21 +19,12 @@
 
 from zope.app.component.contentdirective import ContentDirective
 from zope.app.container.interfaces import IReadContainer, IWriteContainer
-from zope.component import getUtility
 from zope.configuration.exceptions import ConfigurationError
 
-from cpsskins.configuration.interfaces import IRegistry
 from cpsskins.storage.interfaces import IStorage
 
-storage_registry = getUtility(IRegistry, 'storages')
-
-def storage(_context,
-           id=None,
-           title=None,
-           description=None,
-           factory=None,
-           interface=None,
-           ):
+def storage(_context, id=None, title=None, description=None, factory=None,
+           interface=None):
 
     if not id:
         raise ConfigurationError("Must specify a storage id.")
@@ -59,5 +50,3 @@
         permission="zope.ManageSite",
         set_schema=(IWriteContainer, interface))
 
-    # register the storage id
-    storage_registry.register(id, factory)

Modified: cpsskins/branches/jmo-perspectives/controllers/theme.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/controllers/theme.py     (original)
+++ cpsskins/branches/jmo-perspectives/controllers/theme.py     Fri Nov 25 
14:56:09 2005
@@ -18,15 +18,11 @@
 __docformat__ = "reStructuredText"
 
 from zope.interface import implements
-from zope.component import getUtility
 
 from cpsskins.controllers import Controller
 from cpsskins.controllers.interfaces import IController
-from cpsskins.configuration.interfaces import IRegistry
 from cpsskins.utils import getThemeManager
 
-storage_registry = getUtility(IRegistry, 'storages')
-
 class ThemeController(Controller):
     """Event handler for themes.
     """
@@ -36,10 +32,6 @@
         """What to do when the element has been added.
         """
         element = self.element
-        # Create a base structure for storages
-        for id in storage_registry:
-            factory = storage_registry[id]
-            element[id] = apply(factory, ())
 
         tmutil = getThemeManager()
         if tmutil.getDefaultTheme() is None:
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to