Blob Blame History Raw
--- orca-1.0.0/src/orca/orca.py.add-stop-switch	2006-08-27 19:29:38.000000000 -0400
+++ orca-1.0.0/src/orca/orca.py	2006-09-19 22:12:47.000000000 -0400
@@ -1160,7 +1160,10 @@
              "gui-setup",
              "text-setup",
              "no-setup",
-             "version"])
+             "version",
+	     "stop"])
+
+	do_shutdown = False
         for opt, val in opts:
             if opt in ("-s", "--gui-setup", "--setup"):
                 setupRequested = True
@@ -1176,6 +1179,9 @@
             if opt in ("-v", "--version"):
                 print "Orca %s" % platform.version
                 os._exit(0)
+	    if opt in ("--stop"):
+	    	do_shutdown = True
+		bypassSetup = True
     except:
         usage()
         os._exit(2)
@@ -1185,7 +1191,7 @@
     import commands
     a11yEnabled = commands.getoutput(\
         "gconftool-2 --get /desktop/gnome/interface/accessibility")
-    if a11yEnabled != "true":
+    if a11yEnabled != "true" and not do_shutdown:
         _showPreferencesConsole()
         abort()
 
@@ -1205,6 +1211,9 @@
     registry = atspi.Registry()
     init(registry)
 
+    if do_shutdown:
+        shutdown()
+
     # Check to see if the user wants the configuration GUI. It's
     # done here so that the user's existing preferences can be used
     # to set the initial GUI state.  We'll also force the set to