... the intention being, that no string literal for a path, or its default
value, shall ever occur twice in the code, relying on long-distance coincidence
of literal values. Instead, a named Setting object is constructed once, then
read and written.
For now, the Tie... functions in ShuttleGuiBase will take references to
implicitly constructed temporary Setting objects. But all should later be
made static objects, and the constructors made explicit.
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
... Because of different ordering of file-scope static initializations, visiting
TrackInfo.cpp before wxApp is initialized. (This didn't happen on Mac.)
This requires other changes to PrefsListener so that safe unbinding is
guaranteed by destructors, even if the PrefsListener is destroyed after the
global wxApp object.
... when special initial population of preferences is lifted into
AudacityApp.cpp.
This takes four files out of the big strongly connected component of the graph
into low levels, but three of them (Prefs, Languages, FileNames) are still in
a small cycle. FileHistory is the fourth, depending on the others.
... Unnecessary because transitively included.
But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
...because we don't use the (platform-dependent) typedef wxConfig at all. We
use wxFileConfig directly instead, even on Windows, not using the native
Windows registry.
... 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.
... 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
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
This is an update to commit 516af71. The Dock key is now retained in the config file, so that if a user goes back to a version before the fix, the toolbar layout remains unchanged.
Note that when ToolManager::ReadConfig() is called, InitPreferences has already been called which has set the version keys to the current version of Audacity. Therefore the initial values of these keys are stored in AudacityApp.
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.
Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
On windows the capitalisation does not matter.
On Mac/Windows we use 'audacity' in path names, even if the directories wxWidgets suggests have 'Audacity'.