Cyrille via groups.io wrote:
What is the recommended way to save settings in the default profile, no matter the active profile.
You can see one way of doing it in Speech Logger.
I don't allow settings to be changed when not in the normal profile, and I do some checks to make sure that the normal profile is being used.
There was also another strategy, used in Update channel selector, I think. The trick was to access the profile with index [0] which is always the default
one. However, I seem to remember that this approach had corner case issues. I cannot find any message with such limitation however. Any hint?
I do not remember many specifics right now, but I had done extensive testing of that procedure, and found situations where the profile was incorrectly identified as normal when it wasn't after changes were made, and some other strange side effects.
I had originally used that method in an early or pre-release version of Speech Logger, but dropped it because of those problems.
I use a similar, but partial method in Numpad Nav Mode.
There, I disable one checkbox if the dialog detects a profile is active.
There may be better methods, but the most reliable one I know of is to keep the settings dialog from changing anything, or changing some things, for other than the normal profile; and then to check on the configuration save mechanism, if the profile is normal.
There are probably ways a user could get around it, but if there is a way to get around it accidentally, I haven't found it yet.
NVDA itself needs a better way of handling all this.
In particular, there are config dialogs of NVDA that only interact with the normal profile, even if another profile is active. Sadly, this is hard coded in the gui module, and from my various attempts, difficult to extend or generalize.
However, if you want to try what they do, attempt to mimic what is done for the general settings dialog.
Luke