diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-05-04 12:22:57 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-05-04 12:22:57 (GMT) |
commit | 24f773dce2548c3e84ed3c3f94975ffc989f5f61 (patch) | |
tree | daf34aeb516bd285c50482ca866f8a9cede277c8 | |
parent | 4174982c9de9ef755a22db6d99782fae44b9eb2b (diff) |
Little fixes to speech feature
Correct logs. Check a different condition for no text selected.
Fix reset speech callback method name
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r-- | speech.py | 2 | ||||
-rw-r--r-- | speech_gst.py | 2 | ||||
-rw-r--r-- | speechtoolbar.py | 4 |
3 files changed, 4 insertions, 4 deletions
@@ -17,7 +17,7 @@ import logging -_logger = logging.getLogger('read-etexts-activity') +_logger = logging.getLogger('write-activity') supported = True diff --git a/speech_gst.py b/speech_gst.py index b827ad9..64d4ee3 100644 --- a/speech_gst.py +++ b/speech_gst.py @@ -19,7 +19,7 @@ import logging import speech -_logger = logging.getLogger('read-etexts-activity') +_logger = logging.getLogger('write-activity') def get_all_voices(): diff --git a/speechtoolbar.py b/speechtoolbar.py index ca6eae5..6d4d56d 100644 --- a/speechtoolbar.py +++ b/speechtoolbar.py @@ -73,7 +73,7 @@ class SpeechToolbar(gtk.Toolbar): combotool = ToolComboBox(self.voice_combo) self.insert(combotool, -1) combotool.show() - speech.reset_buttons_cb = self.reset_buttons_cb + speech.reset_cb = self.reset_buttons_cb speech.end_text_cb = self.reset_buttons_cb def compare_voices(self, a, b): @@ -170,7 +170,7 @@ class SpeechToolbar(gtk.Toolbar): # play selected text, if not, play all abi = self._activity.abiword_canvas selection = abi.get_selection('text/plain') - if selection[1] == 0: + if selection[0] is None or selection[1] == 0: # nothing selected abi.select_all() text = abi.get_selection('text/plain')[0] |