[orca] Don't look for unrelated labels if the root object contains a page tab list
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Don't look for unrelated labels if the root object contains a page tab list
- Date: Tue, 8 Sep 2015 17:28:50 +0000 (UTC)
commit b02b0d43e61c0576b51635196756f3414bd53491
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Sep 8 13:26:33 2015 -0400
Don't look for unrelated labels if the root object contains a page tab list
src/orca/script_utilities.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 394f395..bbbbd95 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1528,6 +1528,10 @@ class Utilities:
return rv
+ def hasPageTabList(self, root):
+ isPageTabList = lambda x: x and x.getRole() == pyatspi.ROLE_PAGE_TAB_LIST
+ return pyatspi.findDescendant(root, isPageTabList) is not None
+
def unrelatedLabels(self, root, onlyShowing=True):
"""Returns a list containing all the unrelated (i.e., have no
relations to anything and are not a fundamental element of a
@@ -1544,6 +1548,9 @@ class Utilities:
if self._script.spellcheck and self._script.spellcheck.isCheckWindow(root):
return []
+ if self.hasPageTabList(root):
+ return []
+
hasRole = lambda x: x and x.getRole() == pyatspi.ROLE_LABEL
allLabels = pyatspi.findAllDescendants(root, hasRole)
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]