1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

10164 Commits

Author SHA1 Message Date
Paul Licameli
0ae542cf08 Remove unused globals 2019-05-29 12:45:55 -04:00
Paul Licameli
d5314a1632 Various preliminaries before splitting class AudacityProject 2019-05-28 23:18:16 -04:00
Paul Licameli
82663892dc Accessors to get the project window...
... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
2019-05-28 23:18:13 -04:00
Paul Licameli
02afcbca8c Redo TP_UpdateStatusMessage...
... Rename it as SetStatus; make it part of AudacityProject not
TrackPanelListener; and use a roundabout event signalling to cause the timer
restart.

Because SetStatus will be one of very few things left in AudacityProject, but
the timer handling will be part of another class decoupled from it.

And TrackPanelListener won't really be needed: TrackPanel will not need to
pretend it doesn't know what an AudacityProject is.
2019-05-28 19:36:47 -04:00
Paul Licameli
ae18f2f220 Construction of default play options moved out of AudacityProject 2019-05-28 19:33:21 -04:00
Paul Licameli
0a109d2432 Lift the propagation of format values into toolbars during file loading 2019-05-28 19:29:56 -04:00
Paul Licameli
c2d57d9e9b Rearrange the setting of project snap-to...
... Just one low-level function to simply set the variable, and one
high-level function that also pushes notifications.  The danger of infinite
recursion in the toolbar code, as in the previous commit, doesn't exist here.
2019-05-28 19:26:13 -04:00
Paul Licameli
35892fc869 Rearrange setting time & freq formats for numeric controls...
... Just one low-level function for each that simply sets; just one high-level
function for each that also pushes notifications; and to make that work,
toolbars need some rewriting to avoid recursion when the notifications they
post come back to them.
2019-05-28 19:23:42 -04:00
Paul Licameli
441763cabd Fix 9c75ebe, which caused TrackPanel not to get the message 2019-05-28 18:53:54 -04:00
Paul Licameli
ad0580c3de fix assertions on Linux because of 1ed9338 2019-05-27 19:45:57 -04:00
Paul Licameli
ea0ee7fc0b Fix inability to close the History window 2019-05-27 09:11:52 -04:00
Paul Licameli
37e176dc82 Don't set color index of temp tracks only pasted into other tracks 2019-05-26 11:29:12 -04:00
Paul Licameli
ac65d817ac Remove an #include 2019-05-25 05:59:50 -04:00
Paul Licameli
c1c24ea1dd Accessors for windows and toolbars out of class AudacityProject...
... use static Get() functions instead in the several classes.

This improves the results of scripts/graph.pl, freeing nine files from cycles
to higher levels.  However there is really still a dependency on them from
the big strongly connected component, via menu code, which the script does
not detect.
2019-05-24 16:11:07 -04:00
Paul Licameli
3416b5bad6 Toolbars accessed by static Get() functions, not through AudacityProject 2019-05-24 16:08:29 -04:00
Paul Licameli
7bb71257ed static AdornedRulerPanel::Get()...
... not member functions of AudacityProject
2019-05-24 15:48:16 -04:00
Paul Licameli
d1ad8f55e0 static TrackPanel::Get()...
... not member functions of AudacityProject
2019-05-24 15:46:30 -04:00
Paul Licameli
00117897bc Decouple class AudacityProject from some attached frames...
... use registered factories instead, so class AudacityProject needn't know
the other classes.

This frees 9 .cpp files, related to various non-modal dialogs, to higher
levels out of the big strongly connected component, as determined by
scripts/graph.pl!

But in reality there is still link dependency on them that the script does not
detect.  The remaining dependency is via the declarations of ViewMenu,
EffectMenu, etc. in Menus.cpp.

That could be broken with a registration system for menus.
2019-05-24 15:46:28 -04:00
Paul Licameli
f83a866276 Project::GetStatusBar is unnecessary (base class has it already) 2019-05-24 15:42:11 -04:00
Paul Licameli
8eb39cd606 Fix #include directives 2019-05-24 12:23:57 -04:00
Paul Licameli
2947a43181 Remove many accessor functions from AudacityProject...
... instead, each of the related objects has a static Get function taking
a reference to a project.

The attached object system introduced at commit af039f1 now manages the
objects' lifetimes.  The call to BuildAll in the constructor of
AudacityProject guarantees that all are created, without Project.cpp needing
to know the definitions of all of the classes.

This requires the implementations of those objects to include Project.h, but
makes Project.h unnecessary for client code that retrieves those objects, and
removes need for Project.cpp to include the header files for the objects.

Three files get freed from the big strongly connected component found by
scripts/graph.pl at high levels, but five low-level files are put back into it
because DirManager.cpp needs Project.h.

