[orca] Eliminate some chattiness with gnome-shell dash



commit cc158fb6df7683adeb8b39c5d696bdd491deef90
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Aug 2 12:31:29 2019 -0400

    Eliminate some chattiness with gnome-shell dash

 src/orca/scripts/apps/gnome-shell/script_utilities.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/apps/gnome-shell/script_utilities.py 
b/src/orca/scripts/apps/gnome-shell/script_utilities.py
index 5e848d2e2..aa6336828 100644
--- a/src/orca/scripts/apps/gnome-shell/script_utilities.py
+++ b/src/orca/scripts/apps/gnome-shell/script_utilities.py
@@ -74,7 +74,6 @@ class Utilities(script_utilities.Utilities):
 
         return ""
 
-
     def selectedText(self, obj):
         string, start, end = super().selectedText(obj)
         if -1 not in [start, end]:
@@ -105,3 +104,16 @@ class Utilities(script_utilities.Utilities):
             return []
 
         return super().unrelatedLabels(root, onlyShowing, minimumWords)
+
+    def isLayoutOnly(self, obj):
+        if super().isLayoutOnly(obj):
+            return True
+
+        if obj.getRole() == pyatspi.ROLE_PANEL and obj.childCount == 1:
+            displayedLabel = self.displayedLabel(obj)
+            if displayedLabel == obj[0].name and obj[0].getRole() != pyatspi.ROLE_LABEL:
+                msg = "GNOME SHELL: %s is deemed to be layout only" % obj
+                debug.println(debug.LEVEL_INFO, msg, True)
+                return True
+
+        return False


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