[orca] Add some sanity checking to handle dead accessibles from Evolution
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add some sanity checking to handle dead accessibles from Evolution
- Date: Wed, 21 Jan 2015 17:49:21 +0000 (UTC)
commit 71a5316be4eff37767eae1b7f294083f5af56198
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jan 21 12:48:25 2015 -0500
Add some sanity checking to handle dead accessibles from Evolution
src/orca/script_utilities.py | 6 ++++--
.../scripts/apps/evolution/braille_generator.py | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index dc62c0d..0b37080 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -295,6 +295,8 @@ class Utilities:
#
for i in range(row+1, table.nRows):
cell = table.getAccessibleAt(i, col)
+ if not cell:
+ continue
relations = cell.getRelationSet()
for relation in relations:
if relation.getRelationType() \
@@ -2837,14 +2839,14 @@ class Utilities:
def coordinatesForCell(self, obj):
if not (obj and obj.getRole() == pyatspi.ROLE_TABLE_CELL):
- return None
+ return -1, -1
isTable = lambda x: x and 'Table' in pyatspi.listInterfaces(x)
parent = pyatspi.findAncestor(obj, isTable)
try:
table = parent.queryTable()
except:
- return None
+ return -1, -1
index = self.cellIndex(obj)
return table.getRowAtIndex(index), table.getColumnHeader(index)
diff --git a/src/orca/scripts/apps/evolution/braille_generator.py
b/src/orca/scripts/apps/evolution/braille_generator.py
index 56f7b1d..fccf795 100644
--- a/src/orca/scripts/apps/evolution/braille_generator.py
+++ b/src/orca/scripts/apps/evolution/braille_generator.py
@@ -55,7 +55,7 @@ class BrailleGenerator(WebKitGtk.BrailleGenerator):
result, focusedRegion = super().generateBraille(obj, **args)
self._cache = {}
- if focusedRegion != result[0]:
+ if not result or focusedRegion != result[0]:
return [result, focusedRegion]
hasObj = lambda x: isinstance(x, (braille.Component, braille.Text))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]