[orca/gnome-3-12] Remove more obsolete code from Orca's Evolution support



commit 67ea5c846d7e3c3686ae86f39e408805399f8c1f
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Mar 21 15:02:49 2014 -0400

    Remove more obsolete code from Orca's Evolution support

 po/POTFILES.in                                     |    1 -
 src/orca/scripts/apps/evolution/Makefile.am        |    3 +-
 src/orca/scripts/apps/evolution/script.py          |   58 +--------
 .../scripts/apps/evolution/speech_generator.py     |  130 --------------------
 4 files changed, 6 insertions(+), 186 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index afd46a7..5e4f983 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -18,7 +18,6 @@ src/orca/object_properties.py
 [type: gettext/glade]src/orca/orca-find.ui
 [type: gettext/glade]src/orca/orca-setup.ui
 src/orca/phonnames.py
-src/orca/scripts/apps/evolution/speech_generator.py
 src/orca/scripts/apps/gnome-mud/script.py
 src/orca/scripts/apps/liferea/script.py
 src/orca/scripts/apps/metacity/script.py
diff --git a/src/orca/scripts/apps/evolution/Makefile.am b/src/orca/scripts/apps/evolution/Makefile.am
index 164e415..3bd7007 100644
--- a/src/orca/scripts/apps/evolution/Makefile.am
+++ b/src/orca/scripts/apps/evolution/Makefile.am
@@ -1,7 +1,6 @@
 orca_python_PYTHON = \
     __init__.py \
-    script.py \
-    speech_generator.py
+    script.py
 
 orca_pythondir=$(pkgpythondir)/scripts/apps/evolution
 
diff --git a/src/orca/scripts/apps/evolution/script.py b/src/orca/scripts/apps/evolution/script.py
index 4b102de..2b554a4 100644
--- a/src/orca/scripts/apps/evolution/script.py
+++ b/src/orca/scripts/apps/evolution/script.py
@@ -32,11 +32,6 @@ import pyatspi
 import orca.scripts.toolkits.gtk as gtk
 import orca.scripts.toolkits.WebKitGtk as WebKitGtk
 import orca.settings as settings
-import orca.settings_manager as settings_manager
-
-from .speech_generator import SpeechGenerator
-
-_settingsManager = settings_manager.getManager()
 
 ########################################################################
 #                                                                      #
@@ -53,15 +48,9 @@ class Script(WebKitGtk.Script):
         - app: the application to create a script for.
         """
 
-        WebKitGtk.Script.__init__(self, app)
+        WebKitGtk.Script.__init__(self, app, False)
         self.presentIfInactive = False
 
-    def getSpeechGenerator(self):
-        """Returns the speech generator for this script.
-        """
-
-        return SpeechGenerator(self)
-
     def isActivatableEvent(self, event):
         """Returns True if the given event is one that should cause this
         script to become the active script.  This is only a hint to
@@ -103,15 +92,15 @@ class Script(WebKitGtk.Script):
     def onFocus(self, event):
         """Callback for focus: accessibility events."""
 
+        if self.utilities.isWebKitGtk(event.source):
+            return
+
         gtk.Script.onFocus(self, event)
 
     def onNameChanged(self, event):
         """Callback for object:property-change:accessible-name events."""
 
-        # Every time the selected mail folder changes, Evolution's frame is
-        # updated to display the newly-selected folder. We need to ignore
-        # this event so as not to double-present the selected folder.
-        if event.source.getRole() == pyatspi.ROLE_FRAME:
+        if self.utilities.isWebKitGtk(event.source):
             return
 
         gtk.Script.onNameChanged(self, event)
@@ -125,40 +114,3 @@ class Script(WebKitGtk.Script):
             return
 
         gtk.Script.onSelectionChanged(self, event)
-
-    def onShowingChanged(self, event):
-        """Callback for object:state-changed:showing accessibility events."""
- 
-        if not event.detail1:
-            gtk.Script.onShowingChanged(self, event)
-            return
-
-        obj = event.source
-
-        # Present text in the Account Assistant
-        try:
-            role = obj.getRole()
-            relationSet = obj.getRelationSet()
-        except:
-            return
-
-        if role != pyatspi.ROLE_LABEL or relationSet:
-            gtk.Script.onShowingChanged(self, event)
-            return
-
-        window = self.utilities.topLevelObject(obj)
-        focusedObj = self.utilities.focusedObject(window)
-        if self.utilities.spatialComparison(obj, focusedObj) >= 0:
-            return
- 
-        # TODO - JD: The very last screen results in a crazy-huge number
-        # of events, and they come in an order that is not good for this
-        # approach. So we'll need to handle this particular case elsewhere.
-        if focusedObj.getRole() == pyatspi.ROLE_CHECK_BOX:
-            labels = self.utilities.unrelatedLabels(window)
-            if len(labels) > 15:
-                return
-
-        voice = self.voices.get(settings.DEFAULT_VOICE)
-        text = self.utilities.displayedText(obj)
-        self.presentMessage(text, voice=voice)


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