[CMF-checkins] CVS: CMF/CMFCore/interfaces - portal_skins.py:1.5.2.1

Shane Hathaway shane@cvs.zope.org
Tue, 20 Aug 2002 18:19:48 -0400


Update of /cvs-repository/CMF/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv27279/interfaces

Modified Files:
      Tag: SkinApplyToSkinnable-branch
	portal_skins.py 
Log Message:
Minor tweaks to runyaga's skinnable patch.  Thanks!

- Updated the interface (which was out of sync anyway)

- Log only fatal errors in setupCurrentSkin(), not failed skin lookups

- Updated a comment (that should have been fixed before anyway)

- Always explicitly return something from getSkin()

- Whitespace normalization


=== CMF/CMFCore/interfaces/portal_skins.py 1.5 => 1.5.2.1 ===
--- CMF/CMFCore/interfaces/portal_skins.py:1.5	Thu Aug  1 15:05:12 2002
+++ CMF/CMFCore/interfaces/portal_skins.py	Tue Aug 20 18:19:47 2002
@@ -22,17 +22,38 @@
     '''
     id = Attribute('id', 'Must be set to "portal_skins"')
 
-    # getSkin__roles__ = ()  # Private
-    def getSkin(request):
-        '''
-        Returns the requested skin object as a tuple:
-        (skinob, skinpath).  Note that self will not normally
-        be wrapped in acquisition, but the request variable is
-        provided so it is possible to access the REQUEST object.
-        '''
+    # Private
+    def getSkinPath(name):
+        """Converts a skin name to a skin path.
+        """
 
-    # getSkinSelections__roles__ = None  # Public
+    # Public
+    def getDefaultSkin():
+        """Returns the default skin name.
+        """
+
+    # Public
+    def getRequestVarname():
+        """Returns the variable name to look for in the REQUEST.
+        """
+
+    # Private
+    def getSkinByPath(path, raise_exc=0):
+        """Returns a skin at the given path.
+
+        A skin path is of the format:
+        'some/path, some/other/path, ...'  The first part has precedence.
+
+        A skin is a specially wrapped object that looks through the layers
+        in the correct order.
+        """
+
+    # Private
+    def getSkinByName(name):
+        """Returns the named skin.
+        """
+
+    # Public
     def getSkinSelections():
-        '''
-        Returns the sorted list of available skin names.
-        '''
+        """Returns the sorted list of available skin names.
+        """