[orca/gnome-3-34] Correct the position and size reported for selectable table rows
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-34] Correct the position and size reported for selectable table rows
- Date: Sun, 10 Nov 2019 14:54:10 +0000 (UTC)
commit e68143527bf7ac7f2d892e50ef45e585ba2f68a5
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sun Nov 10 09:52:56 2019 -0500
Correct the position and size reported for selectable table rows
src/orca/script_utilities.py | 7 ++++++-
src/orca/speech_generator.py | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 19cf96da7..1bd18f500 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -4555,10 +4555,15 @@ class Utilities:
return result or obj.parent
- def getPositionAndSetSize(self, obj):
+ def getPositionAndSetSize(self, obj, **args):
if not obj:
return -1, -1
+ if obj.getRole() == pyatspi.ROLE_TABLE_CELL and args.get("readingRow"):
+ row, col = self.coordinatesForCell(obj)
+ rowcount, colcount = self.rowAndColumnCount(self.getTable(obj))
+ return row, rowcount
+
isComboBox = obj.getRole() == pyatspi.ROLE_COMBO_BOX
if isComboBox:
selected = self.selectedChildren(obj)
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 7937d789f..ca410882e 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1999,7 +1999,7 @@ class SpeechGenerator(generator.Generator):
result = []
acss = self.voice(SYSTEM)
- position, total = self._script.utilities.getPositionAndSetSize(obj)
+ position, total = self._script.utilities.getPositionAndSetSize(obj, **args)
if position < 0 or total < 0:
return []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]