[orca/new-settings] Trying to clean up some of the voice-related handling whilst persuing another bug.
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] Trying to clean up some of the voice-related handling whilst persuing another bug.
- Date: Wed, 20 Oct 2010 05:02:32 +0000 (UTC)
commit 36211fd4e64a47ebf1a7d07c5ca5f676f5cd724e
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Wed Oct 20 00:59:47 2010 -0400
Trying to clean up some of the voice-related handling whilst persuing another bug.
src/orca/backends/gconf_backend.py | 58 ++++++++++--------------------------
1 files changed, 16 insertions(+), 42 deletions(-)
---
diff --git a/src/orca/backends/gconf_backend.py b/src/orca/backends/gconf_backend.py
index ad88ba1..ba675a1 100644
--- a/src/orca/backends/gconf_backend.py
+++ b/src/orca/backends/gconf_backend.py
@@ -840,57 +840,31 @@ class OrcaPrefs():
# self.options = self.DEFAULTS
# self.gconf_save()
- # Load gconf settings
- #
self.gconf_load()
+ # JD -> JO: What's up with these? Why are they (all) necessary?
+ #
self.settingsDict = self.prefsDict = self.options
- # some imports
- #
import orca.debug
from orca import acss
orca.debug.debugLevel = orca.debug.LEVEL_SEVERE
-
- # Load settings in userCustomizableSettings
- #
- for key in settings.userCustomizableSettings:
- # JD -> JH: In OpenSolaris I was getting tracebacks due to some
- # problem with the speechServerInfo. I haven't added handling
- # below. Just getting things working in the environment for now.
- #
- if key not in ['voices', 'speechServerFactory', 'firstStart',
- 'activeProfile', 'startingProfile']:
- #value = self._getValueForKey(self.settingsDict, key)
- value = self.settingsDict[key]
- if value != None:
- if value == 'true' or value == 'false':
- value = value.capitalize()
- if key in self.need2repr:
- value = self._fix_quotes(value)
- setting = 'orca.settings.%s = %s' % (key, value)
- exec setting
-
- # Load orca.settings.speechServerFactory and orca.settings.voices
- #
- factory = self.settingsDict.get('speechServerFactory')
- # JD -> JH: In OpenSolaris I was getting tracebacks due to factory
- # being None. I need to investigate further. I might have just
- # borked something while testing. :-/ This is a just in case....
- #
- if not factory:
- factory = settings.speechServerFactory
-
- ssfLoad = "orca.settings.speechServerFactory = %s" % factory
- print 'speechServerFactory = ', ssfLoad
- exec(ssfLoad)
+ voiceSettings = ['speechServerFactory', 'speechServerInfo', 'voices']
+ for key in settings.userCustomizableSettings:
+ value = self.settingsDict.get(key)
+ #value = self._getValueForKey(self.settingsDict, key)
+ if key in voiceSettings and not value:
+ value = eval('settings.%s' % key)
+ if value == None:
+ continue
- settings.voices = {
- 'default' : acss.ACSS(self.settingsDict['voices']['default']),
- 'uppercase' : acss.ACSS(self.settingsDict['voices']['uppercase']),
- 'hyperlink' : acss.ACSS(self.settingsDict['voices']['hyperlink']),
- 'system' : acss.ACSS(self.settingsDict['voices']['system'])}
+ if value in ['true', 'false']:
+ value = value.capitalize()
+ if key in self.need2repr:
+ value = self._fix_quotes(value)
+ setting = 'orca.settings.%s = %s' % (key, value)
+ exec setting
# Load orca.pronunciation_dict
#
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]