From 78399f5c9a827510094eef25fa24c28a36dffd61 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 31 May 2011 12:58:07 +0000 Subject: Disable word highlighting in epub backend The solution implemented using javascript is not good. There are a problema also, creating tmp files and not removing them. --- diff --git a/epubadapter.py b/epubadapter.py index 38a9991..9b691b8 100644 --- a/epubadapter.py +++ b/epubadapter.py @@ -82,9 +82,14 @@ class EpubViewer(epubview.EpubView): speech.play(more_text) def highlight_next_word(self, word_count): + pass + """ + TODO: disabled because javascript can't be executed + with the velocity needed self.current_word = word_count self._view.highlight_next_word() return True + """ def connect_zoom_handler(self, handler): self._zoom_handler = handler diff --git a/epubview/epubview.py b/epubview/epubview.py index b9f157c..432c332 100644 --- a/epubview/epubview.py +++ b/epubview/epubview.py @@ -552,11 +552,15 @@ class _View(gtk.HBox): if filename != self._loaded_filename: #self._loaded_filename = filename + """ + TODO: disabled because javascript can't be executed + with the velocity needed # Copy javascript to highligth text to speech destpath, destname = os.path.split(filename.replace('file://', '')) shutil.copy('./epubview/highlight_words.js', destpath) self._insert_js_reference(filename.replace('file://', ''), destpath) + """ if filename.endswith('xml'): dest = filename.replace('xml', 'xhtml') -- cgit v0.9.1