[orca/new-settings] * Put in the right orther the saveSettings() parameters * fixed the merge of dics of pronunciations



commit 53c708349b2e441471479db19107a02610d46add
Author: Juanje Ojeda <jojeda emergya es>
Date:   Wed Oct 27 03:28:11 2010 +0200

    * Put in the right orther the saveSettings() parameters
    * fixed the merge of dics of pronunciations and keybindings at
    the settings_manager
    * Ingnored (by now) the transformation from model to dict of the
    keyBindingsModel. We need to create a fucntion/method for that.

 src/orca/orca_gui_prefs.py   |    2 +-
 src/orca/settings_manager.py |   12 ++++--------
 2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 37d4135..acf60ce 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -508,7 +508,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         """Write out the user's generic Orca preferences.
         """
         pronunciationDict = self.getModelDict(self.pronunciationModel)
-        keyBindingsDict = self.getModelDict(self.keyBindingsModel)
+        keyBindingsDict = {} #self.getModelDict(self.keyBindingsModel)
         if _settingsManager.saveSettings(self.prefsDict,
                                          pronunciationDict,
                                          keyBindingsDict):
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index 855f947..ab3e02b 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -262,18 +262,14 @@ class SettingsManager():
     def _setProfilePronunciations(self, pronunciations):
         """Set the changed pronunciations settings from the defaults' ones
         as the profile's."""
-        self.profilePronunciations = {}
-        for key, value in pronunciations.items():
-            if value != self.defaultPronunciations[key]:
-                self.profilePronunciations[key] = value
+        self.profilePronunciations = self.defaultPronunciations
+        self.profilePronunciations.update(pronunciations)
 
     def _setProfileKeybindings(self, keybindings):
         """Set the changed keybindings settings from the defaults' ones
         as the profile's."""
-        self.profileKeybindings = {}
-        for key, value in keybindings.items():
-            if value != self.defaultKeybindings[key]:
-                self.profileKeybindings[key] = value
+        self.profileKeybindings = self.defaultKeybindings
+        self.profileKeybindings.update(keybindings)
 
     def saveSettings(self, general, pronunciations, keybindings):
         """Let the active backend to store the default settings and



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