Speech Dictionary dialog: Add a "Remove all" button (#11802)#12385
Speech Dictionary dialog: Add a "Remove all" button (#11802)#12385JulienCochuyt wants to merge 9 commits into
Conversation
See test results for failed build of commit 7481ce6eb1 |
Redeem copyright holders' names by blaming the history of `source/gui/settingsDialogs.py`
Remove "Dictionary Entry Error" from the expected `checkPot` failures
f0291dd to
5d1b14a
Compare
|
This was in my list of things to do as well, so happy to see it.
Added a "Remove all" coherent with the "Restore to factory default" as
found on the Input Gestures dialog
Can you talk some about why you have named the button as you have, instead
of "Restore to factory defaults" like the Input Gestures dialog?
|
|
@XLTechie wrote:
Sure. The two possible alternative labels were actually proposed by @Qchristensen in #11802. Do you agree? |
|
Julien Cochuyt wrote:
Do you agree?
Yes, that reasoning makes sense. It was what I expected, but in case you
had another aspect to the consideration, I wanted to hear it.
That aspect turns out to be that it can be reverted by the cancel button.
I hadn't considered that, but I like it, and the button name is good given
how it is going to operate in my opinion.
Thank you for doing this work.
|
| self.typeRadioBox.SetSelection(DictionaryEntryDialog.TYPE_LABELS_ORDERING.index(type)) | ||
|
|
||
|
|
||
| class DictionaryDialog(SettingsDialog): |
There was a problem hiding this comment.
While I agree DictionaryDialog should be eventually moved out of gui\settingsDialogs it would break backwards compatibility - various add-ons expect it either in the gui as it is star imported there or in the gui\settingsDialogs. Unles you expect this to be merged before 2021.1 is finalized this part should be reverted IMO.
There was a problem hiding this comment.
On the other hand, 2021.1 already brings API changes.
Still, I restored as of 579cbf6 module-level import in gui of DictionaryDialog, as late-importing did not bring much benefit towards the wider API change.
@feerrenrut, may we please have your view here?
There was a problem hiding this comment.
I don't believe this will be in 2021.1, unless another dev sees reason to target this to beta instead. I think the a change like in 579cbf6 is good, and should be done to maintain backwards compatibility. A comment should be added though to note this is a deprecation and should only be removed with a .1 release.
There was a problem hiding this comment.
we can import both of these removed classes into this module for now to maintain compatibility until 2022.1. Linting warnings can be ignored with a noqa comment to remove this in 2022.1
|
Hi Julien, Reverting this to a draft as it breaks API compatibility |
|
@seanbudd wrote:
API compatibility issues addressed. |
See test results for failed build of commit 02c99d6a11 |
| # Copyright (C) 2006-2021 NV Access Limited, Michael Curran, Peter Vágner, Mesar Hameed, Joseph Lee, | ||
| # Aaron Cannon, Reef Turner, Ethan Holliger, Julien Cochuyt, Thomas Stivers, Cyrille Bougot |
There was a problem hiding this comment.
This needs to be updated, referencing the discussions here: #12386
|
Thanks @JulienCochuyt for your work on this. I am closing this PR as it has been followed up in #13294 |
nvaccess#13294 Link to issue number: Fixes nvaccess#11802 Supersedes nvaccess#12385 Summary of the issue: The Speech Dictionary dialog lacks a "Remove all" button to ease clearing a whole dictionary. Description of how this pull request fixes the issue: Split both the DictionaryDialog and DictionaryEntryDialog from gui.settingsDialogs to a new dedicated gui.speechDict Redeem copyright holders' names by blaming the history of source/gui/settingsDialogs.py Linted the result in a separate commit for easier review and history tracking Added a "Remove all" coherent with the "Restore to factory default" as found on the Input Gestures dialog
…er after abandoned #12385 Fixes #11802 Supersedes #12385 Summary of the issue: The Speech Dictionary dialog lacks a "Remove all" button to ease clearing a whole dictionary. Description of how this pull request fixes the issue: Split both the DictionaryDialog and DictionaryEntryDialog from gui.settingsDialogs to a new dedicated gui.speechDict Redeem copyright holders' names by blaming the history of source/gui/settingsDialogs.py Linted the result in a separate commit for easier review and history tracking Added a "Remove all" coherent with the "Restore to factory default" as found on the Input Gestures dialog
Link to issue number:
Fixes #11802
Summary of the issue:
The Speech Dictionary dialog lacks a "Remove all" button to ease clearing a whole dictionary.
Description of how this pull request fixes the issue:
DictionaryDialogandDictionaryEntryDialogfromgui.settingsDialogsto a new dedicatedgui.speechDictsource/gui/settingsDialogs.pyTesting strategy:
On a source copy, filled and emptied various default/voice/temp dictionaries.
Known issues with pull request:
Interestingly, the "Remove" button (removing a single entry) was historically designed to handle the removal of all the selected entries in a multi-selection list control. This idea seems to have been abandoned as the list control is explicitly set to support only a single selection - presumably for easier user interaction.
Change log entries:
New features
The Speech Dictionary dialog now features a "Remove all" button to help clear a whole dictionary.
Code Review Checklist: