[orca] Refactor: Remove a no-longer-used function; add a check to the event manager if we need to shutdown
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Refactor: Remove a no-longer-used function; add a check to the event manager if we need to shutdown
- Date: Wed, 28 Dec 2011 14:34:29 +0000 (UTC)
commit 8d48beec6d7009e92cfaa2d0009ec03b005b8a66
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Dec 28 09:32:22 2011 -0500
Refactor: Remove a no-longer-used function; add a check to the event manager if we need to shutdown
src/orca/event_manager.py | 2 ++
src/orca/orca.py | 24 ------------------------
2 files changed, 2 insertions(+), 24 deletions(-)
---
diff --git a/src/orca/event_manager.py b/src/orca/event_manager.py
index d8e26e7..ea3fa53 100644
--- a/src/orca/event_manager.py
+++ b/src/orca/event_manager.py
@@ -468,6 +468,8 @@ class EventManager:
_scriptManager.reclaimScripts()
if settings.debugMemoryUsage:
orca.cleanupGarbage()
+ if not event.source.childCount:
+ orca.shutdown()
return
except (LookupError, RuntimeError):
# If we got this error here, we'll get it again when we
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 38cf9fc..6ac011c 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -657,30 +657,6 @@ def setLocusOfFocus(event, obj, notifyScript=True, force=False):
orca_state.activeScript.locusOfFocusChanged(
event, oldLocusOfFocus, orca_state.locusOfFocus)
-def _onChildrenChanged(e):
- """Tracks children-changed events on the desktop to determine when
- apps start and stop.
-
- Arguments:
- - e: at-spi event from the at-api registry
- """
-
- desktop = pyatspi.Registry.getDesktop(0)
- if e.source == desktop:
-
- # If the desktop is empty, the user has logged out-- shutdown Orca
- #
- try:
- if desktop.childCount == 0:
- if not _settingsManager.getSetting('onlySpeakDisplayedText'):
- speech.speak(_("Goodbye."))
- shutdown()
- return
- except: # could be a CORBA.COMM_FAILURE
- debug.printException(debug.LEVEL_FINEST)
- shutdown()
- return
-
########################################################################
# #
# DEBUG support. #
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]