[ocrfeeder] Add missing Gtk.threads_enter/leave call
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Add missing Gtk.threads_enter/leave call
- Date: Mon, 15 Dec 2014 17:12:34 +0000 (UTC)
commit 8865e07c32a0e28ee5c558cb64c9bccdd6c6bfbd
Author: Joaquim Rocha <me joaquimrocha com>
Date: Mon Dec 15 17:02:42 2014 +0000
Add missing Gtk.threads_enter/leave call
Although these calls are deprecated, until we make sure the code
can run without them (calling all GDK/GTK+ code from the main
thread), we need to add them in order to prevent thread related
errors.
Patch originally suggested by: Alberto Garcia <berto igalia com>
src/ocrfeeder/studio/studioBuilder.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/ocrfeeder/studio/studioBuilder.py b/src/ocrfeeder/studio/studioBuilder.py
index 7ada8d3..23c04c5 100644
--- a/src/ocrfeeder/studio/studioBuilder.py
+++ b/src/ocrfeeder/studio/studioBuilder.py
@@ -161,7 +161,9 @@ class Studio:
def run(self):
Gdk.threads_init()
+ Gdk.threads_enter()
Gtk.main()
+ Gdk.threads_leave()
def addImage(self, widget):
file_open_dialog = widgetPresenter.FileDialog('open', file_filters = [(_('Images'), ['image/*'],
[])])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]