From cbaa8753bd659a121d0a1c867c037887ee8e1784 Mon Sep 17 00:00:00 2001 From: Bryan Schumaker Date: Tue, 2 Nov 2010 17:06:49 -0400 Subject: [PATCH] gdk thread locking for album art use gdk.threads_enter() and gdk.threads_leave() to lock the album art changing section of the AlbumArt class. --- ocarina/image.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ocarina/image.py b/ocarina/image.py index ccab7142..a878af80 100644 --- a/ocarina/image.py +++ b/ocarina/image.py @@ -1,6 +1,7 @@ # Bryan Schumaker (10/24/2010) import libsaria import gtk +gdk = gtk.gdk from libsaria import threads @@ -38,13 +39,13 @@ class AlbumArt(Image): self.file = "images/ocarina.png" def set(self, file=None): - lock.acquire() + gdk.threads_enter() if file != None: self.file = file self.set_from_file(self.file) self.set_height(64) self.show() - lock.release() + gdk.threads_leave() def set_height(self, new_h): size = self.size_request()