[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/registration - __init__.py:1.9.6.3

Jim Fulton jim at zope.com
Fri Sep 12 15:15:45 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/services/registration
In directory cvs.zope.org:/tmp/cvs-serv13470/src/zope/app/browser/services/registration

Modified Files:
      Tag: parentgeddon-branch
	__init__.py 
Log Message:
Can't have the tests passing, can we?

=== Zope3/src/zope/app/browser/services/registration/__init__.py 1.9.6.2 => 1.9.6.3 ===
--- Zope3/src/zope/app/browser/services/registration/__init__.py:1.9.6.2	Mon Sep  8 17:15:08 2003
+++ Zope3/src/zope/app/browser/services/registration/__init__.py	Fri Sep 12 15:15:13 2003
@@ -20,8 +20,7 @@
 from zope.app.browser.form.widget import RadioWidget, BrowserWidget
 from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.interfaces.browser.form import IBrowserWidget
-from zope.app.interfaces.container import IAddTarget, INameChooser
-from zope.app.interfaces.container import IRemoveSource
+from zope.app.interfaces.container import INameChooser
 
 from zope.app.interfaces.services.registration import IRegistered
 from zope.app.interfaces.services.registration import UnregisteredStatus
@@ -273,12 +272,11 @@
 
         # Get the registration manager for this folder
         folder = component.__parent__
-        configure = folder.getRegistrationManager()
+        rm = folder.getRegistrationManager()
 
-        name = getAdapter(configure, INameChooser).chooseName('', registration)
-        adder = getAdapter(configure, IAddTarget)
-        name = adder.addObject(name, registration)
-        return container[key]
+        name = getAdapter(rm, INameChooser).chooseName('', registration)
+        rm[name] = registration
+        return registration
 
     def nextURL(self):
         return "@@SelectedManagementView.html"
@@ -332,9 +330,9 @@
 
     def remove_objects(self, key_list):
         """Remove the directives from the container."""
-        remover = getAdapter(self.context, IRemoveSource)
-        for item in key_list:
-            remover.removeObject(item)
+        container = self.context
+        for name in key_list:
+            del container[name]
 
     def configInfo(self):
         """Render View for each directives."""




More information about the Zope3-Checkins mailing list