orca r3984 - in trunk: . docs/man src/orca



Author: wwalker
Date: Tue Jun 17 19:00:47 2008
New Revision: 3984
URL: http://svn.gnome.org/viewvc/orca?rev=3984&view=rev

Log:
Fix for bug #538773 - Enable a quick 'smoke test' for whether Orca can see things via the AT-SPI


Modified:
   trunk/ChangeLog
   trunk/docs/man/orca.1
   trunk/src/orca/orca.py

Modified: trunk/docs/man/orca.1
==============================================================================
--- trunk/docs/man/orca.1	(original)
+++ trunk/docs/man/orca.1	Tue Jun 17 19:00:47 2008
@@ -89,6 +89,21 @@
 .B orca
 program.
 .TP
+.B \-l, --list-apps
+Prints the names of all the currently running applications.  This
+is used primarily for debugging purposes to see if
+.B orca
+can talk to the accessibility infrastructure.  Note that if
+.B orca
+is already running, this will not kill the other
+.B orca
+process.  It will just list the currently running applications,
+and you will see
+.B orca
+listed twice: once for the existing
+.B orca
+and once for this instance.
+.TP
 .B \-v, --version
 Return the 
 .B orca 

Modified: trunk/src/orca/orca.py
==============================================================================
--- trunk/src/orca/orca.py	(original)
+++ trunk/src/orca/orca.py	Tue Jun 17 19:00:47 2008
@@ -1332,6 +1332,13 @@
 
     print "-v, --version                %s" % platform.version
 
+    # Translators: this is a testing option for the command line.  It prints
+    # the names of the applications known to the accessibility infrastructure
+    # to stdout and then exits.
+    #
+    print "-l, --list-apps              " + \
+          _("Print the known running applications")
+
     # Translators: this is the description of the command line option
     # '-s, --setup, --gui-setup' that will initially display a GUI dialog
     # that would allow the user to set their Orca preferences.
@@ -1479,7 +1486,7 @@
         #
         opts, args = getopt.getopt(
             arglist,
-            "?stnvd:e:u:",
+            "?stnvld:e:u:",
             ["help",
              "user-prefs-dir=",
              "enable=",
@@ -1488,6 +1495,7 @@
              "gui-setup",
              "text-setup",
              "no-setup",
+             "list-apps",
              "version"])
         for opt, val in opts:
             if opt in ("-u", "--user-prefs-dir"):
@@ -1545,6 +1553,13 @@
             if opt in ("-v", "--version"):
                 print "Orca %s" % platform.version
                 abort(0)
+            if opt in ("-l", "--list-apps"):
+                apps = filter(lambda x: x is not None,
+                              pyatspi.Registry.getDesktop(0))
+                for app in apps:
+                    print app.name
+                abort(0)
+
     except:
         debug.printException(debug.LEVEL_OFF)
         usage()



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