Commit Graph

128 Commits

Author SHA1 Message Date
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
Paul Licameli 7592227f14 Remove uses of GetActiveProject in import 2020-01-02 13:11:17 -05:00
Paul Licameli aa39f9ade2 Rewrite FileNames::SelectFile using FileTypes...
... And more uniformity in the descriptions of file types used in more than
one place

Also fixes missing translations in VSTEffect.cpp
2019-12-29 15:35:04 -05:00
Paul Licameli c64b3cb31f Rewrite FileDialogWrapper using FileNames::FileTypes...
... also removing some repeated code and using the config keys /DefaultOpenType
and /LastOpenType only in Import.cpp
2019-12-29 15:35:03 -05:00
Paul Licameli 259359a283 Update some calls expecting TranslatableString in disabled code 2019-12-28 23:49:14 -05:00
Paul Licameli 49cab86fc1 TranslatableString for tooltips and status bar messages 2019-12-20 21:54:49 -05:00
Paul Licameli 2007346551 Pass TranslatableString to help, warning, and error dialogs 2019-12-20 21:48:21 -05:00
Paul Licameli dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli ae42397d64 FileNames::SelectFile takes TranslatableString for message 2019-12-20 13:40:20 -05:00
Paul Licameli 71e9e38083 AudacityMessageDialog takes TranslatableString message and caption 2019-12-20 13:40:20 -05:00
Paul Licameli 1b726f4f09 More TranslatableString in dialog wrapper classes...
... All of the dialog names, and the messages for File and directory dialog
wrappers
2019-12-20 13:40:20 -05:00
Paul Licameli 3a633e4fd8 XMLFileWriter takes TranslatableString caption 2019-12-19 16:41:48 -05:00
Paul Licameli d45610073f Fix missed translation, was broken at def1d52 2019-12-19 11:14:01 -05:00
Paul Licameli 726046b379 Fix bad grammar in a message 2019-12-17 19:55:56 -05:00
Paul Licameli 4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
Paul Licameli 89df7a3ffc Use TranslatableString in XMLFileReader & move the help URL logic 2019-12-16 10:58:05 -05:00
Paul Licameli 53ee9c9800 TranslatableString for titles, names, labels of wxDialogWrappers...
... Found one missed translation in CommandTargets.cpp
2019-12-16 10:58:05 -05:00
Paul Licameli d32d464471 Uses of TranslatableString in src/import 2019-12-14 01:48:15 -05:00
Paul Licameli b53b5e54fe Comments about preference keys that store localized string values...
... which is wrong in general, but describe why that's pardonable
2019-12-13 20:18:23 -05:00
James Crook 5a3e9cd063 Fix dialog naming
For nicer Doxygen results, we need consistency in naming of classes.
Dialag classes are now called SomethingDialog.
2019-12-06 10:39:07 +00:00
Paul Licameli 87a9e7ccbb Use global ChoiceSettings variables, not coincidental string literals 2019-11-27 13:38:17 -05:00
James Crook 72f36f8a82 Bug 1622 - Cryptic error message when existing project cannot be saved 2019-09-01 15:28:00 +01:00
Paul Licameli 84d5717005 Remove #include made unnecessary at 65682e7 2019-08-04 15:37:28 -04:00
James Crook 65682e7a0c Remove NormalizeOnLoad
It's a mis-feature.
2019-08-02 18:09:05 +01:00
James Crook 39f054cac3 Bug 536 - OD computation stalls if applying effect before aliased waveform computation completes - and subsequent crash
Fixed by ensuring new imports now always copy data in.  The 'Projects' preferences page is no longer needed.  There is one fewer warnings pref.  The relevant import pref is gone.  Importing of wave data no longer offers the option of working by reference.

I have kept the menu item 'Check Dependencies' for now, as it gives a way for a user to convert an old by-reference audacity project to a self-contained one.  The message for self-contained projects has been updated.
2019-07-29 19:04:30 +01:00
Paul Licameli acfd2b7010 TrackFocus is a new attached object...
... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
2019-07-03 19:10:21 -04:00
Paul Licameli 9f61b67965 Manage some more status bar changes with ProjectStatus 2019-07-02 21:01:34 -04:00
Paul Licameli e2362bc25a Move project status string management to new attached object class 2019-07-02 21:01:34 -04:00
Paul Licameli 2d11e6bda9 Move DoImportMidi out of FileMenus 2019-06-25 00:14:52 -04:00
Paul Licameli 8eca219d57 Separate versions of DoImportMIDI that do and don't assume a project 2019-06-25 00:14:52 -04:00
Paul Licameli ff2cf496cd Move DoEffect out of PluginMenus 2019-06-25 00:14:52 -04:00
Paul Licameli 1c588fa014 Move enum into EffectManager...
... tying Effect into a cycle of 3 with EffectManager and EffectRack, which is
only revealing the true dependencies
2019-06-25 00:12:45 -04:00
Paul Licameli 02e620d35f Move functions into new file SelectUtilities.cpp ...
... so that other files do not have link dependency on SelectMenus.cpp

The new file enlarges the big s.c.c. to 24
2019-06-24 23:06:44 -04:00
Paul Licameli 86320838de WaveTrack.cpp does not depend on ODManager.cpp ...
... Breaking up an s.c.c. of 6 into 3 components:
ODManager, ODTask, ODWaveTrackTaskQueue
UndoManager
WaveClip, WaveTrack

Rewrite the OD tasks and queues to hold weak pointers to tracks, so the
track destructor need not notify them.
2019-06-22 21:46:35 -04:00
Paul Licameli 71250b1dc3 WaveTrack.cpp does not depend on ODDecodeBlockFile.cpp...
... cutting off ODDecodeBlockFile and ODDecodeTask into a small cycle of 2
2019-06-22 21:46:34 -04:00
Paul Licameli 499e3c01ce Keep EXPERIMENTAL_OD_FFMPEG and EXPERIMENTAL_OD_FLAC compilable 2019-06-22 21:45:56 -04:00
Paul Licameli 8b70203e45 Lower functions from ProjectManager to ProjectFileManager...
... not improving the dependency graph, but it's a more sensible division of
duties, keeping related functions together.
2019-06-09 12:10:51 -04:00
Paul Licameli 27eeb1035c New files for ProjectFileManager 2019-06-09 12:10:51 -04:00