0074c29
--- orca-2.17.4/src/orca/orca.py.add-stop-switch	2006-12-12 20:21:31.000000000 -0500
0074c29
+++ orca-2.17.4/src/orca/orca.py	2006-12-20 01:12:04.000000000 -0500
0074c29
@@ -1297,7 +1297,10 @@
0074c29
              "gui-setup",
0074c29
              "text-setup",
0074c29
              "no-setup",
0074c29
-             "version"])
0074c29
+             "version",
0074c29
+	     "stop"])
0074c29
+
0074c29
+	do_shutdown = False
0074c29
         for opt, val in opts:
0074c29
             if opt in ("-u", "--user-prefs-dir"):
0074c29
                 userPrefsDir = val.strip();
0074c29
@@ -1353,6 +1356,9 @@
0074c29
             if opt in ("-v", "--version"):
0074c29
                 print "Orca %s" % platform.version
0074c29
                 os._exit(0)
0074c29
+	    if opt in ("--stop"):
0074c29
+	    	do_shutdown = True
0074c29
+		bypassSetup = True
0074c29
     except:
0074c29
         debug.printException(debug.LEVEL_OFF)
0074c29
         usage()
0074c29
@@ -1368,7 +1374,7 @@
0074c29
     import commands
0074c29
     a11yEnabled = commands.getoutput(\
0074c29
         "gconftool-2 --get /desktop/gnome/interface/accessibility")
0074c29
-    if (not bypassSetup) and (a11yEnabled != "true"):
0074c29
+    if (not bypassSetup) and (a11yEnabled != "true" and not do_shutdown):
0074c29
         _showPreferencesConsole()
0074c29
         abort()
0074c29
 
0074c29
@@ -1388,6 +1394,9 @@
0074c29
     registry = atspi.Registry()
0074c29
     init(registry)
0074c29
 
0074c29
+    if do_shutdown:
0074c29
+        shutdown()
0074c29
+
0074c29
     # Check to see if the user wants the configuration GUI. It's
0074c29
     # done here so that the user's existing preferences can be used
0074c29
     # to set the initial GUI state.  We'll also force the set to