[orca/gnome-3-12] Delete an unused and unneeded method



commit 38e361a818aeda88bf34e4b465a0e5d3693b6b4c
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Mar 18 10:00:39 2014 -0400

    Delete an unused and unneeded method

 src/orca/scripts/default.py |   74 -------------------------------------------
 1 files changed, 0 insertions(+), 74 deletions(-)
---
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 4591d79..b43fa0c 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -3019,80 +3019,6 @@ class Script(script.Script):
         if text.getNSelections():
             text.setSelection(0, context.currentOffset, context.currentOffset)
 
-    def _speakContiguousSelection(self, obj, relationship):
-        """Check if the contiguous object has a selection. If it does, then
-        speak it. If the user pressed Shift-Down, then look for an object
-        with a RELATION_FLOWS_FROM relationship. If they pressed Shift-Up,
-        then look for a RELATION_FLOWS_TO relationship.
-
-        Arguments:
-        - the current text object
-        - the flows relationship (RELATION_FLOWS_FROM or RELATION_FLOWS_TO).
-
-        Returns an indication of whether anything was spoken.
-        """
-
-        lastPos = self.pointOfReference.get("lastCursorPosition")
-
-        # Reasons to NOT speak contiguous selections:
-        #
-        # 1. The new cursor position is in the same object as the old
-        #    cursor position. (The change in selection is all within
-        #    the current object.)
-        # 2. If we are selecting up line by line from the beginning of
-        #    the line and have just crossed into a new object, the change
-        #    in selection is the previous line (which has just become
-        #    selected).  Nothing has changed on the line we came from.
-        #
-        if self.utilities.isSameObject(lastPos[0], obj) \
-           or relationship == pyatspi.RELATION_FLOWS_TO and lastPos[1] == 0:
-            return False
-
-        selSpoken = False
-        current = obj
-        for relation in current.getRelationSet():
-            if relation.getRelationType() == relationship:
-                obj = relation.getTarget(0)
-                objText = obj.queryText()
-
-                # When selecting down across paragraph boundaries, what
-                # we've (un)selected on (what is now) the previous line
-                # is from wherever the cursor used to be to the end of
-                # the line.
-                #
-                if relationship == pyatspi.RELATION_FLOWS_FROM:
-                    start, end = lastPos[1], objText.characterCount
-
-                # When selecting up across paragraph boundaries, what
-                # we've (un)selected on (what is now) the next line is
-                # from the beginning of the line to wherever the cursor
-                # used to be.
-                #
-                else:
-                    start, end = 0, lastPos[1]
-
-                if objText.getNSelections() > 0:
-                    [textContents, startOffset, endOffset] = \
-                        self.utilities.selectedText(obj)
-
-                    # Now that we have the full selection, adjust based
-                    # on the relation type. (see above comment)
-                    #
-                    startOffset = start or startOffset
-                    endOffset = end or endOffset
-                    self.sayPhrase(obj, startOffset, endOffset)
-                    selSpoken = True
-                else:
-                    # We don't have selections in this object. But we're
-                    # here, which means that something is selected in a
-                    # neighboring object and the text in this object must
-                    # have just become unselected and needs to be spoken.
-                    #
-                    self.sayPhrase(obj, start, end)
-                    selSpoken = True
-
-        return selSpoken
-
     def echoPreviousSentence(self, obj):
         """Speaks the sentence prior to the caret, as long as there is
         a sentence prior to the caret and there is no intervening sentence


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