1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-15 08:07:41 +02:00

488 Commits

Author SHA1 Message Date
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
James Crook
9cb7e23e05 Bug 322 - "Save Changes?" dialog does not indicate which project is being closed
When there is ambiguity about which project is being saved, the project title bars now change to be more informative.
2016-09-05 19:20:08 +01:00
James Crook
f6870896a1 Fix Mac build breaker.
Caused by declaring a variable later than a conditionally compiled piece of code.
Net result is that Mac will be less tolerant of a window partly off the top of the screen than Windows will be, and will reset it to the default.
2016-09-02 18:25:59 +01:00
James Crook
8d55ab9afd Bug 1314 - Audacity always launches in middle of first monitor after quit on any part of second monitor.
Splash screen still always appears on first screen (intentional).
Also I fixed issue where new project windows would appear on first screen, even if Audacity on second.
2016-09-01 23:27:44 +01:00
James Crook
576020f203 Bug 1505 - Window size not restored on launch (using virtual desktop)
Fixed by being more tolerant of window being (slightly) off screen.  Windows 10 appears to mis-report the window size by 6 pixels.  This fix allows the user to restore a window that is (slightly) off screen.  That's OK and helps those users who position and size the window very precisely.
2016-08-30 22:13:33 +01:00
Paul Licameli
5761972dfa BHug1488: Don't crash exiting from command-line benchmark test...
Problem was that cfd7648fce2388ec8ae35b38004f2ae111c484af fixed a memory leak
but created a dangling pointer bug, which does not happen during usual run
of Audacity because AudacityProject::OnCloseWindow is reached then before
destroying AudacityProject.

Fixed it by using a std::shared_pointer for the TrackList that both
AudacityProject and TrackPanel must use.
2016-08-20 13:58:56 -04:00
James Crook
05fe684114 Ungrey more actions, if paused.
This introduces a new variable, mStopIfWasPaused (default true).  Actions which require AudioIONotBusyFlag will now stop the audio, if audio was busy but paused and attempt to continue.

We could perhaps make mStopAudioIfWasPaused into a preference, but I don't think we need to keep even the option of the old behaviour.
2016-08-20 18:52:30 +01:00
James Crook
df1f69850e Fix memory leak in WriteXML
Memory leak was caused by diagnostics.
2016-08-18 21:47:27 +01:00