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