[orca] Additional fix for bug 543157 - It is not always possible to distinguish on-screen text from Orca's



commit 14310044f5a4d875c0ba8ca7119f2751e462c046
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Mon Aug 16 14:03:52 2010 -0400

    Additional fix for bug 543157 - It is not always possible to distinguish on-screen text from Orca's "system" messages
    
    This causes the system voice to be used for items which are not
    actual text but part of the content displayed by notify-osd.

 src/orca/scripts/apps/notify-osd/script.py |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/scripts/apps/notify-osd/script.py b/src/orca/scripts/apps/notify-osd/script.py
index fa3ba14..8709d25 100644
--- a/src/orca/scripts/apps/notify-osd/script.py
+++ b/src/orca/scripts/apps/notify-osd/script.py
@@ -26,6 +26,7 @@ __copyright__ = "Copyright (c) 2009 Eitan Isaacson"
 __license__   = "LGPL"
 
 import orca.default as default
+import orca.settings as settings
 import orca.speech as speech
 
 from orca.orca_i18n import _
@@ -74,14 +75,21 @@ class Script(default.Script):
         except NotImplementedError:
             value = -1
             
+        utterances = []
         if value < 0:
-            # Not a gauge notification.
-            texts = [event.source.name, event.source.description]
             # Translators: This denotes a notification to the user of some sort.
             #
-            text = _('Notification %s') % ' '.join(texts)
+            utterances.append(_('Notification'))
+            utterances.append(self.voices.get(settings.SYSTEM_VOICE))
+            utterances.append('%s %s' \
+                              % (event.source.name, event.source.description))
+            utterances.append(self.voices.get(settings.DEFAULT_VOICE))
         else:
-            text = '%s %d' % (event.source.name, value)
+            # A gauge notification, e.g. the Ubuntu volume notification that
+            # appears when you press the multimedia keys.
+            #
+            utterances.append('%s %d' % (event.source.name, value))
+            utterances.append(self.voices.get(settings.SYSTEM_VOICE))
         
-        speech.speak(text, None, True)
+        speech.speak(utterances, None, True)
 



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