Logo Search packages:      
Sourcecode: zope-cpsskins version File versions  Download package

def CPSSkins::PortalTheme::PortalTheme::findIdenticalStylesByType (   self,
  meta_type = None 
)

Returns a list of a list of styles that have identical properties

Definition at line 540 of file PortalTheme.py.

00540                                                        :
        """
        Returns a list of a list of styles that have identical properties
        """

        if meta_type is None:
            return None

        groups = []
        props = []
        for style in self.findStyles(meta_type=meta_type):
            properties = style.propertyValues()[1:]
            for i in range(len(groups)):
                group = groups[i]
                if properties == props[i]:
                    groups[i].append(style)
                    break
            groups.append([style])
            props.append(properties)
        final_groups = []
        for group in groups:
            if len(group) > 1:
                final_groups.append(group)
        return final_groups


    #
    # Palettes


Generated by  Doxygen 1.6.0   Back to index