[orca/new-settings] Changed the way of getting the _settingsManager instance. No more create new instences, just ask to
- From: Juanje Ojeda Croissier <jojeda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] Changed the way of getting the _settingsManager instance. No more create new instences, just ask to
- Date: Thu, 28 Oct 2010 13:27:45 +0000 (UTC)
commit a95f4caae370c786fd54ee5b5c8b65a2164773c3
Author: Juanje Ojeda <jojeda emergya es>
Date: Thu Oct 28 15:27:20 2010 +0200
Changed the way of getting the _settingsManager instance.
No more create new instences, just ask to orca module about its object.
src/orca/default.py | 4 +---
src/orca/orca_gui_prefs.py | 3 +--
src/orca/settings.py | 4 ++--
3 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/default.py b/src/orca/default.py
index 03edd51..6a6c0b6 100644
--- a/src/orca/default.py
+++ b/src/orca/default.py
@@ -5055,9 +5055,7 @@ class Script(script.Script):
"""Save a copy of all the existing application specific settings
(as specified by the settings.userCustomizableSettings dictionary)."""
- import settings_manager
- _settingsManager = SettingsManager()
- _settingsManager._loadBackend()
+ _settingsManager = getattr(orca, '_settingsManager')
return _settingsManager.getGeneralSettings(_settingsManager.profile)
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index 7307bd2..8c9782c 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -57,8 +57,7 @@ import text_attribute_names
import orca_gui_profile
-from settings_manager import SettingsManager
-_settingsManager = SettingsManager()
+_settingsManager = getattr(orca, '_settingsManager')
try:
diff --git a/src/orca/settings.py b/src/orca/settings.py
index cc55d9e..fe74dad 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -29,6 +29,7 @@ __license__ = "LGPL"
import os
import re
+import orca
screenWidth = 640
screenHeight = 480
@@ -1047,8 +1048,7 @@ def setGKSUGrabDisabled(disable):
# Allow for the customization of key bindings.
#
def overrideKeyBindings(script, keyBindings):
- from settings_manager import SettingsManager
- _settingsManager = SettingsManager()
+ _settingsManager = getattr(orca, '_settingsManager')
return _settingsManager.overrideKeyBindings(script, keyBindings)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]