[orca] Eliminate terminal chattiness



commit e0f3490520f0927067c476d6e33ad6dce9003d28
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Feb 18 19:57:12 2016 -0500

    Eliminate terminal chattiness

 src/orca/formatting.py       |    4 ++--
 src/orca/generator.py        |    8 ++++++++
 src/orca/speech_generator.py |   27 ---------------------------
 3 files changed, 10 insertions(+), 29 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 7fe8cc7..bb2f6c0 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -414,8 +414,8 @@ formatting = {
             'unfocused': 'labelOrName + roleName + availability '
             },
         pyatspi.ROLE_TERMINAL: {
-            'focused': 'terminal',
-            'unfocused': 'terminal',
+            'focused': 'textContent',
+            'unfocused': 'textContent',
             'basicWhereAmI': 'label + readOnly + pause + textRole + pause + textContent + anyTextSelection + 
' + MNEMONIC,
             'detailedWhereAmI': 'label + readOnly + pause + textRole + pause + textContentWithAttributes + 
anyTextSelection + ' + MNEMONIC
             },
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 9472e10..a40d4e2 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -372,6 +372,14 @@ class Generator:
         represent the description of the object, if that description
         is different from that of the name and label.
         """
+
+        role = args.get('role', obj.getRole())
+
+        # The text in the description is the same as the text in the page
+        # tab and similar to (and sometimes the same as) the prompt.
+        if role == pyatspi.ROLE_TERMINAL:
+            return []
+
         result = []
         if obj.description:
             label = self._script.utilities.displayedLabel(obj) or ""
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 125b30d..2d90542 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -937,33 +937,6 @@ class SpeechGenerator(generator.Generator):
 
     #####################################################################
     #                                                                   #
-    # Terminal information                                              #
-    #                                                                   #
-    #####################################################################
-
-    def _generateTerminal(self, obj, **args):
-        """Returns an array of strings (and possibly voice and audio
-        specifications) used especially for handling terminal objects.
-        This either is the name of the frame the terminal is in or the
-        displayed label of the terminal.  [[[WDW - it might be nice
-        to return an empty array if this is not a terminal.]]]
-        """
-        result = []
-        acss = self.voice(DEFAULT)
-        title = None
-        frame = self._script.utilities.ancestorWithRole(
-            obj, [pyatspi.ROLE_FRAME], [])
-        if frame:
-            title = frame.name
-        if not title:
-            title = self._script.utilities.displayedLabel(obj)
-        result.append(title)
-        if result:
-            result.extend(acss)
-        return result
-
-    #####################################################################
-    #                                                                   #
     # Text interface information                                        #
     #                                                                   #
     #####################################################################


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