[orca/new-settings] Added a method settingsManager::_setSettingsRuntime to update settings values from configuration bac
- From: Alejandro Leiva <aleiva src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] Added a method settingsManager::_setSettingsRuntime to update settings values from configuration bac
- Date: Thu, 28 Oct 2010 10:47:40 +0000 (UTC)
commit c3eda610ba33904a4d28423f48bc9065f881e3c3
Author: Alejandro Leiva <aleiva emergya es>
Date: Thu Oct 28 12:46:17 2010 +0200
Added a method settingsManager::_setSettingsRuntime to update settings values from configuration backends in runtime.
src/orca/settings_manager.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index 6ea7404..8764f5a 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -235,11 +235,17 @@ class SettingsManager():
keybindings = self.getKeybindings(profile)
return (general, pronunciations, keybindings)
+ def _setSettingsRuntime(self, settingsDict):
+ for key, value in settingsDict.items():
+ setattr(settings, str(key), value)
+
def getGeneralSettings(self, profile='default'):
"""Return the current general settings.
Those settings comes from updating the default settings
with the profiles' ones"""
- return self._backend.getGeneral(profile)
+ generalDict = self._backend.getGeneral(profile)
+ self._setSettingsRuntime(generalDict)
+ return generalDict
def getPronunciations(self, profile='default'):
"""Return the current pronunciations settings.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]