[orca/new-settings] Moved _enableAccessibility() method from the backends to the settings_manager
- From: Juanje Ojeda Croissier <jojeda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/new-settings] Moved _enableAccessibility() method from the backends to the settings_manager
- Date: Mon, 25 Oct 2010 09:38:13 +0000 (UTC)
commit b2d82bb83787f69425847c7770b0d28a4dd06362
Author: Juanje Ojeda <jojeda emergya es>
Date: Mon Oct 25 11:33:23 2010 +0200
Moved _enableAccessibility() method from the backends to the settings_manager
src/orca/settings_manager.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/settings_manager.py b/src/orca/settings_manager.py
index 66a0283..427a5d3 100644
--- a/src/orca/settings_manager.py
+++ b/src/orca/settings_manager.py
@@ -217,6 +217,20 @@ class SettingsManager():
self.pronunciations.update(self.profilePronunciation)
self.keybindings.update(self.profileKeybindings)
+ def _enableAccessibility(self):
+ """Enables the GNOME accessibility flag. Users need to log out and
+ then back in for this to take effect.
+
+ Returns True if an action was taken (i.e., accessibility was not
+ set prior to this call).
+ """
+
+ alreadyEnabled = settings.isAccessibilityEnabled()
+ if not alreadyEnabled:
+ settings.setAccessibilityEnabled(True)
+
+ return not alreadyEnabled
+
def setProfile(self, profile='default'):
"""Set a specific profile as the active one.
Also the settings from that profile will be loading
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]