Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::media::Media::prettyName (   self,
  limit = config.MAX_LENGTH_DEVICE_NAME 
)

Returns a name for the media, useful for display.

If the media is from a gnomevfs volume, returns the gnome name.

Else. returns the last part of the mount point after stripping out 
underscores.

Definition at line 241 of file media.py.

00241                                                               :
        """ 
        Returns a name for the media, useful for display.
        
        If the media is from a gnomevfs volume, returns the gnome name.
        
        Else. returns the last part of the mount point after stripping out 
        underscores.
        """

        if self.volume:
            return self.volume.get_name(limit)
        else:
            name = os.path.split(self.path)[1]
            name = name.replace('_', ' ')
            v = name
            if limit:
                if len(v) > limit:
                    v = v[:limit] + '...'
            return v
            
    def getPath(self):


Generated by  Doxygen 1.6.0   Back to index