[orca/gnome-3-4] Prevent gnome-shell notifications from being double-presented



commit 6bb086b6790ad4607d36510c1bb98ce9983af215
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Apr 30 14:56:39 2012 -0400

    Prevent gnome-shell notifications from being double-presented

 src/orca/script_utilities.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 6a6421a..54dfc1b 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1536,6 +1536,13 @@ class Utilities:
         labels = filter(lambda x: x.parent and x.name != x.parent.name, labels)
         labels = filter(
             lambda x: x.getState().contains(pyatspi.STATE_SHOWING), labels)
+
+        # Eliminate duplicates
+        d = {}
+        for label in labels:
+            d[label.name] = label
+        labels = d.values()
+
         return sorted(labels, self.spatialComparison)
 
     def unfocusedAlertAndDialogCount(self, obj):



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