[orca/gnome-3-4] Still more AT-SPI2 timeout handling
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-4] Still more AT-SPI2 timeout handling
- Date: Wed, 11 Apr 2012 18:28:54 +0000 (UTC)
commit 3318ae257903b9dc11e5a4b5b52c45da9a10d979
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Apr 11 14:29:09 2012 -0400
Still more AT-SPI2 timeout handling
src/orca/braille_generator.py | 3 +++
src/orca/scripts/default.py | 8 ++++++--
src/orca/scripts/toolkits/Gecko/script.py | 5 ++++-
src/orca/speech_generator.py | 3 +++
4 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index f28a8c3..510ea30 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -158,6 +158,9 @@ class BrailleGenerator(generator.Generator):
except:
pass
+ if not role:
+ return ''
+
nonlocalized = Atspi.role_get_name(role)
atkRole = Atk.role_for_name(nonlocalized)
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 21e38d7..5803476 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -3306,10 +3306,14 @@ class Script(script.Script):
# name doesn't change. [[[TODO: WDW - I'm hesitant to rip the
# above TODO out, though, because it's been in here for so long.]]]
#
- if self.pointOfReference.get('oldName', None) == event.source.name:
+ try:
+ name = event.source.name
+ except:
+ return
+ if self.pointOfReference.get('oldName', None) == name:
return
- self.pointOfReference['oldName'] = event.source.name
+ self.pointOfReference['oldName'] = name
self.visualAppearanceChanged(event, event.source)
def onSelectionChanged(self, event):
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index 0ccf54a..6361e37 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -2881,7 +2881,10 @@ class Script(default.Script):
if not obj:
return {}
- return dict([attr.split(':', 1) for attr in obj.getAttributes()])
+ try:
+ return dict([attr.split(':', 1) for attr in obj.getAttributes()])
+ except:
+ return {}
def handleAsLiveRegion(self, event):
"""Returns True if the given event (object:children-changed, object:
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 4d98e4f..2404c2b 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -289,6 +289,9 @@ class SpeechGenerator(generator.Generator):
except:
pass
+ if not role:
+ return ''
+
nonlocalized = Atspi.role_get_name(role)
atkRole = Atk.role_for_name(nonlocalized)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]