[orca/new-settings] More dictionary's assignations by references instead of by copy fixed
- From: Juanje Ojeda Croissier <jojeda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] More dictionary's assignations by references instead of by copy fixed
- Date: Thu, 28 Oct 2010 20:57:51 +0000 (UTC)
commit 093b2cf308f948f889bb7010a9aab68dbe45f626
Author: Juanje Ojeda <jojeda emergya es>
Date: Thu Oct 28 22:57:43 2010 +0200
More dictionary's assignations by references instead of by copy fixed
src/orca/backends/yaml_backend.py | 6 +++---
src/orca/settings_manager.py | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/backends/yaml_backend.py b/src/orca/backends/yaml_backend.py
index 9ceeafc..225d692 100644
--- a/src/orca/backends/yaml_backend.py
+++ b/src/orca/backends/yaml_backend.py
@@ -104,7 +104,7 @@ class Backend:
""" Get general settings from default settings and
override with profile values. """
self._getSettings()
- generalSettings = self.general
+ generalSettings = self.general.copy()
profileSettings = self.profiles[profile]
for key, value in profileSettings.items():
if key not in ['pronunciations', 'keybindings']:
@@ -115,7 +115,7 @@ class Backend:
""" Get pronunciation settings from default settings and
override with profile values. """
self._getSettings()
- pronunciations = self.pronunciations
+ pronunciations = self.pronunciations.copy()
profileSettings = self.profiles[profile]
if profileSettings.has_key('pronunciations'):
pronunciations = profileSettings['pronunciations']
@@ -125,7 +125,7 @@ class Backend:
""" Get keybindings settings from default settings and
override with profile values. """
self._getSettings()
- keybindings = self.keybindings
+ keybindings = self.keybindings.copy()
profileSettings = self.profiles[profile]
if profileSettings.has_key('keybindings'):
keybindings = profileSettings['keybindings']
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index 327b506..7d30f30 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -97,9 +97,9 @@ class SettingsManager():
self._setDefaultPronunciations()
self._setDefaultKeybindings()
self.defaultGeneralValues = getRealValues(self.defaultGeneral)
- self.general = self.defaultGeneralValues
- self.pronunciations = self.defaultPronunciations
- self.keybindings = self.defaultKeybindings
+ self.general = self.defaultGeneralValues.copy()
+ self.pronunciations = self.defaultPronunciations.copy()
+ self.keybindings = self.defaultKeybindings.copy()
# If this is the first time we launch Orca, there is no user settings
# yet, so we need to create the user config directories and store the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]