Album Art tooltip
The album art tooltip is a large verison of the image set as the album art.
This commit is contained in:
parent
a40fc0d4ec
commit
1f85218eba
|
@ -38,12 +38,21 @@ class AlbumArt(Image):
|
|||
self.hide()
|
||||
self.file = None
|
||||
self.set("images/ocarina.png")
|
||||
self.set_has_tooltip(True)
|
||||
self.connect("query-tooltip", self.tooltip)
|
||||
libsaria.event.invite("PRELOAD", self.preload)
|
||||
libsaria.event.invite("POSTGETART", self.set)
|
||||
|
||||
def preload(self, *args):
|
||||
self.file = "images/ocarina.png"
|
||||
|
||||
def tooltip(self, image, x, y, keyboard, tip):
|
||||
image = gtk.Image()
|
||||
image.set_from_file(self.file)
|
||||
image.show()
|
||||
tip.set_custom(image)
|
||||
return True
|
||||
|
||||
def set(self, file=None):
|
||||
gdk.threads_enter()
|
||||
for i in xrange(2):
|
||||
|
|
Loading…
Reference in New Issue