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



commit ecb5cc137d6d9bcd931d8aa4612f56d8598b9500
Author: Javier Hernández Antúnez <jhernandez emergya es>
Date:   Tue May 24 01:14:20 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 0a9ad46..6760b16 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
 
 from gi.repository.Gio import Settings
 a11yAppSettings = Settings('org.gnome.desktop.interface')  
@@ -332,6 +333,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]