... Wrong sizer was pushed instead of the page's own, and was popped as
current sizer, when the first sub-sizer in the page was done.
But nothing was affected by this error, because notebook pages are used only
in the About dialog, and none of the pages have more than one directly nested
sizer. So popping null as current sizer didn't matter because the stack did
not deepen again.
PushSizer() only after assigning mpSizer, as with other calls to it.
... so that in all cases a ChoiceSetting object stores all the details about
visible names, internal string codes, default value, and preference path.
Repetition of literals for some preference paths and their default values is
eliminated
... preparatory to removing that overload.
This overload is used in exactly these files:
DevicePrefs.cpp (displaying host names retrieved by portaudio, which are not
defined in Audacity source)
EffectsPrefs.cpp
ExportFLAC.cpp (twice)
ExportMultiple.cpp (displaying the descriptions defined in the several export
plugin classes)
GUIPrefs.cpp (four times: languages, manual location, theme, and meter DB
range; the language names themselves don't have localizations!)
MidiIOPrefs.cpp (displaying host names retrieved by portmidi)
TracksBehaviorsPrefs.cpp (for solo button choices)
There is also TieNumberAsChoice, used in QualityPrefs and elsewhere, which
calls through to that overload.
... with one exception (/FileFormats/FFmpegAACProfile),
the calls are replaced with TieNumberAsChoice.
Some unfortunately repetitious string tables are a small price in exchange for
reduced confusion in ShuttleGui.cpp
Untranslated strings are passed to TieNumberAsChoice, which is wrong, but that
will be made right in the next commit when we change the implementation of that
function
... Make the array of integer choices optional, and call through to the
non-deprecated overload of TieChoice, which uses strings.
In 2.3.3 this function is only used in the Quality preferences dialog.
... as we did last relase for import; making several header files unnecessary.
This breaks up a strongly connected component of 9, which was the largest
remaining. Now the largest remaining is 5.
... instead of keeping an exhaustive list of them with hardcoded preference
paths. And some duplication of string literals for those paths is eliminated.
One small piece of improvements of preference path handling.
Problem:
Currently calling Track::EnsureVisible() also sets the track as focus.
In Audacity 2.3.3 the timing of the code to set the focus was changed. Rather than a direct call, an event is queued, and then the focus is set. This has changed the timing of the focus event which is sent with respect to other focus and name change events. In particular in the case of toggling the selectness of the focused track, this moved the focus event to be after the name change event.
These changes only had an effect on NVDA - Jaws and Narrator were unaffected.
The introduction of this bug has highlighted an existing problem.
1. There are a small number of existing cases where a track needs to be visible, but where it is already the focus, and so setting the focus is unnecessary. For example, pressing Enter to toggle whether a track is selected.
2. Some of the Audacity code which calls EnsureVisible() is written with the assumption that EnsureVisible() doesn't set the focus, and so there are unnecessary focus events. Whilst other code which calls EnsureVisible() assumes that it also sets the focus. Confusion.
The Fix:
Remove the setting of focus from within Track::EnsureVisible(), and so remove the unnecessary focus events.
Calls to set the focus were added before calls to EnsureVisible where the code was relying on EnsureVisible to set the focus. In TrackPanel::ProcessUIHandleResult, and TrackPanel::OnMouseEvent, I wasn't sure if the focus needed to be set, so called it anyway to ensure that the behaviour did not change.
So I would like to remove the setting of focus from within Track::EnsureVisible(), and add explicit calls to set the focus where necessary.
I think this would make the code clearer, remove unnecessary calls to set the focus, and make it easier to keep NVDA happy.
It gets included in some pull requests, so keep it short, and refer to the wiki.
The wiki page needs to be less off putting too, but that's for another day.
The Calf plugin suite exposes Event ports which is currently not supported or defined in `liblilv`, so instead of flat rejecting the filter, test the port name for `Events` and allow them to load.