restructuring and renaming for clarity, granularity, and reduction of code duplication
Found and commented on more errors in this code. In the "Close immediately" cases, it doesn't do a real close and that can break subsequent opening of other or the same problematic projects.
Changed several cases where GetDirManager()->ProjectFSCK returned FSCKstatus_CHANGED. These caused a PushState, but Undo could not do anything. Changed corresponding wordings for "Replace missing audio with silence" to say "permanent immediately" instead of "permanent on save", which was incorrect.
Added a "Show Log for Details" button to MultiDialog so it does what the comments say, i.e., allows the user to look in the log to see which files are problematic (e.g., orphaned blockfiles.
Tightened up ProjectFSCK messages.
Added comments about remaining (long-standing!) problems in ProjectFSCK.
Comments about what's wrong with the DirManager::ProjectFSCK "Missing Aliased Files" dialog actions and what to do about it. (More to follow!)
Changed PushState for project repair from "Repair" to "Project Repair" to distinguish from Repair effect.
renames for clarity
better handling of error conditions in PCMAliasBlockFile::BuildFromXML so that DirManager::ProjectFSCK can report cases of missing PCMAliasBlockFile files on opening projects where missing files were not corrected
code cleanup
naming improvements for clarity (e.g., aliasedFileName instead of aliasedFile for an instance of wxFileName -- it's not an instance of AliasedFile)
parens, not square brackets, for parenthetic phrases
* Make progress messages not have ellipsis at end, as convention in other cases.
* Reword "Continue without deleting" radio button about orphan files.
* Fix the removal of empty dirs at the end of DirManager::ProjectFSCK() which previously did nothing because it passed a hardcoded zero count for the file list, to what is now RecursivelyRemove(). Added RecursivelyCountSubdirs() so progress dialog has correct maximum (directory count, not blockCount as previously). Added RecursivelyRemoveEmptyDirs().
* Found that Windows SDK functions sometimes do not remove empty directories and added code to help it in some cases.
(still in progress, per "//vvvvv" comments):
Update credits and copyright.
Fix some grammar and remove obvious comments.
(For example, stack vars are always destroyed when
"out of context" (i.e, scope, when stack popped),
so no need to comment on it).
Remove wxWidgets error squelching.
"rm_dash_rf*" static functions
Rename all the "rm_dash_rf*" static functions to better
reflect what they actually do (per "finally
misnomer" comment). Not very mnemonic to
name functions on *nix-specific shell command
"rm- rf" that they do not emulate. Only 1 of the 4
so-named actually removed anything.
Remove one unnecessary function (originally
"rm_dash_rf_enumerate"), replaced by
parameter defaults on main recursive function
(originally rm_dash_rf_enumerate_i").
Remove unused parameter "prompt" from
rm_dash_rf_enumerate_i (now RecursivelyEnumerate).
The files_p and dirs_p ints were actually used only
as bools, so make them bools bFiles and bDirs.
Rename "prompt" vars to match ProgressDialog
"message" arg. They do not prompt user to do
anything, they're informational.
files_p and dirs_p were int but used only as bools,
so make them bool for better readability.