[orca/new-settings] * Removed _settingsManager._loadBackend() from the orca_gui_prefs.py for being redundant * Added det
- From: Juanje Ojeda Croissier <jojeda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] * Removed _settingsManager._loadBackend() from the orca_gui_prefs.py for being redundant * Added det
- Date: Wed, 27 Oct 2010 16:51:50 +0000 (UTC)
commit bbc437c8c0a12bf6e1f1f1e2b0d3a14d72980c5c
Author: Juanje Ojeda <jojeda emergya es>
Date: Wed Oct 27 18:51:41 2010 +0200
* Removed _settingsManager._loadBackend() from the orca_gui_prefs.py for being
redundant
* Added dettection of the activeProfile
* Getting the pronunciations dictionary from the backend
src/orca/orca_gui_prefs.py | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index c6a6398..6ba7b7b 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -59,7 +59,6 @@ import orca_gui_profile
from settings_manager import SettingsManager
_settingsManager = SettingsManager()
-_settingsManager._loadBackend()
try:
@@ -143,7 +142,14 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
orca_gtkbuilder.GtkBuilderWrapper.__init__(self, fileName, windowName)
- self.prefsDict = prefsDict
+ if prefsDict is None:
+ generalSettings = _settingsManager.getGeneralSettings()
+ activeProfile = generalSettings.get('activeProfile')
+ else:
+ activeProfile = prefsDict['activeProfile']
+
+ generalSettings = _settingsManager.getGeneralSettings(activeProfile[1])
+ self.prefsDict = generalSettings
self.enableLiveUpdating = settings.enableMagLiveUpdating
self._profilesCapable = not _settingsManager.isClassic()
@@ -2180,7 +2186,9 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
# Pronunciation dictionary pane.
#
- self._createPronunciationTreeView()
+ _profile = self.prefsDict.get('activeProfile')[1]
+ pronunciationsDict = _settingsManager.getPronunciations(_profile)
+ self._createPronunciationTreeView(pronunciationsDict)
# General pane.
#
@@ -4588,15 +4596,10 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.saveBasicSettings()
- gclient = gconf.client_get_default()
activeProfile = self.getComboBoxList(self.profilesCombo)
self.prefsDict['activeProfile'] = activeProfile
- gclient.set_list('/apps/gnome-orca/activeProfile',
- gconf.VALUE_STRING,
- activeProfile)
-
- self.prefsDict['activeProfile'] = activeProfile
_settingsManager.setProfile(activeProfile[1])
+
self._initGUIState()
self._initSpeechState()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]