[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/ Use newer registration apis.

Jim Fulton jim at zope.com
Tue Apr 4 06:52:00 EDT 2006


Log message for revision 66379:
  Use newer registration apis.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/component/interface.py
  U   Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py
  U   Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py
  U   Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py
  U   Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/component/interface.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/interface.py	2006-04-04 10:50:20 UTC (rev 66378)
+++ Zope3/branches/jim-adapter/src/zope/app/component/interface.py	2006-04-04 10:51:59 UTC (rev 66379)
@@ -99,7 +99,7 @@
         iface_type = IInterface
         
     gsm = zapi.getGlobalSiteManager()
-    gsm.provideUtility(iface_type, interface, id, info)
+    gsm.registerUtility(interface, iface_type, id, info)
 
 
 def getInterface(context, id):

Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py	2006-04-04 10:50:20 UTC (rev 66378)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/add.py	2006-04-04 10:51:59 UTC (rev 66379)
@@ -182,4 +182,4 @@
         layer = IDefaultBrowserLayer
     
     s = zapi.getGlobalSiteManager()
-    s.provideAdapter((for_, layer), Interface, name, class_)
+    s.registerAdapter(class_, (for_, layer), Interface, name)

Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py	2006-04-04 10:50:20 UTC (rev 66378)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/editview.py	2006-04-04 10:51:59 UTC (rev 66379)
@@ -146,4 +146,4 @@
         layer = IDefaultBrowserLayer
 
     s = zapi.getGlobalSiteManager()
-    s.provideAdapter((for_, layer), Interface, name, class_)
+    s.registerAdapter(class_, (for_, layer), Interface, name)

Modified: Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py	2006-04-04 10:50:20 UTC (rev 66378)
+++ Zope3/branches/jim-adapter/src/zope/app/form/browser/schemadisplay.py	2006-04-04 10:51:59 UTC (rev 66379)
@@ -82,4 +82,4 @@
         layer = IDefaultBrowserLayer
 
     sm = zapi.getGlobalSiteManager()
-    sm.provideAdapter((for_, layer), Interface, name, class_)
+    sm.registerAdapter(class_, (for_, layer), Interface, name)

Modified: Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py	2006-04-04 10:50:20 UTC (rev 66378)
+++ Zope3/branches/jim-adapter/src/zope/app/onlinehelp/onlinehelp.py	2006-04-04 10:51:59 UTC (rev 66379)
@@ -153,5 +153,5 @@
         #utils = zapi.getService(Utilities)
         #utils.provideUtility(IOnlineHelpTopic, topic, topic.getTopicPath())
 
-        zapi.getGlobalSiteManager().provideUtility(
-            IOnlineHelpTopic, topic, topic.getTopicPath())
+        zapi.getGlobalSiteManager().registerUtility(
+            topic, IOnlineHelpTopic, topic.getTopicPath())



More information about the Zope3-Checkins mailing list