[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - globalbrowsermenuservice.py:1.30 icon.py:1.13 metaconfigure.py:1.18 viewmeta.py:1.40

Suresh Babu Eddala sbabu at zeomega.com
Fri Mar 5 10:56:22 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv12044/src/zope/app/publisher/browser

Modified Files:
	globalbrowsermenuservice.py icon.py metaconfigure.py 
	viewmeta.py 
Log Message:


removed local interface service stuff, it uses global utility service.




=== Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py 1.29 => 1.30 ===
--- Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py:1.29	Tue Mar  2 12:40:51 2004
+++ Zope3/src/zope/app/publisher/browser/globalbrowsermenuservice.py	Fri Mar  5 10:55:51 2004
@@ -21,7 +21,6 @@
 from zope.exceptions import DuplicationError, Unauthorized, Forbidden
 from zope.interface.type import TypeRegistry
 from zope.interface import implements
-from zope.app.services.servicenames import Interfaces
 from zope.security.checker import CheckerPublic
 from zope.security.management import getSecurityManager
 from zope.app.security.permission import checkPermission
@@ -33,6 +32,7 @@
 from zope.app.publication.browser import PublicationTraverser
 from zope.security.proxy import ProxyFactory
 from zope.app import zapi
+from zope.app.component.interface import provideInterface
 
 class Menu:
     """Browser menu"""
@@ -267,11 +267,11 @@
     def __call__(self, _context):
         _context.action(
             discriminator = None,
-            callable = handler,
-            args = (Interfaces, 'provideInterface',
-                    self.interface.__module__+'.'+self.interface.getName(),
+            callable = provideInterface,
+            args = (self.interface.__module__+'.'+self.interface.getName(),
                     self.interface)
             )
+        
 
 globalBrowserMenuService = GlobalBrowserMenuService()
 


=== Zope3/src/zope/app/publisher/browser/icon.py 1.12 => 1.13 ===
--- Zope3/src/zope/app/publisher/browser/icon.py:1.12	Fri Nov 21 12:10:25 2003
+++ Zope3/src/zope/app/publisher/browser/icon.py	Fri Mar  5 10:55:51 2004
@@ -26,7 +26,7 @@
 from zope.app.traversing.namespace import getResourceInContext
 from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.configuration.exceptions import ConfigurationError
-from zope.app.services.servicenames import Interfaces
+from zope.app.component.interface import provideInterface
 
 __metaclass__ = type
 
@@ -99,10 +99,12 @@
                 for_, name, IBrowserRequest,
                 vfactory, layer)
         )
