[ocrfeeder] widgetModeler: Make adding an image run only within a thread at a time



commit 0e41408a941763763442aab35f9de72e5e4ac937
Author: Joaquim Rocha <jrocha igalia com>
Date:   Mon Jul 5 10:59:55 2010 +0200

    widgetModeler: Make adding an image run only within a thread at a time

 studio/widgetModeler.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/studio/widgetModeler.py b/studio/widgetModeler.py
index cf8641f..77ce7d4 100644
--- a/studio/widgetModeler.py
+++ b/studio/widgetModeler.py
@@ -70,8 +70,10 @@ class SourceImagesSelector(gobject.GObject):
             pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(path, 150, 100)
         except:
             return
+        gtk.gdk.threads_enter()
         iter = self.list_store.append([path, image_name, pixbuf])
         self.emit('selection_changed', self.isEmpty())
+        gtk.gdk.threads_leave()
         return pixbuf, path, iter
 
     def __countEqualPathsStored(self, path):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]