From 1f85218ebaea0d81a476ce1433a8211f60af73db Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Sun, 7 Nov 2010 15:47:10 -0500 Subject: [PATCH] Album Art tooltip The album art tooltip is a large verison of the image set as the album art. --- ocarina/image.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ocarina/image.py b/ocarina/image.py index 129786a1..0b552794 100644 --- a/ocarina/image.py +++ b/ocarina/image.py @@ -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):