Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@sugarlabs.org>2011-02-22 13:57:04 (GMT)
committer Gonzalo Odiard <godiard@sugarlabs.org>2011-02-22 13:57:04 (GMT)
commitfa4d04f9601c2e6f4406279105eaff3e5374348b (patch)
tree4a9eccc476668db2d862592f8ca99cdbf760e5fc
parent16ad717ec7aefe9677f33206f47272462ff4d8a3 (diff)
Don't init speech toolbar if speech is not supported
-rw-r--r--readtoolbar.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/readtoolbar.py b/readtoolbar.py
index 1da23bf..3366c4e 100644
--- a/readtoolbar.py
+++ b/readtoolbar.py
@@ -301,6 +301,9 @@ class SpeechToolbar(gtk.Toolbar):
gtk.Toolbar.__init__(self)
voicebar = gtk.Toolbar()
self.activity = activity
+ if not speech.supported:
+ return
+
self.sorted_voices = [i for i in speech.voices()]
self.sorted_voices.sort(self.compare_voices)
default = 0