1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 14:52:34 +02:00

6641 Commits

Author SHA1 Message Date
Paul Licameli
7b7ad75a49 Remove Sequence::CopyWrite and needless file reads in Sequence::Set 2017-03-20 17:49:03 -04:00
James Crook
c6b4e2fffe Add code to capture menus
So far, this only walks the menus, printing out their contents to debug.
2017-03-20 17:06:29 +00:00
David Bailes
879579475d Fix for bug 1611: after select none, temporary in-correctness
After select none, the timeline and selection times are temporarily not updated.

Fix: AudacityProject::SelectNone refreshes the TrackPanel, so call it after changing the SelectedRegion.
2017-03-20 15:06:59 +00:00
David Bailes
ec7fe2dfcc Fix for bug 613: menu key deselects track.
When the menu key is pressed, mouse events are also generated, and one of these was interpreted as a mouse click outside the tracks, which deselected the tracks.

A possible fix would have been to make a change in TrackPanel::HandleTrackSpecificMouseEvent() so that only left clicks outside of tracks would deselect tracks.
However, I decided that a better fix was to modify TrackPanel::OnMouseEvent to ignore the mouse events generated when the menu key is pressed. This should prevent these mouse events from causing bugs in any new code.
2017-03-20 13:33:24 +00:00
James Crook
5b9ae95930 Bug 1610 - Unable to save projects
We were throwing an exception for attempting to delete a file that was not there.
2017-03-20 11:53:39 +00:00
James Crook
8f71aa67df Allow same command more than once in the menus.
Pause appears in both Record and Play, and we want the P shortcut to work.
2017-03-19 19:32:35 +00:00
James Crook
148fc40b78 Restore menu items removed for DarkAudacity.
I'm not sure how useful they are, but Audacity may want them still.
Changed 'Store' to 'Save' to avoid confusion with 'Restore'.
2017-03-19 18:52:39 +00:00
James Crook
d85ee24bf3 Merge branch 'menus' 2017-03-19 17:14:00 +00:00
James Crook
0aac05bd58 Merge branch 'master' into darkaudacity
I moved type to create labels under labels.
I made the menu items for SaveAs MP3/WAV/Ogg mainstream.
Introduced EXPERIMENTAL_DA2 to deal with some colour issues.
2017-03-19 17:05:07 +00:00
James Crook
5c1f4d24b5 Menu rearrangement merged from DarkAudacity 2017-03-19 16:43:51 +00:00
James Crook
f606375202 Merge branch 'master' into darkaudacity
Fixed conflicts by hand in:
	LICENSE.txt
	README.txt
	src/AboutDialog.cpp
	src/Audacity.h
	src/HelpText.cpp
	src/toolbars/ToolDock.cpp
	win/audacity.iss
