Commit Graph

87 Commits

Author SHA1 Message Date
Paul Licameli
7edbad3cd1 Bug2570 residual: Compact should not change last saved state...
... So that if you save, edit, compact, close without saving, then reopen,
you recover the saved state as expected, not the compacted state.

Implications:

Do not push an undo state for compaction.  Discard redo states instead.

Do not purge undo states after the last saved.  The database still needs them.
So we might reclaim less space than before.
2020-11-18 19:21:26 -05:00
Paul Licameli
16b249ab9f ProjectFileIO fns now take multiple pointers to const TrackLists 2020-11-18 17:30:55 -05:00
Paul Licameli
8ac1cb75aa Bug2579: Don't corrupt project after compact the exit without save...
... also may improve compaction by clearing mLastSavedTracks first
2020-11-17 17:21:33 -05:00
Paul Licameli
ea76b7c9f7 Don't clear clipboard unnecessarily in ProjectFileManager::Compact() 2020-11-17 17:13:41 -05:00
Paul Licameli
716139494d Move details of OnCompact into ProjectFileManager...
... so it can use mLastSavedTracks
2020-11-17 17:10:43 -05:00
James Crook
f0fb7e5be5 2540 and more disk-full warning adjustments.
- Add text to tell people about the help button.
- Use alternative to 'wxFilename::GetVolume' that works on macOS.
2020-09-25 15:04:52 +01:00
James Crook
4810897b74 Add Help Button.
Two more disk full errors were missing help-link buttons.
2020-09-25 10:39:16 +01:00
binarywisdom
6e4f163317
fixed bug 2109 (#664) 2020-09-09 17:43:41 +01:00
Paul Licameli
77d0851a65 Remove class ImportXMLTagHandler...
... It became unused at d39590cf41

And remove some other complications in ProjectFileManager that were used only
in it
2020-09-01 09:03:43 -04:00
Paul Licameli
1bb34e703e
Bug2529: don't lose data when closing without saving on small drive (#650) 2020-08-28 13:03:35 -05:00
Leland Lucius
0bbf1792fa AUP3: Don't molest project file when applying macros
Cliff reported that if you apply a macro to "Files" and you had
a "saved project" open at the time, you would get the "not saved
properly" dialog when you next open that "saved project".

This should correct it...
2020-08-26 00:06:19 -05:00
Paul Licameli
4ca3e7096f
Track factory cleanup (#646)
* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
2020-08-22 18:44:49 -05:00
Leland Lucius
9d749fef14 AUP3: Fix macro path handling
Aside from the breakage I added to it during the AUP3 conversion,
there was several other issues discovered in regards to how the
export paths were being handled.
2020-08-10 17:48:59 -05:00
Leland Lucius
d4627f0daf AUP3: Reduce crash exposure when compacting
There's still the possibility if a crash happens at just the
right time that the project will be named "<project>_compact_back"
so we should probably look for it during startup.

This also changes all "Vacuum" references to "compact".
2020-07-28 23:25:50 -05:00
Leland Lucius
09f7aaad5b AUP3: UP-35 Dirty Project-2 bloat retention
Add compaction to SaveProject for the original file.
2020-07-27 23:16:27 -05:00
Leland Lucius
e2d6e1cc24 AUP3: Update default/lastused path handling 2020-07-27 14:11:50 -05:00
Leland Lucius
674cfe68c9 AUP3: Offer the active project name for Save Backup
This provides a "template" for the user to modify.
2020-07-25 20:48:15 -05:00
Leland Lucius
03762d0ca3 AUP3: Fix unopened project file 2020-07-25 18:47:30 -05:00
Leland Lucius
0c14e613c7 AUP3: Fix stupid mistake
Thanks for spotting it Paul.
2020-07-22 13:39:01 -05:00
Leland Lucius
6f771d1783 AUP3: Fix previous commit and rework db handling
This moves direct handling of the sqlite3 DB handle into it's own
class, along with the checkpointing thread and prepared statement
cache.
2020-07-22 11:41:03 -05:00
Paul Licameli
bd6536f3c4 Remove obsolete mentions of blockfiles in comments & incomplete types 2020-07-20 19:03:31 -04:00
Leland Lucius
eaaa782730 AUP3: Offer project name during Save As 2020-07-20 17:27:34 -05:00
Leland Lucius
af23a14bdb AUP3: Change message text 2020-07-20 16:34:48 -05:00
Leland Lucius
5652b9b039 AUP3: Automatically save a permanent project
If it was recovered.
2020-07-20 13:37:36 -05:00
Leland Lucius
84f363ee07 AUP3: Simplify checkpoing and add checkpoint progress dialog
Also move the project file closure out of the ProjectFileIO
destructor and does it before the project file window is
destroyed.
2020-07-20 11:10:31 -05:00
Leland Lucius
e669b365f1 AUP3: Remove unneeded error message 2020-07-18 09:25:10 -05:00
Leland Lucius
17268edf4b AUP3: Rename empty project after importing AU* projects 2020-07-17 20:46:08 -05:00
Leland Lucius
93d9303c3d AUP3: Many corrections and (safe) speed ups
This reenables synchronous mode by default.  However, for processing
where a power cut or crash can be tolerated, synchronous and journaling
are disabled.  Once the processing is complete, they are reenabled.

Types of processing that are like this are "Save As", "Backup Project",
and "Vacuuming". They all write to a separate project file while
running, so the real project file is safe.

Unfortunately, effects are back to be slow and sluggish.

I believe I've address all of the weird file corruption issues and
I'll continue to continue testing for these.
2020-07-17 16:17:42 -05:00
Leland Lucius
01181c8f21 AUP3: UP-29 Save Project does not propagate project name to Audacity window 2020-07-15 08:28:00 -05:00
Leland Lucius
176eb49a1e AUP3: Several little fixes
Handle bypassing of timetracks in AUP importer correctly
Add bypassing of timetracks in AUP3 importer
Move/add AUP3 in filter lists.
2020-07-15 07:57:20 -05:00
Leland Lucius
5bc3ae659c AUP3: Added AUP3 importer and improved progress dialogs 2020-07-15 01:32:48 -05:00
Leland Lucius
a0008831e0 Revert "AUP3: Reworked CopyTo() yet again"
A bit more thought needs to do into this.
2020-07-12 10:55:54 -05:00
Leland Lucius
e3c5563d35 AUP3: Reworked CopyTo() yet again
This time it has the potential to produce much smaller
output files since it ONLY copies the active blocks and
not all of the blocks related to undo history.
2020-07-12 10:39:37 -05:00
Leland Lucius
251da3bb3b AUP3: First go at the AUP importer
Near as I can tell, it's pretty much done. Feeding all manner of
.aup projects will definitely need to be done. It would be best
to feed it REAL projects, not the contrived ones I've been playing
with.
2020-07-12 03:53:25 -05:00
Leland Lucius
b12fafbea0 AUP3: Fix stupied build failure 2020-07-10 01:32:56 -05:00
Leland Lucius
0bea15077b AUP3: UP-15 - cannot update a project
At least the project file doesn't get deleted now.
2020-07-06 18:55:53 -05:00
Leland Lucius
22e90cbf72 Fix stupid test 2020-07-05 16:05:43 -05:00
Leland Lucius
015ba548c2 AUP3: Add SaveCopy macro command
To go along with new menu item.

And adjust prompting for filenames in Save dialogs to return
to Save dialog if file can't be overwritten.
2020-07-03 17:12:26 -05:00
Leland Lucius
c04ed76b6b AUP3: Fixes a couple of reported issues
Add the missing "File -> Save Project -> Backup Project..." menu item

Allows "File -> Save Project -> Save Project" to save unmodified
projects.
2020-07-03 14:38:57 -05:00
Leland Lucius
8ea07572c1 AUP3: Several fixes
These mainly address the bugs that Steve reported and a couple
more I found along the way.

Corrected ProjectFileIO::GetMinMaxRMS() - It was still using the
original method of keep all block data in memory.  I missed it
when I redid everything.  Fixes his Amplify crash.

Temporary filenames should no longer be shown to the user.

Resaves will no longer present a Save As dialog.

Cleaned up duplicate pathname handling in ProjectFileIO.

Returned proper errors when loading a project
2020-07-01 13:26:20 -05:00
Leland Lucius
d39590cf41 AUP3: First round of updates
!!! THERE WILL NO DOUBT BE BUGS !!!

This is a big one and there's still several things to
complete. Just want to get this in the wild to start
receiving feedback.

One big thing right now is that it will NOT load pre-aup3
files.  An importer is on the way for that.
2020-07-01 02:30:18 -05:00
Leland Lucius
b1beb20ae9 AUP3: Remove obsolete audio file cache 2020-07-01 01:14:10 -05:00
Leland Lucius
cbf1bb558e AUP3: Removes OD code related to project file handling
This removes all of the OnDemand code embedded throughout
    the main codebase. Individual files related specifically
    to OD have been left in place, but removed from the build.
2020-07-01 01:14:05 -05:00
Paul Licameli
66c5b76573 Simplify public interface of FileHistory 2020-05-26 10:47:47 -04:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Leland Lucius
e09b35f2c8 Bug 2062 - Export as WAV does not remember the previously used setting
This should resolve the final nit for this bug.
2020-03-30 22:40:27 -05:00
James Crook
9985b8a9b8 Fix Big Time TimerToolBar, Stage III
Fixed issue where format selector could disappear.
Fixed upgrade from 2.3.3.
Remembers time format.
2020-02-14 12:02:21 +00:00
Paul Licameli
2570b56176 Rename Maybe and its members more like std::optional of C++17 2020-01-19 11:38:12 -05:00
Paul Licameli
a93c4472f5 TrackList has back-pointer to project...
... and Track::GetOwner() is publicized, so that now you can find the
the AudacityProject, if any, that owns a given Track; this will help eliminate
some uses of GetActiveProject
2020-01-06 14:14:21 -05:00
Paul Licameli
d23569ca10 Construct Exporter with project pointer, fewer GetActiveProject calls 2020-01-02 13:13:48 -05:00