예제 #1
0
파일: xmms2.py 프로젝트: curiousleo/kupfer
	def get_thumbnail(self, width, height):
		if not (hasattr(self, "cover_data") or hasattr(self, "cover_file")):
			cover_file = self._get_thumb_local()
			if cover_file:
				self.cover_file = cover_file
			if _MUTAGEN and not hasattr(self, "cover_file"):
				cover_data = self._get_thumb_metadata()
				if cover_data:
					self.cover_data = cover_data

		try:
			if hasattr(self, "cover_file"):
				return icons.get_pixbuf_from_file(self.cover_file, width, height)
			elif hasattr(self, "cover_data"):
				return icons.get_pixbuf_from_data(self.cover_data, width, height)
		except(glib.GError):
			pass
예제 #2
0
    def get_thumbnail(self, width, height):
        if not (hasattr(self, "cover_data") or hasattr(self, "cover_file")):
            cover_file = self._get_thumb_local()
            if cover_file:
                self.cover_file = cover_file
            if _MUTAGEN and not hasattr(self, "cover_file"):
                cover_data = self._get_thumb_metadata()
                if cover_data:
                    self.cover_data = cover_data

        try:
            if hasattr(self, "cover_file"):
                return icons.get_pixbuf_from_file(self.cover_file, width,
                                                  height)
            elif hasattr(self, "cover_data"):
                return icons.get_pixbuf_from_data(self.cover_data, width,
                                                  height)
        except (glib.GError):
            pass
예제 #3
0
파일: contacts.py 프로젝트: pbx/kupfer
 def get_thumbnail(self, width, height):
     if self.image:
         return icons.get_pixbuf_from_data(self.image, width, height)
     return GroupingLeaf.get_thumbnail(self, width, height)
예제 #4
0
 def get_thumbnail(self, width, height):
     if self.image:
         return icons.get_pixbuf_from_data(self.image, width, height)
     return GroupingLeaf.get_thumbnail(self, width, height)
예제 #5
0
	def get_thumbnail(self, width, height):
		if self.image:
			return icons.get_pixbuf_from_data(self.image, width, height)
		return EmailContact.get_thumbnail(self, width, height)
예제 #6
0
파일: __init__.py 프로젝트: jablan/kupfer
 def get_thumbnail(self, width, height):
     if self.image:
         return icons.get_pixbuf_from_data(self.image, width, height)
     return EmailContact.get_thumbnail(self, width, height)
예제 #7
0
	def get_thumbnail(self, width, height):
		if self.thumb:
			return icons.get_pixbuf_from_data(self.thumb, width, height)
		return UrlLeaf.get_thumbnail(self, width, height)