ocarina: Only set album art once
When we receive a new image, we should check if it is the same as the current image. If it is, we don't need to change anything!
This commit is contained in:
parent
72f7ec90eb
commit
38f1d6ec8c
|
@ -45,7 +45,7 @@ class FileImage(gtk.Image):
|
|||
return self.path
|
||||
|
||||
def set_image(self, path, height):
|
||||
if path != None:
|
||||
if path != self.path:
|
||||
self.path = path
|
||||
self.height = height
|
||||
gtk.threads_enter()
|
||||
|
@ -54,8 +54,6 @@ class FileImage(gtk.Image):
|
|||
gtk.threads_leave()
|
||||
|
||||
def tooltip(self, image, x, y, keyboard, tip):
|
||||
if self.path == None:
|
||||
return
|
||||
image = gtk.Image()
|
||||
image.set_from_file(self.path)
|
||||
tip.set_icon(image.get_pixbuf())
|
||||
|
|
Loading…
Reference in New Issue