[orca] Fix for bgo#624243 - When editing in eclipse by pressing the tab key the orca sometimes reads the co
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bgo#624243 - When editing in eclipse by pressing the tab key the orca sometimes reads the co
- Date: Sun, 18 Jul 2010 20:45:16 +0000 (UTC)
commit f7479a21f10b02f0df0d3bf3d66f34f1c0f122e0
Author: José Vilmar Estácio de Souza <vilmar informal com br>
Date: Sat Jul 10 23:31:16 2010 -0300
Fix for bgo#624243 - When editing in eclipse by pressing the tab key the orca sometimes reads the contents of the line
src/orca/scripts/apps/Eclipse/script.py | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/apps/Eclipse/script.py b/src/orca/scripts/apps/Eclipse/script.py
index b3ee03d..3e4c12f 100644
--- a/src/orca/scripts/apps/Eclipse/script.py
+++ b/src/orca/scripts/apps/Eclipse/script.py
@@ -60,12 +60,24 @@ class Script(default.Script):
if lastKey in self.movementKeys:
# already spoken in default script
return
-
obj = otherObj or event.source
+
if obj.getState().contains(pyatspi.STATE_SINGLE_LINE):
return
- self.sayLine(obj)
+ # if Tab key is pressed and there is text selected, we must announce
+ # the text selected because probably we are in a parameter list
+ # and we are jumping between the parameters with the tab key.
+ hasSelection = False
+ if lastKey in ["Tab", "ISO_Left_Tab"]:
+ [text, startOffset, endOffset] = self.utilities.selectedText(obj)
+ hasSelection = startOffset > 0 or endOffset > 0
+
+ if hasSelection:
+ self.sayPhrase(obj, startOffset, endOffset)
+ else:
+ self.sayLine(obj)
+
self._saveLastTextPosition(obj)
def onFocus(self, event):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]