[orca/new-settings] Fix a problem with the child of updating of profiles.



commit 30b3985c136d8f28fd8bc6bcda6a93f79938435b
Author: Alejandro Leiva <aleiva emergya es>
Date:   Thu Oct 28 21:39:25 2010 +0200

    Fix a problem with the child of updating of profiles.

 src/orca/backends/yaml_backend.py |    7 ++++++-
 src/orca/settings.py              |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/backends/yaml_backend.py b/src/orca/backends/yaml_backend.py
index eba3789..9ceeafc 100644
--- a/src/orca/backends/yaml_backend.py
+++ b/src/orca/backends/yaml_backend.py
@@ -69,10 +69,15 @@ class Backend:
         general['pronunciations'] = pronunciations
         general['keybindings'] = keybindings
 
-        profilePrefs = self.profiles
+        # We're going to update the dictionary
+        profilePrefs = self.profiles.copy()
         newProfilePrefs = {profile: general}
         profilePrefs.update(newProfilePrefs)
 
+        for profilePrefsKey, profilePrefsValue in profilePrefs.items():
+            old = (newProfilePrefs.get(profilePrefsKey, dict()))
+            profilePrefsValue.update(self.profiles.get(profilePrefsKey, dict()))
+
         currentProfile = profilePrefs.get(profile)
         currentProfile['pronunciations'] = pronunciations
         currentProfile['keybindings'] = keybindings
diff --git a/src/orca/settings.py b/src/orca/settings.py
index d553aa6..9de5bc4 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -238,7 +238,7 @@ splashModule = "orca_gui_splash"
 #
 startingProfile = ['Default', 'default']
 activeProfile = ['Default', 'default']
-profile = 'default'
+profile = ['Default', 'default']
 
 # First start?
 #



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