[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/ - made the types tool an ordered container

Yvo Schubbe y.2009 at wcm-solutions.de
Fri Dec 4 05:10:12 EST 2009


Log message for revision 106204:
  - made the types tool an ordered container

Changed:
  U   Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
  U   Products.CMFCore/trunk/Products/CMFCore/TypesTool.py
  U   Products.CMFCore/trunk/Products/CMFCore/exportimport/tests/test_typeinfo.py

-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt	2009-12-04 09:43:51 UTC (rev 106203)
+++ Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt	2009-12-04 10:10:11 UTC (rev 106204)
@@ -4,6 +4,9 @@
 2.2.0-beta (unreleased)
 -----------------------
 
+- TypesTool: Made it an ordered container.
+  This allows to control the order of the add actions.
+
 - TypeInformation: Removed redundant 'content_icon' property.
   For backwards compatibility old settings containing 'content_icon' instead
   of 'icon_expr' are converted on import. CMFDefault provides the necessary

Modified: Products.CMFCore/trunk/Products/CMFCore/TypesTool.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/TypesTool.py	2009-12-04 09:43:51 UTC (rev 106203)
+++ Products.CMFCore/trunk/Products/CMFCore/TypesTool.py	2009-12-04 10:10:11 UTC (rev 106204)
@@ -24,7 +24,7 @@
 from Acquisition import aq_get
 from App.class_init import InitializeClass
 from App.special_dtml import DTMLFile
-from OFS.Folder import Folder
+from OFS.OrderedFolder import OrderedFolder
 from OFS.ObjectManager import IFAwareObjectManager
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 from zope.component import getUtility
@@ -640,7 +640,7 @@
     ]
 
 
-class TypesTool(UniqueObject, IFAwareObjectManager, Folder,
+class TypesTool(UniqueObject, IFAwareObjectManager, OrderedFolder,
                 ActionProviderBase):
 
     """ Provides a configurable registry of portal content types.
@@ -654,13 +654,13 @@
 
     security = ClassSecurityInfo()
 
-    manage_options = ( Folder.manage_options[:1]
+    manage_options = ( OrderedFolder.manage_options[:1]
                      + ( {'label':'Aliases',
                           'action':'manage_aliases'}, )
                      + ActionProviderBase.manage_options
                      + ( {'label':'Overview',
                           'action':'manage_overview'}, )
-                     + Folder.manage_options[1:]
+                     + OrderedFolder.manage_options[1:]
                      )
 
     #

Modified: Products.CMFCore/trunk/Products/CMFCore/exportimport/tests/test_typeinfo.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/exportimport/tests/test_typeinfo.py	2009-12-04 09:43:51 UTC (rev 106203)
+++ Products.CMFCore/trunk/Products/CMFCore/exportimport/tests/test_typeinfo.py	2009-12-04 10:10:11 UTC (rev 106204)
@@ -165,8 +165,8 @@
 <?xml version="1.0"?>
 <object name="portal_types" meta_type="CMF Types Tool">
  <property name="title"/>
+ <object name="foo" meta_type="Factory-based Type Information"/>
  <object name="bar" meta_type="Scriptable Type Information"/>
- <object name="foo" meta_type="Factory-based Type Information"/>
 </object>
 """
 
@@ -174,8 +174,8 @@
 <?xml version="1.0"?>
 <object name="portal_types" meta_type="CMF Types Tool">
  <property name="title"/>
+ <object name="foo object" meta_type="Factory-based Type Information"/>
  <object name="bar object" meta_type="Scriptable Type Information"/>
- <object name="foo object" meta_type="Factory-based Type Information"/>
 </object>
 """
 



More information about the checkins mailing list