From 9741582464d50c6a3367d9391068095236d3cad9 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Thu, 23 Aug 2012 10:47:43 +0000 Subject: Initial port to Gtk3 and Abiword introspection bindings. Signed-off-by: Carlos Garnacho Signed-off-by: Gonzalo Odiard --- (limited to 'speech_dispatcher.py') diff --git a/speech_dispatcher.py b/speech_dispatcher.py index 4fad27f..99d35d9 100644 --- a/speech_dispatcher.py +++ b/speech_dispatcher.py @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import gtk +from gi.repository import Gdk import time import threading import speechd @@ -105,12 +105,12 @@ class EspeakThread(threading.Thread): if type == speechd.CallbackType.INDEX_MARK: mark = kargs['index_mark'] word_count = int(mark) - gtk.gdk.threads_enter() + Gdk.threads_enter() speech.highlight_cb(word_count) - gtk.gdk.threads_leave() + Gdk.threads_leave() elif type == speechd.CallbackType.END: - gtk.gdk.threads_enter() + Gdk.threads_enter() speech.reset_cb() - gtk.gdk.threads_leave() + Gdk.threads_leave() global done done = True -- cgit v0.9.1