... because the two macros have the same expansion, and are both checked for
in the --keyword arguments passed to msgfmt by locale/update_po_files.sh.
This commit makes ONLY such changes, and comments in Internat.h. It is big
but quite harmless.
The intention is to introduce a type distinction in a later release, by defining
XXO differently. XXO is used where & characters in strings (for hotkeys of menu
items or control prompts) are permitted, XO where not.
... which makes Project.cpp a bit less dependent on some details of other
classes
This puts Tags.cpp back into the big strongly connected component of the
dependency graph. That will be remedied later when Project.cpp becomes a
low-level file
... 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.
... 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
... Strong, meaning that the file at the specified path is created or modified
only if all write operations complete without exceptions, barring one very
unlikely possibility that a final file rename fails, but even in that case the
output is successfully written to some path.
This commit does not add throws, but changes the type thrown to a subclass of
AudacityException, so that GuardedCall will cause the user to see an error
dialog in all cases.
Duplicated logic for making temporary files and backups is now all in one
place, the class XMLWriter.
There may be more new GuardedCalls than necessary -- the catch-all for the
event loop, AudacityApp::OnExceptionInMainLoop, might be trusted instead in
some cases -- but they are sufficient.
Problem: on Windows, Esc does not cancel metadata editor.
Fix:
1. In tag.h, for windows, don't override IsEscapeKey().
2. In tag.cpp, for windows, include a return in the function DoCancel, so that if a cell is being edited and the user presses Esc, this just cancels the edit, and not the dialog.
This fix returns the behaviour of the dialog on Windows back to the behaviour prior to commit c1ca055. It only affects the behaviour on Windows.