[orca] Try to weed out non-spell-checker frames faster
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Try to weed out non-spell-checker frames faster
- Date: Tue, 18 Feb 2014 16:08:21 +0000 (UTC)
commit 4a934ac61ca18a6a53fe3b8497d399dc4d15c7f1
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Feb 18 11:07:37 2014 -0500
Try to weed out non-spell-checker frames faster
src/orca/scripts/apps/gedit/spellcheck.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/apps/gedit/spellcheck.py b/src/orca/scripts/apps/gedit/spellcheck.py
index 342afed..62ea95e 100644
--- a/src/orca/scripts/apps/gedit/spellcheck.py
+++ b/src/orca/scripts/apps/gedit/spellcheck.py
@@ -36,7 +36,14 @@ class SpellCheck(spellcheck.SpellCheck):
super(SpellCheck, self).__init__(script)
def _isCandidateWindow(self, window):
- return window and window.getRole() == pyatspi.ROLE_FRAME
+ if not (window and window.getRole() == pyatspi.ROLE_FRAME):
+ return False
+
+ isMenuBar = lambda x: x and x.getRole() == pyatspi.ROLE_MENU_BAR
+ if pyatspi.findDescendant(window, isMenuBar):
+ return False
+
+ return True
def _findChangeToEntry(self, root):
isEntry = lambda x: x and x.getRole() == pyatspi.ROLE_TEXT \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]