Author: jmorliaguet
Date: Thu Jun 22 11:58:04 2006
New Revision: 3488

Modified:
   cpsskins/branches/paris-sprint-2006/thememanager.py

Log:

- addTheme and addPage can take a name argument



Modified: cpsskins/branches/paris-sprint-2006/thememanager.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/thememanager.py (original)
+++ cpsskins/branches/paris-sprint-2006/thememanager.py Thu Jun 22 11:58:04 2006
@@ -91,10 +91,10 @@
     def getElementById(id):
         """Return an element by its unique id. """
 
-    def addTheme(theme):
+    def addTheme(theme, name):
         """Add a theme."""
 
-    def addPage(theme, page):
+    def addPage(theme, page, name):
         """Add a page."""
 
     def getThemes():
@@ -222,20 +222,20 @@
     # Themes and pages
     ###################################################################
 
-    def addTheme(self, theme=None):
+    def addTheme(self, theme=None, name=u''):
         if not ITheme.providedBy(theme):
             raise("Must specify a theme.")
 
-        name = INameChooser(self).chooseName(u'', theme)
+        name = INameChooser(self).chooseName(name, theme)
         self[name] = theme
         self.registerUtility(theme, ITheme, name)
         return name
 
-    def addPage(self, theme=None, page=None):
+    def addPage(self, theme=None, page=None, name=u''):
         if not IThemePage.providedBy(page):
             raise("Must specify a theme page.")
 
-        name = INameChooser(theme).chooseName(u'', page)
+        name = INameChooser(theme).chooseName(name, page)
         theme[name] = page
         theme.registerUtility(page, IThemePage, name)
         return name
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to