[orca] Move spellcheck whereAmI call to default script



commit eb38672a9403c4ca1262b191865babd602b610a9
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Nov 21 14:03:37 2017 -0500

    Move spellcheck whereAmI call to default script

 src/orca/scripts/apps/Thunderbird/script.py |    8 --------
 src/orca/scripts/apps/gedit/script.py       |    8 --------
 src/orca/scripts/apps/soffice/script.py     |    8 --------
 src/orca/scripts/default.py                 |    3 +++
 src/orca/where_am_I.py                      |    2 --
 5 files changed, 3 insertions(+), 26 deletions(-)
---
diff --git a/src/orca/scripts/apps/Thunderbird/script.py b/src/orca/scripts/apps/Thunderbird/script.py
index 470cab2..978f436 100644
--- a/src/orca/scripts/apps/Thunderbird/script.py
+++ b/src/orca/scripts/apps/Thunderbird/script.py
@@ -119,14 +119,6 @@ class Script(Gecko.Script):
 
         return prefs
 
-    def doWhereAmI(self, inputEvent, basicOnly):
-        """Performs the whereAmI operation."""
-
-        if self.spellcheck.isActive():
-            self.spellcheck.presentErrorDetails(not basicOnly)
-
-        super().doWhereAmI(inputEvent, basicOnly)
-
     def locusOfFocusChanged(self, event, oldFocus, newFocus):
         """Handles changes of focus of interest to the script."""
 
diff --git a/src/orca/scripts/apps/gedit/script.py b/src/orca/scripts/apps/gedit/script.py
index db424ed..f83f29c 100644
--- a/src/orca/scripts/apps/gedit/script.py
+++ b/src/orca/scripts/apps/gedit/script.py
@@ -62,14 +62,6 @@ class Script(gtk.Script):
 
         return self.spellcheck.getPreferencesFromGUI()
 
-    def doWhereAmI(self, inputEvent, basicOnly):
-        """Performs the whereAmI operation."""
-
-        if self.spellcheck.isActive():
-            self.spellcheck.presentErrorDetails(not basicOnly)
-
-        super().doWhereAmI(inputEvent, basicOnly)
-
     def locusOfFocusChanged(self, event, oldFocus, newFocus):
         """Handles changes of focus of interest to the script."""
 
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 30f4d70..56e3b00 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -290,14 +290,6 @@ class Script(default.Script):
         prefs.update(self.spellcheck.getPreferencesFromGUI())
         return prefs
 
-    def doWhereAmI(self, inputEvent, basicOnly):
-        """Performs the whereAmI operation."""
-
-        if self.spellcheck.isActive():
-            self.spellcheck.presentErrorDetails(not basicOnly)
-
-        super().doWhereAmI(inputEvent, basicOnly)
-
     def presentObject(self, obj, **args):
         if not self._lastCommandWasStructNav:
             super().presentObject(obj, **args)
diff --git a/src/orca/scripts/default.py b/src/orca/scripts/default.py
index 1102a4f..606f267 100644
--- a/src/orca/scripts/default.py
+++ b/src/orca/scripts/default.py
@@ -1995,6 +1995,9 @@ class Script(script.Script):
         - inputEvent:     The original inputEvent
         """
 
+        if self.spellcheck and self.spellcheck.isActive():
+            self.spellcheck.presentErrorDetails(not basicOnly)
+
         obj = orca_state.locusOfFocus
         self.updateBraille(obj)
 
diff --git a/src/orca/where_am_I.py b/src/orca/where_am_I.py
index 0572833..ecef0f7 100644
--- a/src/orca/where_am_I.py
+++ b/src/orca/where_am_I.py
@@ -26,7 +26,6 @@ __copyright__ = "Copyright (c) 2005-2009 Sun Microsystems Inc."
 __license__   = "LGPL"
 
 import pyatspi
-from . import debug
 from . import speech
 
 # [[[TODO: WDW - need to handle the old _speakText functionality that changes
@@ -40,7 +39,6 @@ class WhereAmI:
         about the current object of interest.
         """
         self._script = script
-        self._debugLevel = debug.LEVEL_FINEST
         self._lastAttributeString = ""
 
     def _adjustObject(self, obj):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]