2017-03-19 15:48:16 +00:00
Paul Licameli
d38dde213e Revert "Fix compilation of EXPERIMENTAL_EFFECTS_RACK"
This reverts commit 9842d0742f95dafc9949c775506d2f96c4ac3256.
2017-03-19 10:51:00 -04:00
Paul Licameli
9842d0742f Fix compilation of EXPERIMENTAL_EFFECTS_RACK 2017-03-19 10:49:23 -04:00
James Crook
e78d209a68 GPL v2 and CC BY 3.0
Missing Version numbers.
2017-03-19 13:59:19 +00:00
James Crook
439edae203 Update source files.
Used autoreconf --no-recursive --install to do this.
2017-03-18 20:13:39 +00:00
James Crook
748e718395 Workaround for FLAC__MAX_METADATA_TYPE not defined. 2017-03-18 19:44:12 +00:00
James Crook
7b6b6ef037 Update .pot and .po files to 2.2.0 2017-03-18 18:46:25 +00:00
James Crook
90051c7c3a To 2.2.0 in .pot file. 2017-03-18 18:05:30 +00:00
James Crook
47fb879157 Don't translate the empty string. 2017-03-18 18:04:56 +00:00
James Crook
2bc9497dc2 %d to %s in cs.po 2017-03-18 16:40:01 +00:00
James Crook
fbf89707b5 Update Polish Translation by Pavel Fric 2017-03-18 16:13:11 +00:00
James Crook
e94fa1d65e Fix compilation on MSVC2013 Express.
MSVC2013 Express does not support some initialisation syntax for structs and instead gives error C2905.
This workaround to get us compiling again may need revisiting.
2017-03-18 16:07:15 +00:00
Paul Licameli
864d0b2418 Start of exception safety project; NEW SOURCE FILES 2017-03-18 11:52:50 -04:00
Paul Licameli
ce7b467759 Exception safety in all uses of XML writing functions 2017-03-18 11:49:43 -04: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
e3355c3c7e Stops of possible file i/o exceptions in most places needing it...
... excepting uses of XMLFileWriter, still to be done.
2017-03-18 11:20:37 -04:00
Paul Licameli
e9a0876818 TrackPanel aborts any dragging action when an exception escapes 2017-03-17 17:53:03 -04:00
Paul Licameli
006aeda0a9 Use SafelyProcessEvent 2017-03-17 17:53:03 -04:00
Paul Licameli
8e5975b10d Report read exceptions met in SBSMS and Nyquist callbacks to user...
... without letting them propagate through the libraries.
2017-03-17 17:53:03 -04:00
Paul Licameli
a8a2598ba3 Intercept exceptions in command script, report failure. 2017-03-17 17:53:02 -04:00
Paul Licameli
d11027c2a7 Allow exceptions from BlockFile::Recover, handle them in ProjectFSCK 2017-03-17 17:53:02 -04:00
Paul Licameli
f508493561 more guarded calls 2017-03-17 17:53:02 -04:00
Paul Licameli
01c5f25a19 Rewrite one try-catch with GuardedCall so we can show the user errors 2017-03-17 17:53:01 -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
576d3e3013 Don't let the catch-all block in Effect intercept the new exception 2017-03-17 17:53:01 -04:00
Paul Licameli
87e75176c5 Guarded calls in batch processing 2017-03-17 17:53:00 -04:00
Paul Licameli
eeb301e50d Gracefully handle disk exhaustion exceptions during recording 2017-03-17 17:53:00 -04:00
Paul Licameli
f4e2fb5eac AudioIO::StopStream stops exceptions in many non-editing actions 2017-03-17 17:53:00 -04:00
Paul Licameli
a1bc6948f4 Define application-level exception handler of last resort. 2017-03-17 17:53:00 -04:00
Paul Licameli
40e73cdcdd Define classes and functions for exception handling framework 2017-03-17 17:52:59 -04:00
Paul Licameli
9fde75268f Define an AudacityException subclass for unready on-demand data 2017-03-17 17:52:58 -04:00
Paul Licameli
acf3c018bb Define an AudacityException subclass for user cancellation of progress 2017-03-17 17:52:58 -04:00
Paul Licameli
195509a033 Define an AudacityException subclass for file errors 2017-03-17 17:52:58 -04:00
Paul Licameli
f1cce8aa78 Define an AudacityException subclass for assertion violations 2017-03-17 17:52:57 -04:00
Paul Licameli
df077d171a Exception framework: define AudacityException and GuardedCall...
AudacityException is an abstract base class for exceptions generated by
Audacity.

GuardedCall wraps any function (usually a lambda) in an appropriate catch
block.

It can also accept a second function that defines a catch block action, which
can rethrow or return a value for the GuardedCall.

It can also accept a third function, that defines another, delayed action that
executes in the main thread at idle time if the second function intercepts an
AudacityException and completes without rethrow.

Defaults for the second function simply return void or false.  Default for the
third function invokes a virtual method of AudacityException, which for
subclass MessageBoxException, displays a message box.
2017-03-17 17:52:57 -04:00
Paul Licameli
26f917b1fd On-demand tasks check for i/o errors, and if so, make no false progress 2017-03-17 17:52:56 -04:00
Paul Licameli
1c91c2b804 ODDecodeTask makes progress unless there is an exception 2017-03-17 17:52:56 -04:00
Paul Licameli
1a3212611b ODComputeSummaryTask is safe for exceptions; makes no progress then 2017-03-17 17:52:55 -04:00
Paul Licameli
5de19dc952 ODDecode task checks blockfile error, making no progress if so...
... also replace explicit mutex locking with RAII and atomics.

This is a part of the big project that handles failure to write block files, as
from disk exhaustion.  ODDecodeBlockFile::WriteODDecodeBlockFile is the one
place calling WriteSimpleBlockFile but not (as in SimpleBlockFile constructor)
throwing an exception.

It is called only when attempting to recover files at open time, or in worker
threads in an EXPERIMENTAL code branch.
2017-03-17 17:52:55 -04:00