[Zope3-checkins] CVS: Zope3/src/zope/app/form/browser - add.py:1.2 editview.py:1.2 metaconfigure.py:1.2 metadirectives.py:1.3

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 23 17:08:42 EST 2004


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

Modified Files:
	add.py editview.py metaconfigure.py metadirectives.py 
Log Message:


Rip out usage everywhere.




=== Zope3/src/zope/app/form/browser/add.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/form/browser/add.py:1.1	Sat Mar 13 20:11:34 2004
+++ Zope3/src/zope/app/form/browser/add.py	Tue Mar 23 17:08:10 2004
@@ -134,7 +134,7 @@
                    template, default_template, bases, for_,
                    fields, content_factory, arguments,
                    keyword_arguments, set_before_add, set_after_add,
-                   menu=u'', usage=u''):
+                   menu=u''):
 
     s = zapi.getService(None, zapi.servicenames.Presentation)
     class_  = SimpleViewClass(
@@ -152,14 +152,6 @@
     class_._set_after_add = set_after_add
 
     class_.generated_form = ViewPageTemplateFile(default_template)
-
-    if not usage and menu:
-        usage = globalBrowserMenuService.getMenuUsage(menu)
-    if not usage:
-        # usage could be None
-        usage = u''
-    s.useUsage(usage)
-    class_.usage = usage
 
     defineChecker(class_,
                   NamesChecker(


=== Zope3/src/zope/app/form/browser/editview.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/form/browser/editview.py:1.1	Sat Mar 13 20:11:34 2004
+++ Zope3/src/zope/app/form/browser/editview.py	Tue Mar 23 17:08:10 2004
@@ -122,8 +122,7 @@
 
 def EditViewFactory(name, schema, label, permission, layer,
                     template, default_template, bases, for_, fields,
-                    fulledit_path=None, fulledit_label=None, menu=u'',
-                    usage=u''):
+                    fulledit_path=None, fulledit_label=None, menu=u''):
     s = zapi.getService(None, zapi.servicenames.Presentation)
     class_ = SimpleViewClass(template, used_for=schema, bases=bases)
     class_.schema = schema
@@ -137,14 +136,6 @@
     class_.fulledit_label = fulledit_label
 
     class_.generated_form = ViewPageTemplateFile(default_template)
-
-    if not usage and menu:
-        usage = globalBrowserMenuService.getMenuUsage(menu)
-    if not usage:
-        # usage could be None
-        usage = u''
-    s.useUsage(usage)
-    class_.usage = usage
 
     defineChecker(class_,
                   NamesChecker(("__call__", "__getitem__",


=== Zope3/src/zope/app/form/browser/metaconfigure.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/form/browser/metaconfigure.py:1.1	Sat Mar 13 20:11:34 2004
+++ Zope3/src/zope/app/form/browser/metaconfigure.py	Tue Mar 23 17:08:10 2004
@@ -130,7 +130,6 @@
 
     view = AddView
     default_template = 'add.pt'
-    usage = None
     for_ = IAdding
 
     # default add form information
@@ -214,14 +213,13 @@
             args=self._args()+(self.content_factory, self.arguments,
                                  self.keyword_arguments,
                                  self.set_before_add, self.set_after_add),
-            kw={'menu': self.menu, 'usage': self.usage},
+            kw={'menu': self.menu},
             )
 
 class EditFormDirective(BaseFormDirective):
 
     view = EditView
     default_template = 'edit.pt'
-    usage = None
     title = 'Edit'
 
     def _handle_menu(self):
@@ -236,7 +234,7 @@
             discriminator=self._discriminator(),
             callable=EditViewFactory,
             args=self._args(),
-            kw={'menu': self.menu, 'usage': self.usage},
+            kw={'menu': self.menu},
         )
 
 class SubeditFormDirective(BaseFormDirective):
@@ -290,7 +288,7 @@
         self._context.action(
             discriminator = self._discriminator(),
             callable = EditWizardViewFactory,
-            args = self._args()+(self.menu, self.usage, self.use_session)
+            args = self._args()+(self.menu, self.use_session)
             )
 
 class SchemaDisplayDirective(EditFormDirective):
@@ -303,5 +301,5 @@
         self._context.action(
             discriminator = self._discriminator(),
             callable = DisplayViewFactory,
-            args = self._args()+(self.menu, self.usage)
+            args = self._args()+(self.menu,)
             )


=== Zope3/src/zope/app/form/browser/metadirectives.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/form/browser/metadirectives.py:1.2	Sat Mar 20 14:52:45 2004
+++ Zope3/src/zope/app/form/browser/metadirectives.py	Tue Mar 23 17:08:10 2004
@@ -14,15 +14,13 @@
 """
 $Id$
 """
-
 from zope.interface import Interface
 from zope.configuration.fields import GlobalObject, Tokens, Path, \
      Bool, PythonIdentifier, MessageID
 from zope.schema import Text, TextLine, Id
-from zope.app.publisher.interfaces.browser import IUsage
 from zope.app.security.fields import Permission
 
-class ICommonInformation(IUsage):
+class ICommonInformation(Interface):
     """
     Common information for all successive directives
     """




More information about the Zope3-Checkins mailing list