orca r3457 - in trunk: . src/orca src/orca/scripts
- From: richb svn gnome org
- To: svn-commits-list gnome org
- Subject: orca r3457 - in trunk: . src/orca src/orca/scripts
- Date: Mon, 14 Jan 2008 20:01:29 +0000 (GMT)
Author: richb
Date: Mon Jan 14 20:01:29 2008
New Revision: 3457
URL: http://svn.gnome.org/viewvc/orca?rev=3457&view=rev
Log:
* src/orca/default.py:
src/orca/scripts/Evolution.py:
Fix for bug #489504 - Invoking a Say All should result in any
text selection being cleared.
Modified:
trunk/ChangeLog
trunk/src/orca/default.py
trunk/src/orca/scripts/Evolution.py
Modified: trunk/src/orca/default.py
==============================================================================
--- trunk/src/orca/default.py (original)
+++ trunk/src/orca/default.py Mon Jan 14 20:01:29 2008
@@ -1643,7 +1643,7 @@
# context.currentOffset, 0)
#print context.currentOffset, x, y, width, height
#self.drawOutline(x, y, width, height)
- pass
+ return
elif progressType == speechserver.SayAllContext.INTERRUPTED:
#print "INTERRUPTED", context.utterance, context.currentOffset
text.setCaretOffset(context.currentOffset)
@@ -1652,6 +1652,12 @@
orca.setLocusOfFocus(None, context.obj, False)
text.setCaretOffset(context.currentOffset)
+ # If there is a selection, clear it. See bug #489504 for more details.
+ #
+ if text.getNSelections():
+ text.setSelection(0, context.currentOffset, context.currentOffset)
+
+
def sayAll(self, inputEvent):
clickCount = self.getClickCount(self.lastSayAllEvent, inputEvent)
doubleClick = clickCount == 2
Modified: trunk/src/orca/scripts/Evolution.py
==============================================================================
--- trunk/src/orca/scripts/Evolution.py (original)
+++ trunk/src/orca/scripts/Evolution.py Mon Jan 14 20:01:29 2008
@@ -660,7 +660,7 @@
if callbackType == speechserver.SayAllContext.PROGRESS:
#print "PROGRESS", context.utterance, context.currentOffset
- pass
+ return
elif callbackType == speechserver.SayAllContext.INTERRUPTED:
#print "INTERRUPTED", context.utterance, context.currentOffset
offset = context.currentOffset
@@ -678,6 +678,25 @@
obj.queryText().setCaretOffset(context.currentOffset)
orca.setLocusOfFocus(None, obj, False)
+ # If there is a selection, clear it. See bug #489504 for more details.
+ # This is not straight forward with Evolution. all the text is in
+ # an HTML panel which contains multiple panels, each containing a
+ # single text object.
+ #
+ panel = obj.parent
+ htmlPanel = panel.parent
+ for i in range(0, htmlPanel.childCount):
+ panel = htmlPanel.getChildAtIndex(i)
+ if panel != None:
+ textObj = panel.getChildAtIndex(0)
+ try:
+ text = textObj.queryText()
+ except:
+ pass
+ else:
+ if text.getNSelections():
+ text.removeSelection(0)
+
def presentMessageLine(self, obj, newLocusOfFocus):
"""Speak/braille the line at the current text caret offset.
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]