+
     _context.action(
         discriminator = None,
-        callable = handler,
-        args = (Interfaces, 'provideInterface',
-                for_.__module__+'.'+for_.getName(),
+        callable = provideInterface,
+        args = (for_.__module__+'.'+for_.getName(),
                 for_)
         )
+
+    


=== Zope3/src/zope/app/publisher/browser/metaconfigure.py 1.17 => 1.18 ===
--- Zope3/src/zope/app/publisher/browser/metaconfigure.py:1.17	Wed Mar  3 05:38:49 2004
+++ Zope3/src/zope/app/publisher/browser/metaconfigure.py	Fri Mar  5 10:55:51 2004
@@ -18,8 +18,6 @@
 
 from zope.app import zapi
 from zope.publisher.interfaces.browser import IBrowserRequest
-from zope.app.services.servicenames import Interfaces
-
 from zope.app.component.metaconfigure import skin, layer, usage
 from zope.app.component.metaconfigure import handler
 from zope.app.container.interfaces import IAdding
@@ -31,8 +29,8 @@
 from zope.app.publisher.browser.resourcemeta import resource, \
      resourceDirectory
 from zope.app.publisher.browser.i18nresourcemeta import I18nResource
-
 from zope.app.publisher.browser.viewmeta import view
+from zope.app.component.interface import provideInterface
 
 def defaultView(_context, name, for_=None, **__kw):
 
@@ -51,11 +49,11 @@
     if for_ is not None:
         _context.action(
             discriminator = None,
-            callable = handler,
-            args = (Interfaces, 'provideInterface',
-                    for_.__module__+'.'+for_.getName(),
+            callable = provideInterface,
+            args = (for_.__module__+'.'+for_.getName(),
                     for_)
             )
+
 
 _next_id = 0
 def addMenuItem(_context, title, class_=None, factory=None, description='',


=== Zope3/src/zope/app/publisher/browser/viewmeta.py 1.39 => 1.40 ===
--- Zope3/src/zope/app/publisher/browser/viewmeta.py:1.39	Wed Mar  3 05:38:49 2004
+++ Zope3/src/zope/app/publisher/browser/viewmeta.py	Fri Mar  5 10:55:51 2004
@@ -21,10 +21,15 @@
 from zope.configuration.exceptions import ConfigurationError
 from zope.exceptions import NotFoundError
 from zope.interface import implements, classImplements, Interface
-from zope.publisher.interfaces.browser import \
-     IBrowserPublisher, IBrowserRequest, IBrowserPublisher
-from zope.security.checker import CheckerPublic, Checker, defineChecker
-
+from zope.publisher.interfaces.browser import IBrowserPublisher
+from zope.exceptions import NotFoundError
+from zope.security.checker import CheckerPublic, Checker
+from zope.security.checker import defineChecker
+from zope.configuration.exceptions import ConfigurationError
+from zope.app.component.interface import provideInterface
+from zope.publisher.interfaces.browser import IBrowserRequest
+from zope.publisher.interfaces.browser import IBrowserPublisher
+from zope.app.publisher.browser import BrowserView
 from zope.app import zapi
 from zope.app.component.metaconfigure import handler
 from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
@@ -33,7 +38,7 @@
 from zope.app.publisher.browser.globalbrowsermenuservice import \
      menuItemDirective, globalBrowserMenuService
 from zope.app.security.permission import checkPermission
-from zope.app.services.servicenames import Interfaces
+
 
 
 # There are three cases we want to suport:
@@ -165,6 +170,7 @@
                               required)
     _handle_allowed_attributes(_context, allowed_interface, permission,
                                required)
+
     _handle_for(_context, for_)
 
     defineChecker(new_class, Checker(required))
@@ -362,12 +368,13 @@
         if self.provides is not None:
             _context.action(
                 discriminator = None,
-                callable = handler,
-                args = (Interfaces, 'provideInterface',
-                        self.provides.__module__+'.'+self.provides.__name__,
+                callable = provideInterface,
+                args = (self.provides.__module__+'.'+self.provides.__name__,
                         self.provides)
                 )
 
+            
+
 
         _context.action(
             discriminator = ('view', for_, name, IBrowserRequest, layer,
@@ -404,10 +411,10 @@
     if for_ is not None:
         _context.action(
             discriminator = None,
-            callable = handler,
-            args = (Interfaces, 'provideInterface',
-                    for_.__module__+'.'+for_.getName(), for_)
+            callable = provideInterface,
+            args = (for_.__module__+'.'+for_.getName(), for_)
             )
+        
 
 def _handle_menu(_context, menu, title, for_, name, permission):
     if menu or title:
@@ -442,9 +449,10 @@
         for i in allowed_interface:
             _context.action(
                 discriminator = None,
-                callable = handler,
-                args = (Interfaces, 'provideInterface', None, i)
+                callable = provideInterface,
+                args = (None, i)
                 )
+            
             for name in i:
                 required[name] = permission
 
@@ -463,9 +471,10 @@
     if for_ is not None:
         _context.action(
             discriminator = None,
-            callable = handler,
-            args = (Interfaces, 'provideInterface', None, for_)
+            callable = provideInterface,
+            args = (None, for_)
             )
+        
 
 class simple(BrowserView):
     implements(IBrowserPublisher)




More information about the Zope3-Checkins mailing list