[orca] Let the default script handle app registration for object event callbacks



commit 3a570b49497a47d05e9ce04edcfa358757ab36ca
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Oct 29 23:47:08 2013 -0400

    Let the default script handle app registration for object event callbacks

 src/orca/scripts/apps/gnome-panel/script.py       |   12 ------------
 src/orca/scripts/apps/gnome-search-tool/script.py |   10 ----------
 src/orca/scripts/apps/metacity/script.py          |   10 ----------
 src/orca/scripts/apps/notify-osd/script.py        |   13 -------------
 src/orca/scripts/apps/soffice/script.py           |   18 ------------------
 5 files changed, 0 insertions(+), 63 deletions(-)
---
diff --git a/src/orca/scripts/apps/gnome-panel/script.py b/src/orca/scripts/apps/gnome-panel/script.py
index 71d4cc2..3179141 100644
--- a/src/orca/scripts/apps/gnome-panel/script.py
+++ b/src/orca/scripts/apps/gnome-panel/script.py
@@ -60,18 +60,6 @@ class Script(default.Script):
         """
         debug.println(self.debugLevel, "gnome-panel.py: "+msg)
 
-    def getListeners(self):
-        """Sets up the AT-SPI event listeners for this script.
-        """
-        listeners = default.Script.getListeners(self)
-        
-        listeners["object:state-changed:focused"]           = \
-            self.onStateChanged
-        listeners["object:state-changed:showing"]           = \
-            self.onStateChanged
-        
-        return listeners
-
     def getSpeechGenerator(self):
         """Returns the speech generator for this script."""
 
diff --git a/src/orca/scripts/apps/gnome-search-tool/script.py 
b/src/orca/scripts/apps/gnome-search-tool/script.py
index 9446f4f..ef2ef9d 100644
--- a/src/orca/scripts/apps/gnome-search-tool/script.py
+++ b/src/orca/scripts/apps/gnome-search-tool/script.py
@@ -73,16 +73,6 @@ class Script(default.Script):
         #
         self.searchInterval = 5.0
 
-    def getListeners(self):
-        """Sets up the AT-SPI event listeners for this script.
-        """
-        listeners = default.Script.getListeners(self)
-
-        listeners["object:state-changed:showing"]           = \
-            self.onStateChanged
-
-        return listeners
-
     def _speakSearching(self):
         """If we are still searching, let the user know. Then start another
         timer to go off again and repeat this process.
diff --git a/src/orca/scripts/apps/metacity/script.py b/src/orca/scripts/apps/metacity/script.py
index 4dc2ba2..3d3f493 100644
--- a/src/orca/scripts/apps/metacity/script.py
+++ b/src/orca/scripts/apps/metacity/script.py
@@ -49,16 +49,6 @@ class Script(default.Script):
 
         default.Script.__init__(self, app)
 
-    def getListeners(self):
-        """Sets up the AT-SPI event listeners for this script.
-        """
-        listeners = default.Script.getListeners(self)
-
-        listeners["object:state-changed:showing"]           = \
-            self.onStateChanged
-
-        return listeners
-
     def presentStatusBar(self, obj):
         """Presents information about the metacity status bar."""
 
diff --git a/src/orca/scripts/apps/notify-osd/script.py b/src/orca/scripts/apps/notify-osd/script.py
index 87492f8..7a168d3 100644
--- a/src/orca/scripts/apps/notify-osd/script.py
+++ b/src/orca/scripts/apps/notify-osd/script.py
@@ -38,19 +38,6 @@ import orca.notification_messages as notification_messages
 ########################################################################
 
 class Script(default.Script):
-    def getListeners(self):
-        """Sets up the AT-SPI event listeners for this script.
-        """
-        listeners = default.Script.getListeners(self)
-
-        listeners["object:property-change:accessible-name"] = \
-            self.onNameChange
-
-        listeners["object:property-change:accessible-value"] = \
-            self.onValueChange
-
-        return listeners
-    
     def onValueChange(self, event):
         try:
             ivalue = event.source.queryValue()
diff --git a/src/orca/scripts/apps/soffice/script.py b/src/orca/scripts/apps/soffice/script.py
index 177f34f..defea95 100644
--- a/src/orca/scripts/apps/soffice/script.py
+++ b/src/orca/scripts/apps/soffice/script.py
@@ -158,24 +158,6 @@ class Script(default.Script):
 
         default.Script.activate(self)
 
-    def getListeners(self):
-        """Sets up the AT-SPI event listeners for this script.
-        """
-        listeners = default.Script.getListeners(self)
-
-        listeners["object:state-changed:focused"]           = \
-            self.onStateChanged
-        listeners["object:state-changed:sensitive"]         = \
-            self.onStateChanged
-        listeners["object:state-changed:active"]            = \
-            self.onStateChanged
-        listeners["object:state-changed:checked"]           = \
-            self.onStateChanged
-        listeners["object:children-changed"]                = \
-            self.onChildrenChanged
-
-        return listeners
-
     def getBrailleGenerator(self):
         """Returns the braille generator for this script.
         """


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