[orca] Fix for bug #637780 - Cannot permenantly update settings for the gdm user login session



commit 3e59e40daf95c3f5aeef0189d54d1bb59f1dc7ac
Author: Javier Hernández Antúnez <jhernandez emergya es>
Date:   Mon Mar 7 13:00:05 2011 +0100

    Fix for bug #637780 - Cannot permenantly update settings for the gdm user login session

 src/orca/orca.py           |    7 +++++--
 src/orca/orca_gui_prefs.py |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/orca.py b/src/orca/orca.py
index 2689594..16cf28c 100644
--- a/src/orca/orca.py
+++ b/src/orca/orca.py
@@ -1460,7 +1460,7 @@ def _restoreXmodmap(keyList=[]):
 
     os.system("echo '%s' | xmodmap - > /dev/null 2>&1" % "\n".join(toRestore))
 
-def loadUserSettings(script=None, inputEvent=None, isProfileLoad=False):
+def loadUserSettings(script=None, inputEvent=None, skipReloadMessage=False):
     """Loads (and reloads) the user settings module, reinitializing
     things such as speech if necessary.
 
@@ -1517,7 +1517,7 @@ def loadUserSettings(script=None, inputEvent=None, isProfileLoad=False):
     if settings.enableSpeech:
         try:
             speech.init()
-            if reloaded and not isProfileLoad:
+            if reloaded and not skipReloadMessage:
                 # Translators: there is a keystroke to reload the user
                 # preferences.  This is a spoken prompt to let the user
                 # know when the preferences has been reloaded.
@@ -2312,6 +2312,9 @@ def main():
         else:
             _showPreferencesConsole()
         _settingsManager.setFirstStart()
+    elif options.bypassSetup:
+        loadUserSettings(skipReloadMessage=True)
+        _settingsManager.setFirstStart()
 
     try:
         start(pyatspi.Registry) # waits until we stop the registry
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 73a0bfe..cee37d6 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -4623,7 +4623,7 @@ class OrcaSetupGUI(orca_gtkbuilder.GtkBuilderWrapper):
         if _settingsManager.getSetting('showMainWindow'):
             self.window.present()
 
-        orca.loadUserSettings(isProfileLoad=True)
+        orca.loadUserSettings(skipReloadMessage=True)
 
         self._initGUIState()
 



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