[orca/new-settings] Added some docstrings for better understand of the settings manager
- From: Juanje Ojeda Croissier <jojeda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] Added some docstrings for better understand of the settings manager
- Date: Mon, 25 Oct 2010 17:31:32 +0000 (UTC)
commit 586df928c3c1d16f617874f3c469ad617aad8025
Author: Juanje Ojeda <jojeda emergya es>
Date: Mon Oct 25 19:31:13 2010 +0200
Added some docstrings for better understand of the settings manager
src/orca/settings_manager.py | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index b78c011..7f73cca 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -53,13 +53,27 @@ class SettingsManager():
self._backend = None
self.profile = profile
self.backendName = backend
+
+ # Dictionaries for store the default values
+ # The keys and values are defined at orca.settings
+ #
+ ## self.defaultGeneral contain some constants names as values
self.defaultGeneral = {}
+ ## self.defaultGeneralValues contain the actual values, no constants
self.defaultGeneralValues = {}
self.defaultPronunciations = {}
self.defaultKeybindings = {}
+
+ # Dictionaries that store the key:value pairs which values are
+ # different from the current profile and the default ones
+ #
self.profileGeneral = {}
self.profilePronunciations = {}
self.profileKeybindings = {}
+
+ # Dictionaries that store the current settings.
+ # They are result to overwrite the default values with
+ # the ones from the current active profile
self.general = {}
self.pronunciations = {}
self.keybindings = {}
@@ -68,6 +82,7 @@ class SettingsManager():
#TODO: Try to return None when the object is created if this fails
return None
+ # Load the backend and the default values
self._backend = self.backendModule.Backend()
self._setDefaultGeneral()
self._setDefaultPronunciations()
@@ -77,8 +92,14 @@ class SettingsManager():
self.pronunciations = self.defaultPronunciations
self.keybindings = self.defaultKeybindings
+ # 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
+ # initial default settings
+ #
if self.isFirstStart():
self._createDefaults()
+
+ # Set the active profile and load its stored settings
self.setProfile(self.profile)
def _loadBackend(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]