... The return codes were mostly ignored anyway, and exceptions will be thrown
instead.
It seems there was also confusion whether the return values of Track::Paste
and Track::SyncLockAdjust were to indicate success or indicate whether there
was any change. No matter now.
No ellipses in title bar of file open/import dialogs
Auto Recovery Discard dialogs say only recoverable projects are discarded
Capitalised button in Dependency dialogue per MS guidelines.
... so that AudacityProject::AudacityProject no longer has a path in the
static call graph that reaches block file write operations that might throw.
So it is easier to prove that other functions, calling that, don't throw.
Also delay the possibly thowing save of the import until after certain other
steps in the file opening procedure.
... 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.
The original fix of years ago must have caused leaked memory, and was
undone by my other changes to track memory management. This fix preserves
the intent, and avoids leaked memory.
Fix affects windows only.
In the case of Save and SaveAs creates the directory too, so that the dialog can be positioned there.
For Export Multiple, will prompt if the directory does not exist.
Previously we relied on Windows doing this. With the fix to now use Documents directory, if none was set, Windows no longer remembers the directory. So now we remember it instead.
... At startup, spawn a copy process in main() and crash it at once. The
child process continues. (The fix was ineffective when the parent continued
and the child crashed.)
Re-activiation of the application is also needed or else the windows are
hidden behind other applications.
Another sleep when closing a project, to fix occurrences of the bug caused by
closing of a project window without saving changes.
I have done as suggested in the bug comments, and used:
Windows: Users\username\Documents
Unix/Mac: ~/Documents .
We could though use GetLocalizedResourcesDir() and could use Music rather than Documents.
Opening Audacity can give a project window that straddles screens (if that is what the user wants and had last time they closed).
New windows created from menu item new will still start out initially all on one screen.
Works by un-full-screening before closing. Patching wxWidgets was needed to
make that work correctly after full-screening by clicking on the green circle
in the title bar, but that fix is not needed for full screen after command+/
Several users have stated confusion about the old message,
thinking that it meant 'changes to the imported file', whereas
it actually refers to the 'project'.
Also fix a couple of compiler warnings.