Skip to content

Commit

Permalink
Add an input gesture to temporarily disable all configuration profile…
Browse files Browse the repository at this point in the history
…s (PR #6488)

An input gesture can be assigned to temporarily disable all configuration profile triggers. 
Fixes #4935
  • Loading branch information
LeonarddeR authored and feerrenrut committed May 6, 2018
1 parent fb645e6 commit 2c26aa2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions source/globalCommands.py
Expand Up @@ -2125,6 +2125,24 @@ 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:
config.conf.disableProfileTriggers()
# Translators: The message announced when temporarily disabling all configuration profile triggers.
state = _("Configuration profile triggers disabled")
else:
config.conf.enableProfileTriggers()
# Explicitly trigger profiles for the current application.
mod = api.getForegroundObject().appModule
trigger = mod._configProfileTrigger = appModuleHandler.AppProfileTrigger(mod.appName)
trigger.enter()
# Translators: The message announced when re-enabling all configuration profile triggers.
state = _("Configuration profile triggers enabled")
ui.message(state)
# Translators: Input help mode message for toggle configuration profile triggers command.
script_toggleConfigProfileTriggers.__doc__=_("Toggles disabling of all configuration profile triggers. Disabling remains in effect until NVDA is restarted")
script_toggleConfigProfileTriggers.category=SCRCAT_CONFIG

def script_interactWithMath(self, gesture):
import mathPres
mathMl = mathPres.getMathMlFromTextInfo(api.getReviewPosition())
Expand Down
2 changes: 2 additions & 0 deletions user_docs/en/userGuide.t2t
Expand Up @@ -1715,6 +1715,8 @@ Sometimes, it is useful to temporarily disable all triggers.
For example, you might wish to edit a manually activated profile or your normal configuration without triggered profiles interfering.
You can do this by checking the Temporarily disable all triggers checkbox in the Configuration Profiles dialog.

To toggle disabling triggers from anywhere, please assign a custom gesture using the [Input Gestures dialog #InputGestures].

++ Location of Configuration files ++[LocationOfConfigurationFiles]
Portable versions of NVDA store all settings and add-ons in a directory called userConfig, found in the NVDA directory.

Expand Down

0 comments on commit 2c26aa2

Please sign in to comment.