[Zope3-checkins] CVS: Zope3/src/zope/app/browser - introspector.zcml:1.2 menus.zcml:1.4

Godefroid Chapelle gotcha@swing.be
Fri, 11 Apr 2003 18:16:15 -0400


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

Modified Files:
	introspector.zcml menus.zcml 
Log Message:
- added usage argument to ZCML menu directive
  The menu usage is used by the configuration to initialize 
  the page view usage in case a page is registered as a
  menu item included in a menu declared with a usage argument.

- added corresponding tests

- various ZCML refactorings to improve usage initialization

- added tests for menu and usage on page directive



=== Zope3/src/zope/app/browser/introspector.zcml 1.1 => 1.2 ===
--- Zope3/src/zope/app/browser/introspector.zcml:1.1	Fri Feb  7 10:48:36 2003
+++ Zope3/src/zope/app/browser/introspector.zcml	Fri Apr 11 18:15:44 2003
@@ -1,22 +1,25 @@
 <zopeConfigure xmlns='http://namespaces.zope.org/browser'>
 <!-- Introspection -->
 
-  <!-- XXX wrong perm  -->
-  <page
+  <!--page
       name="classBrowser.html"
       for = "zope.interface.Interface"
-      permission="zope.View" 
+      permission="zope.ManageServices" 
       template="introspector.pt"
       class="zope.app.browser.introspector.IntrospectorView"
-      />
-
-  <menuItem 
-      for = "zope.interface.Interface" 
       title="Introspector" 
       menu="zmi_views" 
-      action="classBrowser.html"
+      /-->
+  <pages
+      for = "zope.interface.Interface"
+      permission="zope.ManageServices" 
+      class="zope.app.browser.introspector.IntrospectorView" >
+      <page name="classBrowser.html"
+            title="Introspector" 
+            template="introspector.pt"
+            menu="zmi_views" 
       />
-
+    </pages>
 
   <page
       name="index.html"


=== Zope3/src/zope/app/browser/menus.zcml 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/menus.zcml:1.3	Mon Mar 24 09:58:30 2003
+++ Zope3/src/zope/app/browser/menus.zcml	Fri Apr 11 18:15:44 2003
@@ -1,33 +1,34 @@
 <zopeConfigure xmlns="http://namespaces.zope.org/browser">
 
-    <menu 
-       id="zmi_views" 
-       title="Menu for displaying alternate representations of an object"
-       />
+    <menu id="zmi_views" 
+          title="Menu for displaying alternate representations of an object"
+          usage="objectview"
+          />
 
-    <menu
-       id="zmi_actions" 
-       title="Menu for displaying actions to be performed"
-       />
+    <menu id="zmi_actions" 
+          title="Menu for displaying actions to be performed"
+          usage="activitydialog"
+          />
 
-   <menu
-        id="add_content"
-        title="Menu of objects to be added to content folders"
-        />
+   <menu id="add_content"
+         title="Menu of objects to be added to content folders"
+         usage="addingdialog"
+         />
 
-   <menu
-        id="add_component"
-        title="Menu of objects to be added to service manager packages"
-        />
+   <menu id="add_component"
+         title="Menu of objects to be added to service manager packages"
+         usage="addingdialog"
+         />
 
-   <menu
-      id="add_service"
-      title="Menu of services to be added"
-      />
+   <menu id="add_service"
+         title="Menu of services to be added"
+         usage="addingdialog"
+         />
 
    <menu id="add_configuration"
-        title="Menu of addable configuration objects"
-        />
+         title="Menu of addable configuration objects"
+         usage="addingdialog"
+         />
 
   <!-- Management view selector -->
   <!-- Get first accessable item from zmi_views menu -->