[orca] Fix notify-osd script to listen for accessible-name/value signals only.



commit db39e12e5f3621495f0226cf080b761973eb14b1
Author: Luke Yelavich <luke yelavich canonical com>
Date:   Mon Feb 13 16:17:50 2012 +1100

    Fix notify-osd script to listen for accessible-name/value signals only.
    
    Notify-osd has now been fixed to work properly with GTK 3.2+, and as a result,
    it no longer emits a window create signal for notification bubbles, but that
    really doesn't matter since accessible-name and accessible-value
    signals are emitted when the data we care about has changed.

 src/orca/scripts/apps/notify-osd/script.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/apps/notify-osd/script.py b/src/orca/scripts/apps/notify-osd/script.py
index 78ca95d..2d0944e 100644
--- a/src/orca/scripts/apps/notify-osd/script.py
+++ b/src/orca/scripts/apps/notify-osd/script.py
@@ -44,8 +44,8 @@ class Script(default.Script):
         """
         listeners = default.Script.getListeners(self)
 
-        listeners["window:create"] = \
-            self.onWindowCreate
+        listeners["object:property-change:accessible-name"] = \
+            self.onNameChange
 
         listeners["object:property-change:accessible-value"] = \
             self.onValueChange
@@ -64,8 +64,8 @@ class Script(default.Script):
             self.displayBrailleMessage("%s" % value,
                                        flashTime=settings.brailleFlashTime)
 
-    def onWindowCreate(self, event):
-        """Called whenever a window is created in the notify-osd
+    def onNameChange(self, event):
+        """Called whenever an object's accessible name changes in the notify-osd
         application.
 
         Arguments:



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