Fixed bug Martyn noticed, where clicking on the sync-lock icon caused the track to (un)minimize. This was because TrackInfo::GetMinimizeRect() was still returning the full size, which I had just adjusted in TrackInfo::DrawMinimize(), so the capture test in other places was wrong. Moved the size adjustment into TrackInfo::GetMinimizeRect().
Also got rid of unused bool minimized parameters of TrackInfo::GetMinimizeRect() and TrackInfo::DrawMinimize(). It wasn't used at all in TrackInfo::GetMinimizeRect(), so I replaced it with bIsSyncLockSelected, so it can determine whether to reduce the width to give room for the sync-lock icon. For TrackInfo::DrawMinimize(), it was unnecessary, because the track was also getting passed in, so no need to call t->GetMinimized() in every call to DrawMinimize() -- just call it within DrawMinimize().
Remove tiles from rulers. They were interfering with visibility of ruler marks.
Restore the icon to TrackInfo, but not in the title bar. Instead, when sync-lock is on and the track IsSyncLockSelected(), decrease the width of the minimize button and show the icon to the right of it. This way, it shows even when the track is minimized.
In light of discussion about crazy things users do, decided to leave in the former "Temporarily replace..." options, but changed the wording to "Treat missing audio as silence" and warn that the waveform may not show silence.
Added FSCKstatus_SAVE_AUP flag (and returned FSCKstatus_* to being flags). FSCKstatus_SAVE_AUP is set for missing aliased files, so that AudacityProject does a save, fixing a bug where after "Close project immediately...", opening other projects failed in a way that made them incorrectly report missing _data folders, rather than go through Project Check (DirManager::ProjectFSCK).
Decided to continue with the fake-out fixes for missing aliased files and missing SimpleBlockFiles, i.e., writing zeroes instead of replacing with SilentBlockFiles. Replacing is difficult, and there are other places where the zeroes trick is used, e.g., after project check, if there's a disk error, such as a .au being inaccessible in the middle of edits.
Made the "permanent immediately" and "regenerate" options not do a PushState, because they were not possible to Undo.
DirManager::ProjectFSCK (project check):
Made the enumerations interleaved with handling, because,
for example, user choosing to replace missing aliased block files with silence
needs to put in SilentBlockFiles and delete the corresponding auf files,
so those would then not be cumulated in missingAliasBlockFileHash.
We still do the FindX methods outside the conditionals,
so the log always shows all found errors.
Moved check for orphan files to last, so user first has a chance to get
messages about missing files that user may have mistakenly renamed
(and the renamed ones would appear to be orphans).
Re-ordered user choices for orphan files dialog to safest-to-boldest.
Changed FSCKstatus_CLOSEREQ and FSCKstatus_CHANGED to be integers rather
than binary flags. They were never returned with both in the result, nor used that way.
Made the project check log warnings use full paths instead of just file names.
Removed close box and system menu from MultiDialog, so that project check dialogs cannot just be closed. User has to decide on one of the choices.
Fixed some handling in AudacityProject::OnShowLog(). If the log was already showing before MultiDialog came up, it froze because it was not re-enabled.
Returned some of them to wxLogMessage from wxLogDebug.
Made paths displayed consistently with '%s'. Changed some wordings for grammar and clarity.
Var renames for clarity. Moved some declarations closer to their usage.
Commented out the places where sys error logging was suppressed. There was no explanation why they were suppressed.
More comments about things to fix (FIX-ME items this time).
Made AudacityProject::OnShowLog make the log window taller so more likely to show the bottom. The implementation of wxLogWindow makes it hard/impossible to scroll to the bottom.
Fix error of duplicate reports of missing aliased files.
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.
Reviewed Al's patch for OnPaste (bug 177) and made these changes.
OnPaste method has grown too long and complicated:
Broke out independent sections to new HandleTextPaste and HandlePasteNothingSelected methods.
Made pastedSomething bool (now "bPastedSomething") cumulative, per Al's correction. Previously, if the last clip paste failed, it showed the whole paste failed. Clearly, the philosophy for paste has been that we take what we can get. There were numerous places (and still some) where the paste results were not even checked.
Added a couple of missing checks for bPastedSomething on paste results.
Declarations:
Made declarations clearer about public vs private methods.
Removed declarations of unused/undefined CommandManagerCallback and CommandManagerListCallback methods.
Moved mSel0save and mSel1save member vars closer to the methods that use them.
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