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 07:34:35 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2009-07-14 07:34:35 (GMT)
commit7b4871ee66b54fc1b31e8e5e3ddc09a90ba9ac98 (patch)
treef9fe183be35d4f95659edb0d4ec7cb976385bf93 /Speak.activity/activity.py
parent16ce908f8277589f9b91caec23e728aaf1644d75 (diff)
Move changed cb to widgets.Voices
Diffstat (limited to 'Speak.activity/activity.py')
-rw-r--r--Speak.activity/activity.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/Speak.activity/activity.py b/Speak.activity/activity.py
index f4b324f..a0d4813 100644
--- a/Speak.activity/activity.py
+++ b/Speak.activity/activity.py
@@ -174,7 +174,7 @@ class SpeakActivity(SharedActivity):
cfg = cjson.decode(file(file_path, 'r').read())
status = self.face.status = face.Status().deserialize(cfg['status'])
- self.change_voice(status.voice.friendlyname, True)
+ self.voice_combo.resume(status.voice.friendlyname)
self.pitchadj.value = self.face.status.pitch
self.rateadj.value = self.face.status.rate
self.mouth_shape_combo.select(status.mouth)
@@ -192,16 +192,10 @@ class SpeakActivity(SharedActivity):
'text' : self.entry.props.text,
'history' : map(lambda i: i[0], self.entrycombo.get_model()) }
file(file_path, 'w').write(cjson.encode(cfg))
-
+
def share_instance(self, connection, is_initiator):
self.chat.messenger = Messenger(connection, is_initiator, self.chat)
- def change_voice(self, voice, silent):
- self.voice_combo.select(voice,
- column=1,
- silent_cb=(silent and self.voice_changed_cb or None))
- self.face.status.voice = self.voice_combo.get_active_item()[0]
-
def _cursor_moved_cb(self, entry, *ignored):
# make the eyes track the motion of the text cursor
index = entry.props.cursor_position
@@ -234,7 +228,7 @@ class SpeakActivity(SharedActivity):
# button.show()
self.voice_combo = widgets.Voices()
- self.voice_combo.select(self.face.status.voice.friendlyname)
+ self.voice_combo.select(name=self.face.status.voice.friendlyname)
combotool = ToolComboBox(self.voice_combo)
voicebar.insert(combotool, -1)
combotool.show()