[orca/new-settings] Added failback value for the startingProfile key at saveSettings() method.



commit 1ea45b2796dc5089796da6be470038e2bce91491
Author: Juanje Ojeda <jojeda emergya es>
Date:   Mon Nov 1 18:32:06 2010 +0100

    Added failback value for the startingProfile key at saveSettings() method.

 src/orca/settings_manager.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index d34b885..d3e6a79 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -319,13 +319,14 @@ class SettingsManager():
         """Let the active backend to store the default settings and
         the profiles' ones."""
         # Assign current profile
-        (currentProfileString, currentProfile) = \
-            general.get('profile', ['Default', 'default'])
+        _profile = general.get('profile', ['Default', 'default'])
+        currentProfile = _profile[1]
 
         self.profile = currentProfile
 
         # Elements that need to stay updated in main configuration.
-        self.defaultGeneral['startingProfile'] = general.get('startingProfile')
+        self.defaultGeneral['startingProfile'] = general.get('startingProfile',
+                                                              _profile)
 
         # The default settings should already exist but we save them anyway
         # just in case the default settings have changed at orca.settings



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