[orca] Fix for bug #638623 - The application preferences dialogs are not always correctly populated
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug #638623 - The application preferences dialogs are not always correctly populated
- Date: Wed, 5 Jan 2011 18:57:08 +0000 (UTC)
commit a4d0ecf36f210bb3debd3133c6f1fc220995f8eb
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Wed Jan 5 13:40:33 2011 -0500
Fix for bug #638623 - The application preferences dialogs are not always correctly populated
src/orca/app_gui_prefs.py | 21 +++++++++++++--------
src/orca/orca_gui_prefs.py | 19 ++++++++++---------
2 files changed, 23 insertions(+), 17 deletions(-)
---
diff --git a/src/orca/app_gui_prefs.py b/src/orca/app_gui_prefs.py
index 01c7d11..2f2ba70 100644
--- a/src/orca/app_gui_prefs.py
+++ b/src/orca/app_gui_prefs.py
@@ -72,6 +72,13 @@ class OrcaSetupGUI(orca_gui_prefs.OrcaSetupGUI):
self.appKeyBindings = None
self.defKeyBindings = None
+ def _getGeneralSettings(self, prefsDict):
+ if prefsDict is None:
+ return orca_gui_prefs.OrcaSetupGUI.\
+ _getGeneralSettings(self, prefsDict)
+
+ return prefsDict
+
def initAppGUIState(self, thisAppScript):
"""Before we show the GUI to the user we want to remove the
General tab and gray out the Speech systems and servers
@@ -315,8 +322,6 @@ def showPreferencesUI():
# The name of the application that currently has focus.
#
applicationName = orca_state.activeScript.app.name
-
- removeGeneralPane = False
if not orca_state.appOS and not orca_state.orcaOS:
# Translators: Orca Preferences in this case, is a configuration GUI
# for allowing users to set application specific settings from within
@@ -338,16 +343,18 @@ def showPreferencesUI():
orca_platform.package,
"ui",
"orca-advanced-magnification.ui")
+
+ orca_state.appOS = \
+ OrcaSetupGUI(orca_state.prefsUIFile, "orcaSetupWindow", prefsDict)
+ orca_state.appOS.initAppGUIState(appScript)
+
orca_state.advancedMag = \
- orca_gui_prefs.OrcaAdvancedMagGUI(orca_state.advancedMagUIFile,
+ orca_gui_prefs.OrcaAdvancedMagGUI(orca_state.advancedMagUIFile,
"orcaMagAdvancedDialog", prefsDict)
orca_state.advancedMag.init()
orca_state.advancedMagDialog = \
orca_state.advancedMag.getAdvancedMagDialog()
- orca_state.appOS = OrcaSetupGUI(orca_state.prefsUIFile,
- "orcaSetupWindow", prefsDict)
- removeGeneralPane = True
orca_state.appOS.init()
else:
if not orca_state.orcaWD:
@@ -365,8 +372,6 @@ def showPreferencesUI():
warningDialog.show()
return
- if removeGeneralPane:
- orca_state.appOS.initAppGUIState(appScript)
orca_state.appOS.showGUI()
def main():
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 5c55ea4..df7c753 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -138,15 +138,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
"""
orca_gtkbuilder.GtkBuilderWrapper.__init__(self, fileName, windowName)
-
- if prefsDict is None:
- generalSettings = _settingsManager.getGeneralSettings()
- activeProfile = generalSettings.get('startingProfile')
- else:
- activeProfile = prefsDict['activeProfile']
-
- generalSettings = _settingsManager.getGeneralSettings(activeProfile[1])
- self.prefsDict = generalSettings
+ self.prefsDict = self._getGeneralSettings(prefsDict)
self.enableLiveUpdating = \
_settingsManager.getSetting('enableMagLiveUpdating')
@@ -193,6 +185,15 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
self.profilesComboModel = None
self.startingProfileCombo = None
+ def _getGeneralSettings(self, prefsDict):
+ if prefsDict is None:
+ generalSettings = _settingsManager.getGeneralSettings()
+ activeProfile = generalSettings.get('startingProfile')
+ else:
+ activeProfile = prefsDict['activeProfile']
+
+ return _settingsManager.getGeneralSettings(activeProfile[1])
+
def init(self):
"""Initialize the Orca configuration GUI. Read the users current
set of preferences and set the GUI state to match. Setup speech
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]