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