--- src/orca/orca.py.old 2011-05-12 06:31:56.115771313 +0200 +++ src/orca/orca.py 2011-05-12 06:32:06.633272073 +0200 @@ -35,22 +35,6 @@ import unicodedata import shutil -# This must happen BEFORE we import gtk (until we start using -# introspection). -from gi.repository.Gio import Settings -a11yAppSettings = Settings('org.gnome.desktop.a11y.applications') - -def getOrcaEnabled(gsetting, key): - return gsetting.get_boolean(key) - -def onEnabledChanged(gsetting, key): - if not key == 'screen-reader-enabled': - return - - enabled = getOrcaEnabled(gsetting, key) - if not enabled: - shutdown() - # We're going to force the name of the app to "orca" so pygtk # will end up showing us as "orca" to the AT-SPI. If we don't # do this, the name can end up being "-c". See bug 364452 at @@ -1979,8 +1963,7 @@ global _initialized global _keyBindings - if _initialized \ - and getOrcaEnabled(a11yAppSettings, 'screen-reader-enabled'): + if _initialized: return False # Do not hang on initialization if we can help it. @@ -2024,7 +2007,6 @@ signal.alarm(0) _initialized = True - a11yAppSettings.connect('changed', onEnabledChanged) return True def start(registry): --- src/orca/settings_manager.py 2011-04-26 00:20:02.000000000 +0200 +++ /orca/orca/src/orca/settings_manager.py 2011-03-26 07:38:41.156728920 +0100 @@ -36,9 +36,11 @@ from keybindings import KeyBinding import settings -from gi.repository.Gio import Settings -a11yAppSettings = Settings('org.gnome.desktop.interface') - +try: + import gconf + gconfClient = gconf.client_get_default() +except: + gconfClient = None class SettingsManager(object): """Settings backend manager. This class manages orca user's settings @@ -300,11 +302,20 @@ return not alreadyEnabled def isAccessibilityEnabled(self): - return a11yAppSettings.get_boolean("toolkit-accessibility") + try: + return gconfClient.get_bool( + "/desktop/gnome/interface/accessibility") \ + or gconfClient.get_bool( + "/desktop/gnome/interface/accessibility2") + except: + return False def setAccessibility(self, enable): - return a11yAppSettings.set_boolean( - "toolkit-accessibility", enable) + try: + return gconfClient.set_bool( + "/desktop/gnome/interface/accessibility", enable) + except: + return False def setStartingProfile(self, profile=None): if profile is None: --- src/orca/orca.in 2011-04-26 00:20:02.000000000 +0200 +++ /orca/orca/src/orca/orca.in 2011-02-24 16:09:52.002599420 +0100 @@ -131,10 +131,9 @@ # all set and we don't need to muck around. # if [ "x$LOGNAME" != "xgdm" ] ; then - ACCESSIBILITY_ENABLED=`gsettings \ - get org.gnome.desktop.interface toolkit-accessibility` - if [[ "x$ACCESSIBILITY_ENABLED" != "xtrue" && \ - `echo $ARGS | grep -c "no-setup"` -eq 0 ]]; then + ACCESSIBILITY_ENABLED=`gconftool-2 \ + --get /desktop/gnome/interface/accessibility` + if [ "x$ACCESSIBILITY_ENABLED" != "xtrue" ] ; then # Because we will be running Orca in text-setup mode, we want to # make sure it is run in a terminal window. If we're already in # a terminal, this is great. If not, we spawn a gnome-terminal