... Fixing many conditional operators with explicit construction of wxString
instead of simple string literals;
And fixing allocation of more strictly aligned structures on Mac, without need
for 10.14 as the minimum SDK, by means of some class-specific operators new
and delete.
Also fixed a bug with GetPreferences, where uninitialised pointers
could be used that were only meant for use when editing values
(in which path they would be initialised).
Bug 2135 - Audacity crashes if launched with a locked pluginregistry.cfg file
Bug 2651 - If pluginregistry.cfg gets locked while Audacity is active the Plug-in Manager is blocked - with no help
Bug 2650 - Virgin launch fails with no pluginregistry.cfg file created
Bug 1264 - Writing to locked audacity.cfg not reported to user
Bug 2649 - Launching Audacity with a locked audacity.cfg file gives not one but three error messages - and no help
Bug 2652 - User is not warned if they launch Audacity with a locked pluginsettings.cfg file
... except Audacity.h
This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types
(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
... Replacing:
Insert => insert
RemoveAt => erase
Remove => erase
IsSameAs => operator == or operator !=
(but only when second argument was true or default)
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes
for wxString,
IsEmpty => empty
Clear => clear
Alloc => reserve
for wxArrayString,
Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
These are mostly for getting it to build on Linux, but I've
also created new configs in Visual Studio to make it easier
to switch between wx2 and wx3.
For Linux, you have to tell configure where to find the wx3
version of the wx-config script and, since some distros build
wxWidgets v3 against GTK+ v3, you may also need to enable
gtk3 with something like:
./configure --enable-gtk3 WX_CONFIG=/usr/bin/wx-config-3.0
On Windows, I've added "wx3-Debug" and "wx3-Release" to the
existing "Debug" and "Release" configurations.
They depend on you having your WXWIN environment variable
pointing to your wx2 directory and a new WXWIN3 environment
variable pointing to your wx3 directory. For instance, I
have:
WXWIN=C:\Users\yam\Documents\wxWidgets-2.8.13
WXWIN3=C:\Users\yam\Documents\wxWidgets-3.0.2
Doing this allows you to switch freely among the 4 configurations
without having to get out of Visual Studio and monkey around with
the environment.
The project files will also add the location of the wxWidgets DLLs
to the PATH when running Audacity from within Visual Studio. They
add %WXWIN%\lib\vc_dll or %WXWIN3%\lib\vc_dll at the beginning
of the PATH variable as appropriate.
I expect that once we convert to wx3 we'll just drop back down to
the normal Debug and Release configurations, but this should make
switching between wx2 and wx3 much easier during the transition.