[orca/gnome-3-34] Add handling for accessible app names which start with "org." or "com."



commit ef430b170fe5d038643cfdd3f45a47b6c0ad24ab
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Oct 3 11:27:51 2019 -0400

    Add handling for accessible app names which start with "org." or "com."

 src/orca/script_manager.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/script_manager.py b/src/orca/script_manager.py
index b58694d03..1a9d77fa1 100644
--- a/src/orca/script_manager.py
+++ b/src/orca/script_manager.py
@@ -101,10 +101,12 @@ class ScriptManager:
         if not appAndNameExist:
             return None
 
-        # Many python apps have an accessible name which ends in '.py'.
-        # Sometimes OOo has 'soffice.bin' as its name.
-        name = app.name.split('.')[0]
+        name = app.name
         altNames = list(self._appNames.keys())
+        if name.endswith(".py") or name.endswith(".bin"):
+            name = name.split('.')[0]
+        elif name.startswith("org.") or name.startswith("com."):
+            name = name.split('.')[-1]
 
         names = [n for n in altNames if n.lower() == name.lower()]
         if names:


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