[dasher] Hack to make speech work - activate using control mode.



commit a3e169869ff2568721beea020d3e19e6f1a7fab9
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Tue Jun 2 09:21:34 2009 +0100

    Hack to make speech work - activate using control mode.
---
 ChangeLog                         |    4 ++++
 Src/Gtk2/dasher_action_speech.cpp |    7 ++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 50afe72..a0cacc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-06-01  Patrick Welche  <prlw1 cam ac uk>
+
+	* dasher_action_speech.cpp: Hack to activate speech.
+
 2009-05-21  Patrick Welche  <prlw1 cam ac uk>
 
 	* configure.ac: Look for expat in the X distribution.
diff --git a/Src/Gtk2/dasher_action_speech.cpp b/Src/Gtk2/dasher_action_speech.cpp
index 7ef7121..ad1fa5d 100644
--- a/Src/Gtk2/dasher_action_speech.cpp
+++ b/Src/Gtk2/dasher_action_speech.cpp
@@ -90,11 +90,16 @@ dasher_action_speech_execute(DasherAction *pSelf, DasherEditor *pEditor, int iId
   }
 
   if(szData && (strlen(szData) > 0)) {
+    // XXX PRLW - bolt-on
+    if(pDasherActionSpeechPrivate->speaker == NULL)
+      dasher_action_speech_activate(pSelf);
+    if(pDasherActionSpeechPrivate->speaker == NULL)
+      cerr << "Didn't activate speech\n";
     if(pDasherActionSpeechPrivate->speaker != NULL) {
       GNOME_Speech_Speaker_say(pDasherActionSpeechPrivate->speaker, szData, &(pDasherActionSpeechPrivate->ev));
 
       if(pDasherActionSpeechPrivate->szLast)
-	g_free(pDasherActionSpeechPrivate->szLast);
+        g_free(pDasherActionSpeechPrivate->szLast);
 
       pDasherActionSpeechPrivate->szLast = g_strdup(szData);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]