[orca] Fix for bug #647037 - Pronunciation rules not being applied until user settings are reloaded



commit ab089d95ff4cf9ef0e63ddf47fc8e9c8c183af00
Author: Javier Hernández Antúnez <jhernandez emergya es>
Date:   Mon May 23 22:18:32 2011 +0200

    Fix for bug #647037 - Pronunciation rules not being applied until user settings are reloaded

 src/orca/settings_manager.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index c9576b7..5f9747e 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -35,6 +35,7 @@ from json import load
 import debug
 from keybindings import KeyBinding
 import settings
+import pronunciation_dict
 
 try:
     import gconf
@@ -343,6 +344,14 @@ class SettingsManager(object):
         self._getCustomizedSettings()
         for key, value in self.customizedSettings.items():
             setattr(settings, str(key), value)
+        self._setPronunciationsRuntime()
+
+    def _setPronunciationsRuntime(self):
+        pronunciation_dict.pronunciation_dict = {}
+        for pron in self.pronunciations:
+            key, value = self.pronunciations[pron]
+            if key and value:
+                pronunciation_dict.setPronunciation(key, value)
 
     def getGeneralSettings(self, profile='default'):
         """Return the current general settings.



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