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.
Caused by declaring a variable later than a conditionally compiled piece of code.
Net result is that Mac will be less tolerant of a window partly off the top of the screen than Windows will be, and will reset it to the default.
Splash screen still always appears on first screen (intentional).
Also I fixed issue where new project windows would appear on first screen, even if Audacity on second.
Fixed by being more tolerant of window being (slightly) off screen. Windows 10 appears to mis-report the window size by 6 pixels. This fix allows the user to restore a window that is (slightly) off screen. That's OK and helps those users who position and size the window very precisely.
Problem was that cfd7648fce2388ec8ae35b38004f2ae111c484af fixed a memory leak
but created a dangling pointer bug, which does not happen during usual run
of Audacity because AudacityProject::OnCloseWindow is reached then before
destroying AudacityProject.
Fixed it by using a std::shared_pointer for the TrackList that both
AudacityProject and TrackPanel must use.
This introduces a new variable, mStopIfWasPaused (default true). Actions which require AudioIONotBusyFlag will now stop the audio, if audio was busy but paused and attempt to continue.
We could perhaps make mStopAudioIfWasPaused into a preference, but I don't think we need to keep even the option of the old behaviour.