This fix adds flags to RecursivelyRemove to be more specific about what to remove. With the kCleanDirsOnlyIfEmpty option it is now safe to call CleanDir on closing a second unsaved project. In particular, if some of the wave has been copied to the clipboard, that part of the wave does not get deleted on close, and is available to paste into the other project which is still open. In CleanDir the folders containing those block files are not deleted. They will get deleted later when the second project is closed too.
CleanDir is now called with that option when closing a project that is not the last one being closed. .DS_Store files, if present, will be deleted, and any empty directories for that project. I have also tested that clipboard contents are preserved.
The welcome screen now has an extra prelude for Alphas, and as result no longer needs to force a version check onto our website. Users can still do that by clicking "check online".
I've also rearranged the version check code a little, so that there is better reuse. E.g. we can change the URL in just one place in the code.
- For ALPHA builds we do a check version with the Welcome screen (if welcome screen is enabled).
- A 'Check Online' in the About box provides a new route to check version
- Check Version now passes CommitId and Build Date/Time to identify a version.
To actually close the bug we need the javascript on the server page to put up informative messages.
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.
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.
Note that CleanDir may be used on a temp directory, deleting entire projects, and in that case
we delete all files too, but do not want to delete files that are at the top level, only ones inside
projects.
Projects will only have symlinks in them if they have been tampered with, and then
following the links, especially when doing CleanDir(), would be dangerous. So don't.
Improved comments, otherwise it isn't clear that CleanDir is needed on Windows
and Linux, not just Mac. It is deleting whole subdirs, not just .DS_Store files.