Author: jmorliaguet
Date: Sun Dec 11 23:36:54 2005
New Revision: 2019

Removed:
   cpsskins/branches/jmo-perspectives/configuration/accesskeys/
   cpsskins/branches/jmo-perspectives/configuration/interfaces.py
   cpsskins/branches/jmo-perspectives/engines/default/accesskeys.zcml
Modified:
   cpsskins/branches/jmo-perspectives/browser/rendering/viewer.py
   cpsskins/branches/jmo-perspectives/configuration/__init__.py
   cpsskins/branches/jmo-perspectives/configuration/meta.zcml
   cpsskins/branches/jmo-perspectives/configuration/storages/__init__.py
   cpsskins/branches/jmo-perspectives/engines/default/configure.zcml
Log:

- removed access keys (they'll be registered as application settings)

- removed the configuration registry (superseded by the resource manager)



Modified: cpsskins/branches/jmo-perspectives/browser/rendering/viewer.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/browser/rendering/viewer.py      
(original)
+++ cpsskins/branches/jmo-perspectives/browser/rendering/viewer.py      Sun Dec 
11 23:36:54 2005
@@ -32,7 +32,6 @@
 from cpsskins.browser.rendering.context import getContexts, ContextInfo
 from cpsskins.browser.rendering.interfaces import (
     IUpdateData, IViewer, IRendererView, IViewNodeEvent)
-from cpsskins.configuration.interfaces import IRegistry
 from cpsskins.elements.interfaces import (
     INodeTraverser, INode, IElement, ISlot, IDisplayable)
 from cpsskins.relations.interfaces import IRelationStorage
@@ -40,8 +39,6 @@
 INFO = logging.INFO
 logger = logging.getLogger()
 
-accesskey_registry = getUtility(IRegistry, 'accesskeys')
-
 class ViewNodeEvent(object):
     implements(IViewNodeEvent)
 
@@ -88,7 +85,7 @@
 
         if globals.engine is None:
             globals.engine = 'default'
-        globals.accesskeys = accesskey_registry.get(globals.engine, [])
+        globals.accesskeys = []
 
         # set the current location unless specified
         if globals.location is None:

Modified: cpsskins/branches/jmo-perspectives/configuration/__init__.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/configuration/__init__.py        
(original)
+++ cpsskins/branches/jmo-perspectives/configuration/__init__.py        Sun Dec 
11 23:36:54 2005
@@ -17,13 +17,6 @@
 """
 __docformat__ = "reStructuredText"
 
-"""Persistent configuration registry
-"""
-
-from BTrees.OOBTree import OOBTree
-from zope.interface import implements
-
-from cpsskins.configuration.interfaces import IRegistry
 from cpsskins.configuration.displays.display import IDisplay, Display
 from cpsskins.configuration.engines.engine import IEngine, Engine
 from cpsskins.configuration.filters.filter import IFilter, Filter
@@ -32,127 +25,3 @@
 from cpsskins.configuration.renderers.renderer import IRenderer, Renderer
 from cpsskins.configuration.widgets.widget import IWidget, Widget
 
-# TODO: this will go away (replaced with utilities)
-
-class ConfigurationRegistry(object):
-    """Configuration registry
-
-    Stores configuration settings.
-
-    >>> r = ConfigurationRegistry()
-    >>> r.register(u'key', 'value')
-
-    >>> r.keys()
-    [u'key']
-
-    >>> r.values()
-    ['value']
-
-    >>> r.items()
-    [(u'key', 'value')]
-
-    >>> dict(r)
-    {u'key': 'value'}
-
-    >>> 'key' in r
-    True
-
-    >>> 'otherkey' in r
-    False
-
-    >>> r.register(u'key', 'value')
-    Traceback (most recent call last):
-    ...
-    KeyError: u"An entry known as 'key' has already been registered"
-
-    >>> r.unregister('somekey')
-    Traceback (most recent call last):
-    ...
-    KeyError: "No entry with the name 'somekey' can be found in the registry."
-
-    >>> r.unregister(u'key')
-
-    >>> r.register(u'key1', 'value1')
-    >>> r.register(u'key2', 'value2')
-
-    >>> r.get('key1')
-    'value1'
-
-    >>> r.get('key3') is None
-    True
-
-    >>> r.get('key3', 'value3')
-    'value3'
-
-    >>> r.items()
-    [(u'key2', 'value2'), (u'key1', 'value1')]
-
-    >>> r.update(u'key2', 'new value2')
-    >>> r.items()
-    [(u'key2', 'new value2'), (u'key1', 'value1')]
-
-    >>> r.update(u'key3', 'new value3')
-    >>> r.items()
-    [(u'key3', 'new value3'), (u'key2', 'new value2'), (u'key1', 'value1')]
-
-    >>> r.clear()
-    >>> r.items()
-    []
-    """
-
-    implements(IRegistry)
-
-    def __init__(self):
-        self._entries = {}
-
-    def keys(self):
-        return list(self._entries.keys())
-
-    def items(self):
-        return list(self._entries.items())
-
-    def values(self):
-        return list(self._entries.values())
-
-    def __iter__(self):
-        return iter(self._entries)
-
-    def has_key(self, id):
-        return id in self
-
-    def __len__(self):
-        return len(self._entries)
-
-    def __delitem__(self, k):
-        del self._entries[k]
-
-    def __setitem__(self, k, v):
-        self._entries[k] = v
-
-    def __getitem__(self, k):
-        return self._entries[k]
-
-    def get(self, k, default=None):
-        if k in self:
-            return self[k]
-        return default
-
-    def update(self, k, v):
-        self[k] = v
-
-    def register(self, k, v):
-        if k in self:
-            raise KeyError, \
-               "An entry known as '%s' has already been registered" % k
-        self.update(k, v)
-
-    def unregister(self, k):
-        if k not in self:
-            raise KeyError, \
-               "No entry with the name '%s' can be found in the registry." % k
-        del self[k]
-
-    def clear(self):
-        for k in self.keys():
-            self.unregister(k)
-

Modified: cpsskins/branches/jmo-perspectives/configuration/meta.zcml
==============================================================================
--- cpsskins/branches/jmo-perspectives/configuration/meta.zcml  (original)
+++ cpsskins/branches/jmo-perspectives/configuration/meta.zcml  Sun Dec 11 
23:36:54 2005
@@ -4,8 +4,6 @@
 
   <include package=".filters" file="meta.zcml" />
 
-  <include package=".accesskeys" file="meta.zcml" />
-
   <include package=".engines" file="meta.zcml" />
 
   <include package=".renderers" file="meta.zcml" />

Modified: cpsskins/branches/jmo-perspectives/configuration/storages/__init__.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/configuration/storages/__init__.py       
(original)
+++ cpsskins/branches/jmo-perspectives/configuration/storages/__init__.py       
Sun Dec 11 23:36:54 2005
@@ -17,10 +17,3 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.component import provideUtility
-
-from cpsskins.configuration import ConfigurationRegistry
-from cpsskins.configuration.interfaces import IRegistry
-
-provideUtility(ConfigurationRegistry(), IRegistry, 'storages')
-

Modified: cpsskins/branches/jmo-perspectives/engines/default/configure.zcml
==============================================================================
--- cpsskins/branches/jmo-perspectives/engines/default/configure.zcml   
(original)
+++ cpsskins/branches/jmo-perspectives/engines/default/configure.zcml   Sun Dec 
11 23:36:54 2005
@@ -1,14 +1,11 @@
 <configure
     xmlns="http://namespaces.zope.org/cpsskins";>
 
-  <!-- Access keys -->
-
-  <include file="accesskeys.zcml" />
-
   <!-- Default engine's displays -->
 
   <include package=".displays" />
 
+
   <!-- Default engine's formats -->
 
   <include package=".formats" />
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to