[orca/new-settings] Modify saveProfileSettings to obtain the current YAML state before analyze it.



commit faef17e8fd437cfcd08537e27617553ee97def44
Author: Alejandro Leiva <aleiva emergya es>
Date:   Wed Oct 27 16:12:18 2010 +0200

    Modify saveProfileSettings to obtain the current YAML state before analyze it.

 src/orca/backends/yaml_backend.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/backends/yaml_backend.py b/src/orca/backends/yaml_backend.py
index 6084dca..2e74106 100644
--- a/src/orca/backends/yaml_backend.py
+++ b/src/orca/backends/yaml_backend.py
@@ -66,19 +66,20 @@ class Backend:
         if profile is None:
             profile = 'default'
 
+        self._getSettings()
+
         general['pronunciations'] = pronunciations
         general['keybindings'] = keybindings
 
-        currentProfilePrefs = self.profiles
-        profilePrefs = {profile: general}
-        profilePrefs.update(currentProfilePrefs)
+        profilePrefs = self.profiles
+        newProfilePrefs = {profile: general}
+        profilePrefs.update(newProfilePrefs)
 
         currentProfile = profilePrefs.get(profile)
         currentProfile['pronunciations'] = pronunciations
         currentProfile['keybindings'] = keybindings
         profilePrefs.update({profile: currentProfile})
 
-        self._getSettings()
         prefs = {'general': self.general,
                  'profiles': profilePrefs,
                  'pronunciations': self.pronunciations,



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