[pyatspi2] Use gi GConf when available.
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyatspi2] Use gi GConf when available.
- Date: Fri, 7 Jan 2011 21:03:38 +0000 (UTC)
commit 757159bde904ba85df0441517e9587a5daa803f1
Author: Eitan Isaacson <eitan monotonous org>
Date: Fri Jan 7 13:02:23 2011 -0800
Use gi GConf when available.
pyatspi/__init__.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pyatspi/__init__.py b/pyatspi/__init__.py
index fadee13..c7fea6d 100644
--- a/pyatspi/__init__.py
+++ b/pyatspi/__init__.py
@@ -20,8 +20,12 @@ if not sys.modules.has_key('pyatspi_dbus'):
try:
gconf = None
gconfClient = None
- import gconf
- gconfClient = gconf.client_get_default()
+ try:
+ from gi.repository import GConf as gconf
+ gconfClient = gconf.Client.get_default()
+ except:
+ import gconf
+ gconfClient = gconf.client_get_default()
useCorba = \
gconfClient.get_bool("/desktop/gnome/interface/at-spi-corba")
except:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]