[orca] Update Gedit spellcheck support for 3.18 and improve heuristic performance
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Update Gedit spellcheck support for 3.18 and improve heuristic performance
- Date: Wed, 14 Oct 2015 18:01:08 +0000 (UTC)
commit b3e221613a96ebb23932da78955a638fcdd0ce94
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Oct 14 13:58:25 2015 -0400
Update Gedit spellcheck support for 3.18 and improve heuristic performance
src/orca/scripts/apps/gedit/spellcheck.py | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/apps/gedit/spellcheck.py b/src/orca/scripts/apps/gedit/spellcheck.py
index 15d1f31..d85b821 100644
--- a/src/orca/scripts/apps/gedit/spellcheck.py
+++ b/src/orca/scripts/apps/gedit/spellcheck.py
@@ -36,11 +36,17 @@ class SpellCheck(spellcheck.SpellCheck):
super(SpellCheck, self).__init__(script)
def _isCandidateWindow(self, window):
- if not (window and window.getRole() == pyatspi.ROLE_FRAME):
+ if not window:
return False
- isMenuBar = lambda x: x and x.getRole() == pyatspi.ROLE_MENU_BAR
- if pyatspi.findDescendant(window, isMenuBar):
+ role = window.getRole()
+ if role == pyatspi.ROLE_DIALOG:
+ return True
+ if role != pyatspi.ROLE_FRAME:
+ return False
+
+ isSplitPane = lambda x: x and x.getRole() == pyatspi.ROLE_SPLIT_PANE
+ if pyatspi.findDescendant(window, isSplitPane):
return False
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]