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

68 Commits

Author SHA1 Message Date
Paul Licameli
1bff1efc0e Remove unused member 2019-07-29 15:41:11 -04:00
Paul Licameli
2a06b10884 Make objects attached to AudacityProject non-copyable...
... except for Tags; also some uses of final and explicit

This caught a mistake in Scrubbing.cpp
2019-07-02 19:51:24 -04:00
Paul Licameli
805af452a4 static DirManager::Get()...
... not member functions of AudacityProject

This puts DirManager.cpp and four others back into the big strongly connected
component of link dependencies.  They will break out again when Project.cpp
becomes a low-level file.
2019-05-23 13:10:19 -04:00
Paul Licameli
0832bccc7b DirManager.cpp has fewer dependencies...
... To append files during recording or import, it doesn't depend on the
subclasses of BlockFile, instead taking a factory function to which it gives
the filename; and the choice of factory function is also lifted up through the
level of class Sequence which is just above DirManager.

This frees four files from dependency cycles, including DirManager.cpp but not
yet Sequence.cpp
2019-05-18 20:32:19 -04:00
Paul Licameli
ca0fb190e6 Register factory functions with DirManager to interpret XML tags...
... Removes direct dependency on ODManager.h and some BlockFile subclasses,
but does not yet break any dependency cycles
2019-05-18 20:32:19 -04:00
Paul Licameli
d46bb29e3a DirManager.cpp does not depend on Sequence.cpp...
... This does not yet break any dependency cycles
2019-05-18 20:32:19 -04:00
Paul Licameli
9b32fc7a2b DirManager.cpp doesn't depend on Clipboard...
... Locate other outstanding DirManagers by other means, a global tracking
array.

This does not yet break any dependency cycles.
2019-05-18 20:32:19 -04:00
Paul Licameli
2faa24c96b Move ProjectFSCK out of DirManager...
... which makes DirManager.cpp not depend on MissingAliasFileDialog.cpp
2019-05-18 15:06:50 -04:00
Paul Licameli
0ab29d21e9 Some naming consistency...
Prefer "MissingAliasFiles" not other permutations of the words
2019-05-17 06:47:53 -04:00
Paul Licameli
548192fcf3 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:58:34 -04:00
Paul Licameli
56f51d8176 Revert "Remove redundant #include-s from .h files..."
This reverts commit b7fe62d17067b4441530dd36b25052cea3ad44b5.
2019-05-16 14:33:55 -04:00
Paul Licameli
b7fe62d170 Remove redundant #include-s from .h files...
Redundant, because transitively implied.  But don't do this for inclusions of
Audacity.h or Experimental.h.
2019-05-16 14:15:05 -04:00
Paul Licameli
870c08ac06 Remove wx/{log.h, image.h, listctrl.h, utils.h} from headers 2019-03-30 11:21:51 -04:00
Paul Licameli
0b9d279a52 wx/list.h no longer used anywhere 2019-03-30 11:15:27 -04:00
Paul Licameli
3a7324984c wx/hashmap.h no longer used anywhere 2019-03-30 10:06:52 -04:00
Paul Licameli
803d8b9559 Remove wx/filename.h, wx/choice.h, wxFileNameWrapper.h from headers 2019-03-28 03:12:42 -04:00
Paul Licameli
1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -04:00
Paul Licameli
a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli
9d18263be6 Bug2059: Save empty,record,save-as shouldn't delete old _data folder 2019-02-09 17:04:45 -05:00
Paul Licameli
529e1e2afb Bug1979 partial: Faster first-time save, if possible, on Mac and Linux 2018-10-13 13:56:05 -04:00
Paul Licameli
ec506ab52b Define DirManager::ProjectSetter so that commit steps can be deferred 2018-10-13 12:55:29 -04:00
Paul Licameli
0db0c6e0d5 Reorganize some commit logic in DirManager::SetProject 2018-10-13 12:55:29 -04:00
Paul Licameli
7a0475e39f Remove most uses of AUDACITY_OLD_STD 2018-05-10 00:56:36 -04:00
Paul Licameli
356763c90b remove unused 2018-01-16 17:51:03 -05:00
Paul Licameli
cb403954fa Use std::[tr1::]unordered_(set|map), not the wxWidgets container macros 2018-01-08 18:22:51 -05:00
Paul Licameli
c1d1bee6b1 Better error handling when moving a project to another directory...
... Do NOT remove original files, or change the stored path names, until after
successful creation of ALL new copies; then, it is a no-throw commit operation.

