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



commit cac8de0aa896288ebfc8644e5ab2cef2341bf02d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Apr 30 14:55:47 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]