[orca] Ignore nameless Gtk+ 3 mystery menus which are children of menus



commit b9c00f09c372635536f2a71564f9fc42efc40b27
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Oct 12 14:32:32 2016 -0400

    Ignore nameless Gtk+ 3 mystery menus which are children of menus

 src/orca/scripts/toolkits/gtk/script.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/gtk/script.py b/src/orca/scripts/toolkits/gtk/script.py
index f087c04..7392352 100644
--- a/src/orca/scripts/toolkits/gtk/script.py
+++ b/src/orca/scripts/toolkits/gtk/script.py
@@ -135,13 +135,13 @@ class Script(default.Script):
             orca.setLocusOfFocus(event, event.source)
             return
 
-        if role == pyatspi.ROLE_MENU and not event.source.name:
-            msg = "GTK: Nameless menu with parent %s" % event.source.parent
-            debug.println(debug.LEVEL_INFO, msg, True)
-
         # https://bugzilla.gnome.org/show_bug.cgi?id=720989
         if role == pyatspi.ROLE_MENU == event.source.parent.getRole():
-            orca.setLocusOfFocus(event, event.source)
+            if event.source.name:
+                orca.setLocusOfFocus(event, event.source)
+            else:
+                msg = "GTK: Nameless menu with parent %s" % event.source.parent
+                debug.println(debug.LEVEL_INFO, msg, True)
             return
 
         # Unfiled, but a similar case of the above issue with combo boxes.


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