All pastes #80990 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-07-07 00:41 UTC
rendered paste body
    def getSmallIcon(self, instance):
        """
        getIcon(self, instance) => return the underlying file class icon (object)
        """
        handler = self._getHandler(instance)
        return getattr(instance, handler.getSmallIconFile(self, instance))

    def _reset(self, instance, ):
        """reset volatile stuff (indexation, preview)
        """
        name = self.getName()
        setattr(instance, _preview_ % name, None)
        setattr(instance, _indexed_ % name, None)