Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Speak.activity/activity.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-07-14 02:25:24 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-07-14 02:25:24 (GMT)
commit27509f29c0123a7ce137233f9b21b1a860c7937c (patch)
tree16c2005b2970af555b60d610bd20cee883ebf408 /Speak.activity/activity.py
parent6814e865787cd1daad3006070f9de4af93cc7d56 (diff)
Create voices combobox widget; make Speak library deploying friendly
Diffstat (limited to 'Speak.activity/activity.py')
-rw-r--r--Speak.activity/activity.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/Speak.activity/activity.py b/Speak.activity/activity.py
index 886b4a2..f4b324f 100644
--- a/Speak.activity/activity.py
+++ b/Speak.activity/activity.py
@@ -45,6 +45,7 @@ import face
import brain
import chat
import espeak
+import widgets
from messenger import Messenger, SERVICE
logger = logging.getLogger('speak')
@@ -59,9 +60,6 @@ class SpeakActivity(SharedActivity):
SharedActivity.__init__(self, self.notebook, SERVICE, handle)
bounds = self.get_allocation()
- # pick a voice that espeak supports
- self.voices = voice.allVoices()
-
# make an audio device for playing back and rendering audio
self.connect( "notify::active", self._activeCb )
@@ -228,20 +226,15 @@ class SpeakActivity(SharedActivity):
def make_voice_bar(self):
voicebar = gtk.Toolbar()
-
+
# button = ToolButton('change-voice')
# button.set_tooltip("Change Voice")
# button.connect('clicked', self.change_voice_cb)
# voicebar.insert(button, -1)
# button.show()
-
- self.voice_combo = ComboBox()
- voicenames = self.voices.keys()
- voicenames.sort()
- for name in voicenames:
- self.voice_combo.append_item(self.voices[name], name)
- self.voice_combo.set_active(voicenames.index(
- self.face.status.voice.friendlyname))
+
+ self.voice_combo = widgets.Voices()
+ self.voice_combo.select(self.face.status.voice.friendlyname)
combotool = ToolComboBox(self.voice_combo)
voicebar.insert(combotool, -1)
combotool.show()