[pyatspi2/p2p: 4/8] Disable p2p on our own application



commit 0deb991068c6557eef490ab576a6af8373412aeb
Author: Mike Gorse <mgorse novell com>
Date:   Fri Oct 1 14:58:04 2010 -0400

    Disable p2p on our own application

 pyatspi/cache.py    |    2 ++
 pyatspi/registry.py |    4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pyatspi/cache.py b/pyatspi/cache.py
index 1715fb8..994e370 100644
--- a/pyatspi/cache.py
+++ b/pyatspi/cache.py
@@ -248,6 +248,8 @@ class ApplicationCacheManager (object):
                         app_obj = bus.get_object (bus_name, ATSPI_ROOT_PATH, introspect=False)
                         app_itf = dbus.Interface (app_obj, ATSPI_APPLICATION)
                         self.busAddress = app_itf.GetApplicationBusAddress()
+                        if self.busAddress == "":
+                                self.busAddress = None
                 except:
                         self.busAddress = None
 
diff --git a/pyatspi/registry.py b/pyatspi/registry.py
index bda8aac..6f5bb11 100644
--- a/pyatspi/registry.py
+++ b/pyatspi/registry.py
@@ -128,6 +128,8 @@ class Registry(object):
 
 		self.queue = Queue.Queue()
 
+                _os.environ["AT_SPI_CLIENT"] = "1"
+
                 # Set up the cache
 		cache = None
                 if main_loop_type == MAIN_LOOP_GLIB:
@@ -137,8 +139,6 @@ class Registry(object):
 
                 self.has_implementations = True
 
-                _os.environ["AT_SPI_CLIENT"] = "1"
-
                 # Set up the device event controllers
                 _connection = SyncAccessibilityBus (self)
                 _bus_object = _connection.get_object("org.freedesktop.DBus", "/org/freedesktop/DBus")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]