In case of failure of some copies, cleanup code already existed to fix
partial results.
2017-10-21 12:59:36 -04:00
Paul Licameli
55439247ad All the catches are in place for BlockFile and other errors, now throw. 2017-04-03 23:32:40 -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
81285ee0c1 More const and override 2017-03-17 17:52:20 -04:00
James Crook
95861bf7f2 Bug 1567 - Amelioration. Delete EMPTY temp dirs on close in multiproject
This fix adds flags to RecursivelyRemove to be more specific about what to remove.  With the kCleanDirsOnlyIfEmpty option it is now safe to call CleanDir on closing a second unsaved project.  In particular, if some of the wave has been copied to the clipboard, that part of the wave does not get deleted on close, and is available to paste into the other project which is still open.  In CleanDir the folders containing those block files are not deleted.  They will get deleted later when the second project is closed too.

CleanDir is now called with that option when closing a project that is not the last one being closed.  .DS_Store files, if present, will be deleted, and any empty directories for that project.  I have also tested that clipboard contents are preserved.
2017-03-01 15:57:01 +00:00
James Crook
89c44f9cd6 Add fileSpec to CleanDir, so can be selective about files to delete.
Note that CleanDir may be used on a temp directory, deleting entire projects, and in that case
we delete all files too, but do not want to delete files that are at the top level, only ones inside
projects.
2017-02-20 12:58:11 +00:00
Paul Licameli
5392feefd4 Bug1521 residual: Save new project, still must remove project* folder 2017-01-31 12:41:54 -05:00
Paul Licameli
6b65375ee5 Bug1521, bug1567 Mac: wipe .DS_Store in temp folder when saving too 2017-01-28 17:23:15 -05:00
Paul Licameli
ad04187a41 Change sampleCount arguments, variables, return values to size_t...
... whenever they really describe the size of a buffer that fits in memory, or
of a block file (which is never now more than a megabyte and so could be fit in
memory all at once), or a part thereof.
2016-09-15 21:03:17 -04:00
Paul Licameli
52cb094f0f A safenew and comment changes 2016-08-16 13:00:07 -04:00
Paul Licameli
8b72bd2f92 Manage block files with std::shared_ptr, BlockHash stores weak_ptr 2016-08-16 12:29:59 -04:00
Paul Licameli
84ccdca5c3 Gather balance info hashes into one struct guarded by an accessor...
Doing BalanceInfoDel in this delayed fashion will be needed when the other
call to it is eliminated, as shared_ptr simplifies the management of BlockFile
and makes the many calls to Ref and Deref disappear.
2016-08-16 12:29:59 -04:00
Paul Licameli
2ede67be96 Use type alias for pointer to BlockFile, which is still a dumb pointer 2016-08-16 12:29:59 -04:00
Paul Licameli
41efaeeef0 Fix Windows build 2016-08-14 09:35:04 -04:00
Paul Licameli
46f38708ed Dir manager uses std::shared_ptr 2016-08-13 12:23:05 -04:00
Paul Licameli
b6fdffbab2 Don't copy wxFileName often, it's not lightweight! Use wxFileNameWrapper...
... which is a new class that defines moves.
2016-04-16 11:57:39 -04:00
Paul Licameli
f94b3b3afa Add some const qualifiers to BlockFile methods 2016-04-10 21:05:20 -04:00
Paul Licameli
527a826b86 Define and use PROFILE_DLL_API 2016-02-24 21:29:25 -05:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
9bf098c7d9 Sweep unnecessary wxString copies: rest 2016-02-23 02:15:56 -05:00
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Paul Licameli
56e7653343 "delete"->"DELETE" in comments, easier to find remaining naked operator delete 2016-02-14 18:50:45 -05:00
Paul Licameli
ca56876aaf Various minor fixes in Sequence 2016-02-04 01:06:51 -05:00
Paul Licameli
38ba19183d One less indirection accessing SeqBlock 2016-02-03 22:17:07 -05:00
Paul Licameli
d39eaa4e65 Remove WaveTrack.h from other headers 2015-07-28 10:02:05 -04:00