1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 00:20:06 +02:00

495 Commits

Author SHA1 Message Date
Paul Licameli
94d8c2cff7 fix the previous 2017-04-24 13:13:14 -04:00
Paul Licameli
967e1fcf02 More exception safety for selection states of tracks 2017-04-24 13:08:31 -04:00
James Crook
fefc856901 Update slider in tracks on theme change. 2017-04-05 20:16:12 +01:00
James Crook
028ed19d90 Sync with DarkAudacity 2017-04-02 23:07:13 +01:00
Paul Licameli
e1473dfe76 void return, not boolean success, from some Track virtual functions...
... The return codes were mostly ignored anyway, and exceptions will be thrown
instead.

It seems there was also confusion whether the return values of Track::Paste
and Track::SyncLockAdjust were to indicate success or indicate whether there
was any change.  No matter now.
2017-03-31 18:26:52 -04:00
Paul Licameli
6c4cf46c06 Move mute and solo state into PlayableTrack 2017-03-29 13:45:08 -04:00
Paul Licameli
b2ab9b5087 Simplify MixerBoard.cpp using the PlayableTrack type 2017-03-29 13:42:51 -04:00
windinthew
e2a7282690 Fix wording issues reported on Wiki
No ellipses in title bar of file open/import dialogs
Auto Recovery Discard dialogs say only recoverable projects are discarded
Capitalised button in Dependency dialogue per MS guidelines.
2017-03-27 05:36:10 +01:00
Paul Licameli
1552ff188f When opening a file into a new project, delete the project on failure 2017-03-21 14:11:28 -04:00
Paul Licameli
7159966eb4 Comment that cache-filling should be no-fail (we don't use it anyway) 2017-03-21 14:11:26 -04:00
Paul Licameli
54c1b0c955 Exception safety in: opening and saving of projects 2017-03-21 14:11:25 -04:00
Paul Licameli
4d4cd91d91 Hoist, and delay, the saving of import tag while opening the file...
... so that AudacityProject::AudacityProject no longer has a path in the
static call graph that reaches block file write operations that might throw.

So it is easier to prove that other functions, calling that, don't throw.

Also delay the possibly thowing save of the import until after certain other
steps in the file opening procedure.
2017-03-21 14:11:25 -04:00
Paul Licameli
0bb6a3d971 Exception safety in: importing functions...
... Side effects on preferences may persist even after errors.
2017-03-21 14:11:23 -04:00
Paul Licameli
48459404a5 Exception safety in: general exporting routines 2017-03-21 14:11:22 -04:00
Paul Licameli
68c726918b If exception in cut/copy, leave clipboard clear (no partial results) 2017-03-21 14:11:19 -04:00
Paul Licameli
82dd7545c9 Reviewed uses of release(); prefer Destroy_ptr to hold window objects 2017-03-21 14:11:18 -04:00
James Crook
5c1f4d24b5 Menu rearrangement merged from DarkAudacity 2017-03-19 16:43:51 +00:00
Paul Licameli
3bb04245c5 Strong exception safety in all uses of XMLFileWriter...
... Strong, meaning that the file at the specified path is created or modified
only if all write operations complete without exceptions, barring one very
unlikely possibility that a final file rename fails, but even in that case the
output is successfully written to some path.

This commit does not add throws, but changes the type thrown to a subclass of
AudacityException, so that GuardedCall will cause the user to see an error
dialog in all cases.

Duplicated logic for making temporary files and backups is now all in one
place, the class XMLWriter.

There may be more new GuardedCalls than necessary -- the catch-all for the
event loop, AudacityApp::OnExceptionInMainLoop, might be trusted instead in
some cases --  but they are sufficient.
2017-03-18 11:45:33 -04:00
Paul Licameli
b81cdee7e3 Comment where xml writing functions may throw 2017-03-18 11:45:05 -04:00
Paul Licameli
f508493561 more guarded calls 2017-03-17 17:53:02 -04:00
Paul Licameli
6525bb18cf Translate exceptions to error codes in callback functions...
... That is what the library protocols allow, and libraries may be written
in C and might corrupt their state if C++ exceptions pass through them.
2017-03-17 17:53:01 -04:00
Paul Licameli
1a3212611b ODComputeSummaryTask is safe for exceptions; makes no progress then 2017-03-17 17:52:55 -04:00
Paul Licameli
692a033968 Remove naked new[] in: various 2017-03-17 17:52:47 -04:00
Paul Licameli
38236a807c More new -> NEW, delete -> DELETE in comments 2017-03-17 17:52:41 -04:00
Paul Licameli
25619fb46e Don't create placeholder clips in Duplicate command ...
... when there is no clip at the right edge of the selection.
2017-03-17 17:52:39 -04:00
Paul Licameli
5fdd9fe05a Remove TrackList::GetLink 2017-03-17 17:52:29 -04:00
Paul Licameli
9eaa40659e Utility for track editing leaves fewer direct calls to GetLinked() 2017-03-17 17:52:28 -04:00
Paul Licameli
c55d83898a Clarify operator precedence 2017-03-17 17:52:22 -04:00
Paul Licameli
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
Paul Licameli
79c07bd5c1 Bug451 re-fix: When file open fails, don't erase blockfiles
The original fix of years ago must have caused leaked memory, and was
undone by my other changes to track memory management.  This fix preserves
the intent, and avoids leaked memory.
2017-02-23 12:47:50 -05:00
James Crook
ec12bc37b5 Bug 1580 - Enh: New default directory for Save and Export .../Documents/Audacity
Fix affects windows only.
In the case of Save and SaveAs creates the directory too, so that the dialog can be positioned there.
For Export Multiple, will prompt if the directory does not exist.
2017-02-06 15:38:20 +00:00
James Crook
0cb89a895a Remember Save/SaveAs Path.
Previously we relied on Windows doing this.  With the fix to now use Documents directory, if none was set, Windows no longer remembers the directory.  So now we remember it instead.
2017-01-30 17:44:43 +00:00
Paul Licameli
3ebf9fca20 Remove a sleep that does not help bug1567 2017-01-28 16:21:32 -05:00
Paul Licameli
a05d039055 Bug1567: intermittent failure to load libraries, plugins on Sierra...
... At startup, spawn a copy process in main() and crash it at once.  The
child process continues.  (The fix was ineffective when the parent continued
and the child crashed.)

Re-activiation of the application is also needed or else the windows are
hidden behind other applications.

Another sleep when closing a project, to fix occurrences of the bug caused by
closing of a project window without saving changes.
2017-01-25 22:15:02 +00:00
James Crook
e9b9fcbcb2 Bug 1304 - Starting Save or Export directory is not set, so is unwritable or requires authentication for most users
I have done as suggested in the bug comments, and used:
Windows: Users\username\Documents
Unix/Mac: ~/Documents .

We could though use GetLocalizedResourcesDir() and could use Music rather than Documents.
2017-01-03 15:31:12 +00:00
James Crook
32a33bf0e4 Bug1314 - Residual. Allow projects to straddle screens.
Opening Audacity can give a project window that straddles screens (if that is what the user wants and had last time they closed).
New windows created from menu item new will still start out initially all on one screen.
2016-12-27 22:58:59 +00:00
Paul Licameli
0921942650 Fix black screen after closing fullscreen window -- REBUILD WXWIDGETS
Works by un-full-screening before closing.  Patching wxWidgets was needed to
make that work correctly after full-screening by clicking on the green circle
in the title bar, but that fix is not needed for full screen after command+/
2016-12-10 15:08:43 -05:00
Paul Licameli
53a5c930a4 Bug1544: clipboard space usage in History updates after cut/copy...
This should be tested for Cut, Split Cut, Copy, and also for the same
commands in the Labeled Audio sub-menu of Edit.
2016-11-08 22:54:27 -05:00
tip2tail
54ee80b798 Included an i18n hint in format per Gale's advice 2016-10-02 22:59:47 +01:00
Mark Young
a4ae301a5b Bug 1402, rewrite logic for the display of hours and minutes and ensure we use one routine for this. 2016-10-02 22:56:04 +01:00
Steve Daulton
229781cc12 Tweak error message
Several users have stated confusion about the old message,
thinking that it meant 'changes to the imported file', whereas
it actually refers to the 'project'.
Also fix a couple of compiler warnings.
2016-09-21 14:54:59 +01:00
Paul Licameli
f993f1eadf Regularize casts as (int), so they are easier to find and review 2016-09-20 08:42:11 -04:00
Paul Licameli
53936ac970 Fix some warnings for unused variables and labels...
... But not in cases where a return status is ignored.
2016-09-19 11:47:47 -04:00
Paul Licameli
b6dce3e842 don't implicitly convert string literal to non-const char * 2016-09-18 10:36:54 -04:00
Paul Licameli
88611a4530 Fewer C-style pointer casts of tracks; comments justify static_cast 2016-09-15 12:12:43 -04:00
James Crook
65c7e8051a ThomasFeher - Unused parameters clean up. 2016-09-11 20:31:49 +01:00
James Crook
545d741eb2 Make Audacity source more like DarkAudacity source. 2016-09-11 13:03:37 +01:00
James Crook
1c00e18a5d Bug 322 - (Residual) Deal with iconized windows. 2016-09-10 18:36:15 +01:00
James Crook
83e355dc65 Bug 322 - (Residual) Project numbers renumbered after closing a project.
Now the project number is the order of creation.  Once assigned, project numbers do not change.
2016-09-10 16:59:23 +01:00
James Crook
bf06b0485f Bug 1507 - Project may be overwritten by new project without warning 2016-09-08 17:51:00 +01:00