[Zope3-checkins] CVS: Zope3/src/zope/app/services - menu.py:1.6

Sidnei da Silva sidnei at x3ng.com.br
Mon Aug 25 11:14:39 EDT 2003


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

Modified Files:
	menu.py 
Log Message:
Make getFactoriesFor(iface) return a list of tuples (name, factory) so it is actually useful for something

=== Zope3/src/zope/app/services/menu.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/services/menu.py:1.5	Tue Aug 19 19:11:05 2003
+++ Zope3/src/zope/app/services/menu.py	Mon Aug 25 10:14:07 2003
@@ -15,7 +15,7 @@
 
 $Id$
 """
-__metaclass__ = type 
+__metaclass__ = type
 
 from persistence import Persistent
 from zope.app import zapi
@@ -57,11 +57,11 @@
 
     # See zope.app.interfaces.publisher.browser.IBrowserMenuItem
     filter_string = u''
-    
+
 
 class LocalBrowserMenu(OrderedContainer):
     """A persistent browser menu that can store menu item objects."""
-    
+
     implements(ILocalBrowserMenu)
 
     # See zope.app.interfaces.publisher.browser.IBrowserMenu
@@ -109,7 +109,7 @@
 class LocalBrowserMenuService(BaseBrowserMenuService, Persistent):
     """This implementation strongly depends on the semantics of
     GlobalBrowserMenuService."""
-    
+
     implements(ILocalBrowserMenuService, ISimpleService)
 
     def __init__(self):
@@ -164,22 +164,22 @@
         if IGlobalBrowserMenuService.isImplementedBy(next):
             return next._registry.get(menu_id, default)
 
-        return next.queryInheritedMenu(menu_id, True, default)        
+        return next.queryInheritedMenu(menu_id, True, default)
     queryInheritedMenu = ContextMethod(queryInheritedMenu)
 
 
     def getAllMenuItems(self, menu_id, object):
         """See zope.app.interfaces.publisher.browser.IBrowserMenuService"""
         result = []
-    
-        # Find the local items, if available 
+
+        # Find the local items, if available
         menu = self.queryLocalMenu(menu_id)
         if menu is not None:
             result += menu.getMenuItems(object)
             # We might not want to inherit menu entries from higher up
             if not menu.inherit:
                 return result
-    
+
         # Try to find the next service and get its items. The next service is
         # also responsible for finding items higher up.
         next = getNextService(self, BrowserMenu)




More information about the Zope3-Checkins mailing list