Skip to content

Add ability to reset all gestures to their factory default#10293

Merged
michaelDCurran merged 6 commits into
nvaccess:masterfrom
accessolutions:resetGestures
Oct 7, 2019
Merged

Add ability to reset all gestures to their factory default#10293
michaelDCurran merged 6 commits into
nvaccess:masterfrom
accessolutions:resetGestures

Conversation

@JulienCochuyt

Copy link
Copy Markdown
Contributor

Link to issue number:

None

Summary of the issue:

As pointed out in #9688 (comment) there is currently no way in NVDA to reset all modifications a user made in the Input Gestures dialog to their factory defaults.
A user willing to do so has to manually locate and delete its gestures.ini file.

Description of how this pull request fixes the issue:

Add a button in the Input Gestures dialog to reset to factory defaults, with due prompt for confirmation and warning that this cannot be undone.

Testing performed:

Checked the user's gestures.ini file is indeed emptied out.
Checked the dialog correctly reflects the new settings, whether it was previously dirty or not.

Known issues with pull request:

Change log entry:

Section: New features, Changes, Bug fixes

Comment thread source/gui/settingsDialogs.py Outdated
Comment thread source/gui/settingsDialogs.py Outdated
@lukaszgo1

Copy link
Copy Markdown
Contributor

Would it be possible not to leave behind empty gestures.ini when resetting? Not a big deal, but since by default there is no empty file created it would be nice not to have it when gestures are restored.

JulienCochuyt added a commit to accessolutions/nvda that referenced this pull request Sep 30, 2019
Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>
@JulienCochuyt

Copy link
Copy Markdown
Contributor Author

Would it be possible not to leave behind empty gestures.ini when resetting? Not a big deal, but since by default there is no empty file created it would be nice not to have it when gestures are restored.

It of course would be possible, but - please excuse my being that straight - I'm really not sure the small benefit is worth even half an hour of ensuring narrowing down all potential corner cases.
@LeonarddeR what do you think?

@LeonarddeR

Copy link
Copy Markdown
Collaborator

It looks like some unrelated commits leaked into this branch, including changes to locale files.

@LeonarddeR

LeonarddeR commented Sep 30, 2019 via email

Copy link
Copy Markdown
Collaborator

@JulienCochuyt

Copy link
Copy Markdown
Contributor Author

It looks like some unrelated commits leaked into this branch, including changes to locale files.

Indeed, seems like master has been rebased.
Rebased this branch too. Seems OK now.

Comment thread source/gui/settingsDialogs.py Outdated
Comment thread source/gui/settingsDialogs.py Outdated
@XLTechie

XLTechie commented Oct 1, 2019 via email

Copy link
Copy Markdown
Collaborator

JulienCochuyt and others added 2 commits October 2, 2019 06:27
Co-Authored-By: Luke Davis <8139760+XLTechie@users.noreply.github.com>
Co-Authored-By: Luke Davis <8139760+XLTechie@users.noreply.github.com>
@JulienCochuyt

Copy link
Copy Markdown
Contributor Author

The suggestion makes me wonder about those corner cases. What, exactly, would be wrong with just causing the button press to delete gestures.ini and restart NVDA? (With appropriate warning added to the existing warning, of course, that NVDA will be restarted.) The most likely problem is a read-only file system, and you're already having to handle that case regardless.

With the proposed implementation, there is no need at all to restart NVDA.
We could remove gestures.ini, but what would be the benefit of doing so compared to the current approach?
Also, see #10293 (comment)

@michaelDCurran michaelDCurran merged commit 0e12e8a into nvaccess:master Oct 7, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.3 milestone Oct 7, 2019
michaelDCurran added a commit that referenced this pull request Oct 7, 2019
@JulienCochuyt JulienCochuyt deleted the resetGestures branch October 7, 2019 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants