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 /speechtoolbar.py | |
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>
Diffstat (limited to 'speechtoolbar.py')
-rw-r--r-- | speechtoolbar.py | 4 |
1 files changed, 2 insertions, 2 deletions
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] |