Commit Graph

128 Commits

Author SHA1 Message Date
Paul Licameli 4b02e562b3 Eliminate mention of wxString from ErrorDialog.h ...
... whether std::wstring is the best alternative type, or whether we should
use UTF8 encoded std::string -- I wish to defer that, and revisit it later
2021-07-01 13:37:40 -04:00
Paul Licameli 132f04d272 ManualPageID is a new type; rewrite HelpSystem::ShowHelp and its uses 2021-07-01 13:35:57 -04:00
Paul Licameli 2c4ed8b31f Bug2800: File>Open should allow non-project from a FAT drive...
... but still disallow it for .aup3 files.

The fix is a simple moving of the check for a FAT filesystem after several
other checks that distinguish types of imported files.
2021-06-10 17:13:45 -04:00
Dmitry Vedenko 690772ccb0 Use ShowExceptionDialog when we want to show ErrorReportDialog 2021-06-08 08:08:26 -07:00
Paul Licameli 4209c8150a Bug2764: Open Project... in Scriptables shouldn't corrupt project...
... Now new project windows are opened when .aup3 files are opened; but
behavior chages only in that case.

Wherever opening of other files invoked import code, we still do or do
not make a new project in exactly the same cases as before; such as, when
opening multiple files with File > Open, be sure each imported file still opens
in its own separate window.

This means the decision whether to open a new project must be lowered into
ProjectFileManager, where the type of the file is discovered, and we pass it a
function object so it avoids a dependency cycle with ProjectManager.

It also means the checking for errors and closing of new projects in case of
failure must be replicated at all places where ProjectFileManager::OpenProject
is called directly.

The class ProjectManager::ProjectChooser simplifies this.

Recently introduced calls to SafeToOpenProjectInto(), before
ProjectManager::OpenProject(), are now lowered into that class, delaying the
safety check so it might also be called where ProjectFileManager is used
directly.
2021-05-24 20:04:58 -04:00
Paul Licameli 1bed51ac80 ProjectFileManager::OpenFile returns a pointer to project 2021-05-24 20:04:57 -04:00
Paul Licameli e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
James Crook bef40f0ab9 Bug 2743 - The first use of the "window" command in LOF files is ignored by Audacity 2021-04-19 12:59:36 +01:00
James Crook 5092414757 Error reporting for open new project. 2021-04-06 18:09:28 +01:00
Leland Lucius 392a060389 Bug 2700 - "Failed to open the project database" 2021-04-01 01:13:15 -05:00
Leland Lucius 8fce1db1ae Bug 2669 - Win: Save As can be used to overwrite the existing project without warning 2021-02-18 19:35:11 -06:00
Leland Lucius de6e65ffa3 Remove some unneeded debugging 2021-02-18 11:14:27 -06:00
Paul Licameli 40682f834a Removed some unnecessary #include directives 2021-02-04 10:12:42 -05:00
James Crook 9d800c8969 Bug 2655 - (Updated error msg and help link)
Following feedback from QA.
2021-02-03 18:50:52 +00:00
James Crook ab30778306 Bug 2655 - Import Audio command can import open projects and can import a project into itself 2021-02-03 16:41:28 +00:00
Paul Licameli 92e36332f3 Reimplement importation of .aup3 file more simply...
... Breaking dependency of ProjectFileIO on on TimeTrack, and reusing the same
functions that implement cross-document copy and paste of tracks.

Also changing behavior, so that if a TimeTrack exists but another is imported,
then the import quietly replaces the existing completely.
2021-02-02 15:22:44 -05:00
Leland Lucius c9d37675f7 First stab at responding to whitebox review
In some cases, I've simply left the REVIEW: in and
responded to it. In other cases, I've resolved what
was mentioned in the review.
2021-01-26 02:21:12 -06:00
James Crook 42a105ee0a Review DB/Data safety.
I've added the comment 'REVIEW:' where I have some concern that
the database and our copy of it could get out of step, or simply that
we fail to report a problem to the user.

