[orca] Treat combo box as leaf node only if they lack entry descendant
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Treat combo box as leaf node only if they lack entry descendant
- Date: Mon, 28 Oct 2019 20:12:44 +0000 (UTC)
commit 4902393f95a1bf64f9dc8c397ed41471b60e254d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Oct 28 16:12:12 2019 -0400
Treat combo box as leaf node only if they lack entry descendant
src/orca/script_utilities.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index b2710ada2..fe0d555c4 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -4132,12 +4132,15 @@ class Utilities:
if role in roles:
return False
+ if role == pyatspi.ROLE_COMBO_BOX:
+ entry = pyatspi.findDescendant(obj, lambda x: x and x.getRole() == pyatspi.ROLE_ENTRY)
+ return entry is None
+
state = obj.getState()
if state.contains(pyatspi.STATE_EXPANDABLE):
return not state.contains(pyatspi.STATE_EXPANDED)
- roles = [pyatspi.ROLE_COMBO_BOX,
- pyatspi.ROLE_PUSH_BUTTON,
+ roles = [pyatspi.ROLE_PUSH_BUTTON,
pyatspi.ROLE_TOGGLE_BUTTON]
return role in roles
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]