From 97e361cd33c9ae6e6dadba7c526a54c3ecdbd32e Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Fri, 20 Feb 2015 14:13:13 +0100 Subject: [PATCH] Added an input gesture to temporarily disable all configuration profile triggers. Closes #4935 --- source/globalCommands.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/source/globalCommands.py b/source/globalCommands.py index d400863d6cd..5bd2245b17c 100755 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -3,7 +3,7 @@ #A part of NonVisual Desktop Access (NVDA) #This file is covered by the GNU General Public License. #See the file COPYING for more details. -#Copyright (C) 2006-2016 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer +#Copyright (C) 2006-2016 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V. import time import itertools @@ -1978,6 +1978,20 @@ def script_activateConfigProfilesDialog(self, gesture): script_activateConfigProfilesDialog.__doc__ = _("Shows the NVDA Configuration Profiles dialog") script_activateConfigProfilesDialog.category=SCRCAT_CONFIG + def script_toggleConfigProfileTriggers(self,gesture): + if config.conf.profileTriggersEnabled: + # Translators: The message announced when temporarily disabling all configuration profile triggers. + state = _("Configuration profile triggers disabled") + config.conf.profileTriggersEnabled=False + else: + # Translators: The message announced when re-enabling all configuration profile triggers. + state = _("Configuration profile triggers enabled") + config.conf.profileTriggersEnabled=True + ui.message(state) + # Translators: Input help mode message for toggle configuration profile triggers command. + script_toggleConfigProfileTriggers.__doc__=_("Disables or enables all configuration profile triggers, where disabling is on a temporary basis") + script_toggleConfigProfileTriggers.category=SCRCAT_CONFIG + def script_interactWithMath(self, gesture): import mathPres mathMl = mathPres.getMathMlFromTextInfo(api.getReviewPosition())