[pyatspi2] Fix problem with children changed signal when adding or removing applications.
- From: Mark Doffman <markdoffman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pyatspi2] Fix problem with children changed signal when adding or removing applications.
- Date: Fri, 11 Dec 2009 16:43:50 +0000 (UTC)
commit b3e86ee58150b7ecb9a02ef7ea025b1bdd9eb99b
Author: Mark Doffman <mark doffman codethink co uk>
Date: Thu Dec 10 04:19:19 2009 -0800
Fix problem with children changed signal when adding or removing applications.
pyatspi/cache.py | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/pyatspi/cache.py b/pyatspi/cache.py
index 129b09e..99de6f9 100644
--- a/pyatspi/cache.py
+++ b/pyatspi/cache.py
@@ -138,26 +138,17 @@ class ApplicationCache(object):
self._application_list.append(bus_name)
self._application_cache[bus_name] = AccessibleCache(self._event_dispatcher,
bus_name)
- event = Event(("add", 0, 0, ""),
- self._factory,
- ATSPI_DESKTOP_PATH,
- ATSPI_REGISTRY_NAME,
- "org.freedesktop.atspi.Event.Object",
- "children-changed")
+ self._event_dispatcher.notifyChildrenChange(ATSPI_REGISTRY_NAME,
+ ATSPI_DESKTOP_PATH,
+ True)
elif update_type == ApplicationCache._APPLICATIONS_REMOVE:
#TODO Fail safely if app does not exist
self._application_list.remove(bus_name)
del(self._application_cache[bus_name])
- event = Event(("remove", 0, 0, ""),
- self._factory,
- ATSPI_DESKTOP_PATH,
- ATSPI_REGISTRY_NAME,
- "org.freedesktop.atspi.Event.Object",
- "children-changed")
-
-
- self._event_dispatcher.notifyChildrenChange(event)
+ self._event_dispatcher.notifyChildrenChange(ATSPI_REGISTRY_NAME,
+ ATSPI_DESKTOP_PATH,
+ False)
def _refresh(self):
new = self._app_register.getApplications()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]