[pyatspi2] Make AT-SPI/CORBA the default and relocate AT-SPI/D-Bus
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pyatspi2] Make AT-SPI/CORBA the default and relocate AT-SPI/D-Bus
- Date: Fri, 5 Feb 2010 19:08:07 +0000 (UTC)
commit 0c2293f042a2dd3e366ad69d059a7dc450223e9e
Author: Willie Walker <walker willie gmail com>
Date: Fri Feb 5 14:07:50 2010 -0500
Make AT-SPI/CORBA the default and relocate AT-SPI/D-Bus
configure.ac | 2 +-
pyatspi/__init__.py | 33 +++++++++++++++++++--------------
2 files changed, 20 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5973583..a4f097e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,7 +74,7 @@ fi
AC_PATH_XTRA
-AC_ARG_ENABLE(relocate, [--enable-relocate Relocate to coexist with CORBA [default=no]], enable_relocate="$enableval", enable_relocate=no)
+AC_ARG_ENABLE(relocate, [--enable-relocate Relocate to coexist with CORBA [default=yes]], enable_relocate="$enableval", enable_relocate=yes)
if test x$enable_relocate = xyes ; then
AC_DEFINE(RELOCATE, , [Relocate to coexist with CORBA])
fi
diff --git a/pyatspi/__init__.py b/pyatspi/__init__.py
index 60fb7b5..896251c 100644
--- a/pyatspi/__init__.py
+++ b/pyatspi/__init__.py
@@ -12,23 +12,29 @@
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-try:
- gconf = None
- gconfClient = None
- import gconf
- gconfClient = gconf.client_get_default()
- useCorba = gconfClient.get_bool("/desktop/gnome/interface/at-spi-corba")
-except:
+# Do not replace yourself if you've been imported explicitly by name
+# already.
+#
+import sys
+if not sys.modules.has_key('pyatspi_dbus'):
+ try:
+ gconf = None
+ gconfClient = None
+ import gconf
+ gconfClient = gconf.client_get_default()
+ useCorba = \
+ gconfClient.get_bool("/desktop/gnome/interface/at-spi-corba")
+ except:
+ useCorba = False
+ finally:
+ del gconfClient
+ del gconf
+else:
useCorba = False
-finally:
- del gconfClient
- del gconf
if useCorba:
- import sys
import pyatspi_corba
sys.modules['pyatspi'] = pyatspi_corba
- del sys
else:
__version__ = (1, 9, 0)
@@ -41,11 +47,10 @@ else:
#This is a re-creation of the namespace pollution implemented
#by PyORBit.
- import sys
import Accessibility
sys.modules['Accessibility'] = Accessibility
- del sys
import appevent as event
+del sys
del useCorba
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]