Commit Graph

18 Commits

Author SHA1 Message Date
Paul Licameli f7d9602a42 TranslatableString.h does not include Identifier.h 2021-05-27 09:51:32 -04: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 a1650771b1 New argument for ProjectManager::OpenProject, not yet implemented...
... It is false in exactly the cases where there is now also a check first for
the safety of opening a project file.

Those are the cases where a new project was made for imports, but this was not
necessary for safety.  Yet old behavior will be preserved in such cases.
2021-05-24 20:04:58 -04:00
Paul Licameli 97cf411dd5 Function for repeated check whether it is safe to overwrite project 2021-05-24 20:04:58 -04:00
Paul Licameli 406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00
Paul Licameli aa0b33dc8f Detect failure to reconnect to temp project when first saving it 2020-12-06 23:20:44 -05:00
James Crook c60ec1a6e1 Bug 2235 - Timer Record does not shut down Computer if Automatic Save Project is not selected 2020-03-06 20:16:43 +00:00
Paul Licameli 61161a2f00 TranslatableString for more status bar messages 2019-12-28 23:49:18 -05:00
Paul Licameli 1887928fe2 ProjectManager::GetHoursMinsString returns TranslatableString 2019-12-28 23:49:18 -05:00
Paul Licameli 1ce9d59590 Fix another possible case of crashing on exit 2019-07-02 21:01:33 -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 8b70203e45 Lower functions from ProjectManager to ProjectFileManager...
... not improving the dependency graph, but it's a more sensible division of
duties, keeping related functions together.
2019-06-09 12:10:51 -04:00
Paul Licameli 997bf9781d New files for ProjectSelectionManager 2019-06-09 12:10:49 -04:00
Paul Licameli 186f2f6ac7 Split class ProjectSelectionManager from ProjectManager...
... handling the callbacks from the selection toolbars.

Next ProjectFileManager will be split out of ProjectManager, and
ProjectSelectionManager will be used by it during file opening, so separating
files for it avoids a cycle.
2019-06-09 12:10:48 -04:00
Paul Licameli f03684db4f New class ProjectHistory split from ProjectManager for undo, etc...
... And yet fewer inclusions of Projectmanager.h, though it's still not yet
free of cycles
2019-06-09 12:10:48 -04:00
Paul Licameli d979a8959b New files for ProjectAudioManager...
... This eliminates some inclusions of ProjectManager, helping to free it from
cycles into a higher level
2019-06-09 12:10:47 -04:00
Paul Licameli 0c2c2803a3 New class ProjectAudioManager implements AudioIO callbacks 2019-06-09 12:10:46 -04:00
Paul Licameli fee5582826 New files for ProjectManager 2019-06-03 01:21:12 -04:00