The intention is that AudacityProject will become little more than a container
for these objects and a source of events that other objects post on it.  That
will make Project.cpp a low-level file after everything else moves out, and
that will free DirManager.cpp and others again from cycles.
2019-05-23 16:35:06 -04:00
Paul Licameli
52abbcdc4b static ::Get functions for overlays on TrackPanel...
... not member functions of AudacityProject.

AdornedRulerPanel is not (yet) made similarly independent of its overlay
code.

Two .cpp files implementing overlays escape dependency cycles to higher levels.
2019-05-23 16:35:06 -04:00
Paul Licameli
004997cec1 static BackgroundCell::Get()...
... not member functions of AudacityProject.

This frees BackgroundCell.cpp from dependency cycles
2019-05-23 16:35:05 -04:00
Paul Licameli
0923bc19a9 static MenuManager::Get()...
... not member functions of AudacityProject
2019-05-23 16:34:47 -04:00
Paul Licameli
2f0a76ed10 static Scrubber::Get()...
... not member functions of AudacityProject
2019-05-23 16:01:10 -04:00
Paul Licameli
15dd230ee1 static ToolManager::Get()...
... not member functions of AudacityProject
2019-05-23 15:24:28 -04:00
Paul Licameli
68e25f3b7d static SelectionState::Get()...
... not member functions of AudacityProject
2019-05-23 14:11:05 -04:00
Paul Licameli
c1c0030013 static Tags::Get...
... not member functions of AudacityProject
2019-05-23 14:08:09 -04:00
Paul Licameli
116ff70756 static TrackFactory::Get()...
... not member functions of AudacityProject
2019-05-23 13:55:14 -04:00
Paul Licameli
4ba4d0978b static CommandManager::Get()...
... not member functions of AudacityProject
2019-05-23 13:17:29 -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
72b7c776a8 static UndoManager::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
b5a57682b6 static ViewInfo::Get() and ZoomInfo::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
1ed9338e6f Use wxWeakRef to avoid a dangling pointer...
... as was done before for input meter at 12983e1
2019-05-23 12:54:12 -04:00
Paul Licameli
469247e7ef Remove a comment 2019-05-22 10:36:18 -04:00
Paul Licameli
d5b2507af9 Remove unneeded inclusions of Project.h, no cycles broken 2019-05-22 10:02:24 -04:00
Paul Licameli
af3e7a09d5 Compilability of old Noise Removal 2019-05-22 10:00:30 -04:00
Paul Licameli
8de7528e27 CommandManager.cpp does not depend on AudacityHeaders.h 2019-05-22 09:59:56 -04:00
David Bailes
14601660d9 Bug 2113: When the label editor closes, no control is the focus.
This was caused by commit: 7c0d05f
Problems:
1. LabelDialog::Show() is called both when dialog opens and closes, so SetFocus() was being called when the dialog closed.
2. The call for SetFocus() was only needed for mac and linux, and it would have been better to #ifdef it to prevent unforeseen bugs on other platforms.

This commits fixes the two issues.
2019-05-22 11:43:20 +01:00
Paul Licameli
e09c17d0c5 Some compilability fixes for Equalization48x.cpp 2019-05-21 19:03:42 -04:00
Paul Licameli
a1f08ad4e0 Fix Windows build 2019-05-21 18:15:03 -04:00
Steve Daulton
1639df03a4 Fix pipeclient.py for Windows 2019-05-21 17:54:24 +01:00
Paul Licameli
af039f19ff Generalize means for decoupled code to add data to core structures...
... Generalizing what was first done at 280e8d9 for certain menu command
handlers.

Allow core data structures to host data attached by other code, on which it
need have no compilation or link dependencies.
2019-05-21 10:08:56 -04:00
Paul Licameli
caec2064e5 Preliminaries before further cycle-breaking 2019-05-20 21:38:14 -04:00
Paul Licameli
755a7b86a6 Some dependencies of PrefsDialog and AudacityProject weakened...
... though not eliminated.

PrefsDialog and AudacityProject do less special-purpose "pushing" of updates.
2019-05-20 21:38:14 -04:00
Paul Licameli
5d839c3e97 Lower the image updating for theme into GUIPrefs::Commit()...
... weakening dependency of PrefsDialog.cpp on particular preference page
implementations
2019-05-20 21:38:13 -04:00
Paul Licameli
62899a32f4 All things with an UpdatePrefs() message listen for an event...
... Still to do, improve the handling of updates of only subsets of the prefs
2019-05-20 21:38:13 -04:00
Paul Licameli
cc635e0498 Emit an event when the preferences dialog closes 2019-05-20 21:38:13 -04:00
Paul Licameli
a78ad42399 Various preliminaries for splitting up the class AudacityProject...
... Tags.cpp is temporarily put back into the big strongly connected component
of link dependencies
2019-05-20 21:38:12 -04:00