Skip to content

Commit

Permalink
Added an input gesture to temporarily disable all configuration profi…
Browse files Browse the repository at this point in the history
…le triggers. Closes nvaccess#4935
  • Loading branch information
LeonarddeR authored and Leonard de Ruijter committed Oct 20, 2016
1 parent bb029f4 commit 97e361c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion source/globalCommands.py
Expand Up @@ -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
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 97e361c

Please sign in to comment.