Author: jmorliaguet
Date: Sun Apr 30 11:35:10 2006
New Revision: 2990

Modified:
   cpsskins/branches/paris-sprint-2006/setup/configure.zcml
   cpsskins/branches/paris-sprint-2006/standard/io/relation.py
   cpsskins/branches/paris-sprint-2006/standard/io/setting.py
   cpsskins/branches/paris-sprint-2006/standard/io/style.py
Log:

- removed unused exports

- registered field adapters in zcml



Modified: cpsskins/branches/paris-sprint-2006/setup/configure.zcml
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/configure.zcml    (original)
+++ cpsskins/branches/paris-sprint-2006/setup/configure.zcml    Sun Apr 30 
11:35:10 2006
@@ -66,4 +66,12 @@
       factory="cpsskins.setup.io.ListField"
   />
 
+  <adapter
+      factory="cpsskins.setup.io.IntField"
+  />
+
+  <adapter
+      factory="cpsskins.setup.io.BoolField"
+  />
+
 </configure>

Modified: cpsskins/branches/paris-sprint-2006/standard/io/relation.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/io/relation.py (original)
+++ cpsskins/branches/paris-sprint-2006/standard/io/relation.py Sun Apr 30 
11:35:10 2006
@@ -17,14 +17,9 @@
 """
 __docformat__ = "reStructuredText"
 
-import logging
+from zope.interface import implements
 
-import zope.schema
-
-from zope.component import adapts, getMultiAdapter
-from zope.interface import implements, Interface
-
-from cpsskins.elements.interfaces import IIdentifiable, IType
+from cpsskins.elements.interfaces import IIdentifiable
 from cpsskins.setup.interfaces import IDOMAdapter
 from cpsskins.setup.io import BaseDOMAdapter
 

Modified: cpsskins/branches/paris-sprint-2006/standard/io/setting.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/io/setting.py  (original)
+++ cpsskins/branches/paris-sprint-2006/standard/io/setting.py  Sun Apr 30 
11:35:10 2006
@@ -17,15 +17,10 @@
 """
 __docformat__ = "reStructuredText"
 
-import logging
+from zope.component import getMultiAdapter
+from zope.interface import implements
 
-import zope.schema
-
-from zope.component import adapts, getMultiAdapter
-from zope.interface import implements, Interface
-
-from cpsskins.elements.interfaces import IIdentifiable, IType
-from cpsskins.setup.interfaces import ISetting, IResource, IDOMAdapter
+from cpsskins.setup.interfaces import IResource, IDOMAdapter
 from cpsskins.setup.io import BaseDOMAdapter
 
 class DOMAdapter(BaseDOMAdapter):
@@ -39,15 +34,14 @@
 
         document = self.getDocument()
 
-        element = document.createElement(u'setting')
-        element.setAttribute(u'title', context.title)
+        setting_el = document.createElement(u'setting')
+        setting_el.setAttribute(u'title', context.title)
         #element.setAttribute(u'uri', IIdentifiable(resource).getURI())
-        resource_node = node.appendChild(element)
-
-        resource = IResource(context).getResource()
+        node.appendChild(setting_el)
 
         # export the resource
-        exporter = getMultiAdapter((resource, resource_node), IDOMAdapter)
+        resource = IResource(context).getResource()
+        exporter = getMultiAdapter((resource, setting_el), IDOMAdapter)
         exporter.setDocument(document)
         exporter.save()
 

Modified: cpsskins/branches/paris-sprint-2006/standard/io/style.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/io/style.py    (original)
+++ cpsskins/branches/paris-sprint-2006/standard/io/style.py    Sun Apr 30 
11:35:10 2006
@@ -17,11 +17,9 @@
 """
 __docformat__ = "reStructuredText"
 
-from zope.component import adapts
 from zope.interface import implements
 
 from cpsskins.elements.interfaces import IIdentifiable
-from cpsskins.standard.formats.style import IStyle, Style
 from cpsskins.setup.interfaces import IDOMAdapter
 from cpsskins.setup.io import BaseDOMAdapter
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to