Album Art tooltip

The album art tooltip is a large verison of the image set as the album
art.
This commit is contained in:
Bryan Schumaker 2010-11-07 15:47:10 -05:00
parent a40fc0d4ec
commit 1f85218eba
1 changed files with 9 additions and 0 deletions

View File

@ -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):