I'd like these reviewed and turned into comments that make it
easier to check for correctness, for example saying where an
error is reported, or why it is OK to do no further recovery action.
2021-01-23 19:00:36 +00:00
Leland Lucius 0123a3e3fb Bug 666 - Mac: Cannot "Open" audio files named with "\" using File>Open 2021-01-22 01:05:22 -06:00
Paul Licameli 43574553fc Break dependency cycle introduced at 50f3321...
... This only cuts and pastes some functions from FileNames to another new file
and namespace, and changes namespace qualifiers where they are called.

The cycle resulted because of the need to include widgets/ErrorDialog.h
2021-01-16 13:28:37 -05:00
Leland Lucius ac55e228ce Remove experimental attempt at FAT detection
We'll just have to address each instance individually.
2021-01-11 12:24:14 -06:00
Leland Lucius 60ebe7919a Bug 2610 - Backup Project only fails when it has actually run out of disk space (unlike Save Project)
This may not be a complete fix...needs more testing.
2021-01-11 01:04:16 -06:00
Leland Lucius 69a98669bf Remove anchor from help URLs 2021-01-06 22:11:49 -06:00
Leland Lucius 6a5d4fdbc0 Update FAT filesystem messages 2021-01-05 13:28:04 -06:00
Leland Lucius 50f3321154 Bug 2576 - FAT formatted disks can readily run out of space with multiple edits - wrong error message can be displayed 2021-01-05 01:32:03 -06:00
Leland Lucius 56c8bdcd24 Bug 2609 - Save Project when disk is full gives a second disk-full message 2021-01-03 19:22:22 -06:00
Leland Lucius 84c60beab6 Bug 2603 - Backing up a >4GB project to a FAT drive fails with an incorrect misleading error message 2021-01-03 16:33:05 -06:00
Leland Lucius 375a6a8803 Bug 2604 - Saving a 4 hour stereo chirp to FAT fails and with an inappropriate error message 2021-01-03 16:02:43 -06:00
Paul Licameli 4cb9bb19fd Bug2603: Should give proper message for failed backup onto FAT drive...
... The error message eliminated here describes what should be ruled out by
the loop before this line, which already checks that no previous file of the
chosen name exists.

So just give the generic write failure message.
2020-12-09 18:00:41 -05:00
Paul Licameli bc7066a20e More uniformity of file write error messages 2020-12-09 17:41:22 -05:00
Paul Licameli d8cd8041f1 Fix grammatical error in user visible message 2020-12-09 15:34:15 -05:00
Paul Licameli aa0b33dc8f Detect failure to reconnect to temp project when first saving it 2020-12-06 23:20:44 -05:00
Paul Licameli a9d555bf16 A status return check on ProjectFileIO::SaveProject 2020-12-06 20:50:31 -05:00
Paul Licameli ebb6e5de1c Bug2600: Should rename current undo state after compacting 2020-11-25 13:31:04 -05:00
Paul Licameli 2fe0a07901 Some null checks 2020-11-25 11:07:16 -05:00
Paul Licameli 3e0120be05 Bug2550 residual: also move -shm file if present...
... Also much other extra care in the handling of -shm and -wal files
2020-11-22 14:32:42 -05:00
Paul Licameli 791dbea1af Bug2109 residual: apply fix also in case of import of MIDI...
... Muting the new track, in case any solo track already existed.
2020-11-21 15:56:20 -05:00
Paul Licameli 003d1c23a3 Bug2590: Compact Project should free up more space...
... but not always as much, as before the part of the fix for Bug2579, which is
at 7edbad3cd1

The last saved undo state and the current state must (both) be saved (if
different).
2020-11-21 13:55:46 -05:00
Paul Licameli caa312ab7b Remove some unneeded #includes and forward declarations 2020-11-20 13:47:47 -05:00
Paul Licameli 14c300c672 Bug2542: Discard button of auto recovery should work with UP 2020-11-19 15:18:01 -05:00
Paul Licameli 0f1c19e97e Bug2570 residual: Also handle the case of last saved state in redo 2020-11-18 20:37:11 -05:00
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