... 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.
Click twice on a grid cell; Cancel or OK dismiss the dialog. But ESC does not,
and a second ESC does not either. ESC dismisses the dialog only if the focus
is not in the grid.
Symptoms were:
Edit metadata; ESC; exit audacity -- memory leaks.
Edit metadata; single-click "Genre" field twice; ESC -- assertion violaion in
Windows debug build.
Make a label; Track > Edit Labels; single-click time field twice; esc -- also
caused assertions, then memory leak at exit.
However, there are still two small memory leaks at exit after using Label
editor, yet unexplained.
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls. Mostly useful as documentation of design intent.
Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX. You can get Windows to build, but there's
still some display issues.
These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
* "Open Me&tadata Editor..." -> "Edit Me&tadata..." because it's more concise, matches other occurrences, and eliminates any confusion about file opening.
* In AudacityProject::OnEditMetadata(), "Edit the metadata tags" -> "Edit Metadata Tags": more concise, and brings in line with capitalization standard for dialog titles.
* Likewise for capitalization in other invocations of ShowEditDialog in ExportMultiple.
* In TagsEditor::PopulateOrExchange(), "RETURN key" -> "ENTER key" because I don't recall ever seeing a Return key on a comnputer (!).
Refer to bugzilla for discussion, but, to summarize, this removes any writing of ID3V1 tags. ID3V1 tags will still be imported, but they will be written as ID3V2 tags.