[orca] Add support to identify and present the 'Status' column header in Evolution
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add support to identify and present the 'Status' column header in Evolution
- Date: Tue, 27 Jan 2015 16:57:00 +0000 (UTC)
commit 47d3d74c049778dbb9e8fa843d73a1e309dd3f8e
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Jan 27 11:55:12 2015 -0500
Add support to identify and present the 'Status' column header in Evolution
Note that at the present time, in order for this to work, an additional
patch is needed for Evolution. See bug 743404.
.../scripts/apps/evolution/script_utilities.py | 10 +++++++-
.../scripts/apps/evolution/speech_generator.py | 22 +++++++++++++++++--
2 files changed, 27 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/scripts/apps/evolution/script_utilities.py
b/src/orca/scripts/apps/evolution/script_utilities.py
index 73ca81f..184f451 100644
--- a/src/orca/scripts/apps/evolution/script_utilities.py
+++ b/src/orca/scripts/apps/evolution/script_utilities.py
@@ -68,6 +68,13 @@ class Utilities(WebKitGtk.Utilities):
return candidate
+ def isMessageListStatusCell(self, obj):
+ if not self.isMessageListToggleCell(obj):
+ return False
+
+ header = self.columnHeaderForCell(obj)
+ return header and header.name != obj.name
+
def isMessageListToggleCell(self, obj):
if self.isWebKitGtk(obj):
return False
@@ -78,8 +85,7 @@ class Utilities(WebKitGtk.Utilities):
if not obj.name:
return False
- header = self.columnHeaderForCell(obj)
- return header and header.name == obj.name
+ return True
def realActiveDescendant(self, obj):
if self.isWebKitGtk(obj):
diff --git a/src/orca/scripts/apps/evolution/speech_generator.py
b/src/orca/scripts/apps/evolution/speech_generator.py
index 2ba2e54..87703b7 100644
--- a/src/orca/scripts/apps/evolution/speech_generator.py
+++ b/src/orca/scripts/apps/evolution/speech_generator.py
@@ -45,6 +45,16 @@ class SpeechGenerator(WebKitGtk.SpeechGenerator):
return rv
+ def _isMessageListStatusCell(self, obj):
+ cached = self._cache.get(hash(obj), {})
+ rv = cached.get("isMessageListStatusCell")
+ if rv == None:
+ rv = self._script.utilities.isMessageListStatusCell(obj)
+ cached["isMessageListStatusCell"] = rv
+ self._cache[hash(obj)] = cached
+
+ return rv
+
def _isMessageListToggleCell(self, obj):
cached = self._cache.get(hash(obj), {})
rv = cached.get("isMessageListToggleCell")
@@ -88,6 +98,9 @@ class SpeechGenerator(WebKitGtk.SpeechGenerator):
return rv
def _generateCellCheckedState(self, obj, **args):
+ if self._isMessageListStatusCell(obj):
+ return []
+
if self._isMessageListToggleCell(obj):
if self._isInNewRow(obj) or not self._isFocused(obj):
return []
@@ -101,19 +114,22 @@ class SpeechGenerator(WebKitGtk.SpeechGenerator):
return super()._generateLabel(obj, **args)
def _generateName(self, obj, **args):
- if self._isMessageListToggleCell(obj):
+ if self._isMessageListToggleCell(obj) \
+ and not self._isMessageListStatusCell(obj):
return []
return super()._generateName(obj, **args)
def _generateLabelOrName(self, obj, **args):
- if self._isMessageListToggleCell(obj):
+ if self._isMessageListToggleCell(obj) \
+ and not self._isMessageListStatusCell(obj):
return []
return super()._generateLabelOrName(obj, **args)
def _generateRealActiveDescendantDisplayedText(self, obj, **args):
- if self._isMessageListToggleCell(obj):
+ if self._isMessageListToggleCell(obj) \
+ and not self._isMessageListStatusCell(obj):
if not self._isChecked(obj):
return []
if self._isFocused(obj) and not self._isInNewRow(obj):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]