1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 22:28:57 +02:00

10423 Commits

Author SHA1 Message Date
Paul Licameli
37f75d8049 Bug2141: Tabbing should work in focused label track, selected or not 2019-06-28 18:12:48 -04:00
Paul Licameli
f77ddc43d9 Smuggle AudacityProject into LabelTrackView::GetSelectedIndex() ...
... and eliminate some more calls to GetActiveProject
2019-06-28 18:09:29 -04:00
Paul Licameli
30715e4fe2 Pass AudacityProject as context into TrackPanelCell key handlers...
... as was done for mouse events.

This eliminates some need for GetActiveProject(), which is good, and prepares
for the fix for bug 2141
2019-06-28 13:18:07 -04:00
Paul Licameli
c50acea328 Bug2127: Record, Pause, Record, Pause, Close button: shouldn't crash 2019-06-28 10:51:41 -04:00
Paul Licameli
6aba4a3fc7 Bug2129: Effect preview button should work...
... mistake was introduced at 8506282
2019-06-28 10:51:41 -04:00
Paul Licameli
97f48c4326 Bug2133: Trim and Silence commands should not affect Note tracks 2019-06-28 10:51:41 -04:00
Paul Licameli
1fa46eb085 Bug2135: startup should not fail quietly when audacity.cfg is locked...
simplest fix is simply to put up a message box explaining it
2019-06-28 10:51:41 -04:00
Paul Licameli
af791d3d0b Redo previous commit's fix...
... the bug was introduced at e581fa60d9328cc4c379f840a0cbd0a85179cad5

I think it is better to make TrackPanel::OnTrackMenu crash-proof when
called with the default argument
2019-06-28 10:50:51 -04:00
David Bailes
af74ff626e Track menu: opening track menu by pressing shift+M causes crash
Fix:
Call TrackPanel::OnTrackMenu(Track *t) with a track pointer.

Query:
Is there any reason why this function's parameter has a default value of NULL?
2019-06-28 10:09:11 +01:00
Paul Licameli
8e2453f0b7 Redo 38f3ee9 using a window...
... This seems the more portabe way to do it across platforms.  We are not
relying on a passed-in TrackPanel, for the sake of keeping TrackInfo
independent of TrackPanel.  We just get the active window from the
application, which should exists in all contexts in which the Settings are
demanded, which are drawing functions.
2019-06-27 20:10:28 -04:00
Steve Daulton
d142e0fdf7 Travis build with Xenial 2019-06-27 18:31:16 +01:00
Paul Licameli
56a05cc646 Avoid Win startup crash...
... Because of different ordering of file-scope static initializations, visiting
TrackInfo.cpp before wxApp is initialized.  (This didn't happen on Mac.)

This requires other changes to PrefsListener so that safe unbinding is
guaranteed by destructors, even if the PrefsListener is destroyed after the
global wxApp object.
2019-06-27 09:26:43 -04:00
Paul Licameli
9b65840e4e Scatter TrackArtist's code and bust the big s.c.c. down to SEVEN!!! ...
... It's not longer the largest then, though the remaining tangle may be the
most difficult.  The seven are:

AdornedRulerPanel, ControlToolBar, ProjectAudioManager, ProjectWindow,
Scrubbing, ScrubbingToolBar, TrackPanel

The 17 that were freed are:

BackgroundCell
CommonTrackControls, TrackButtonHandles, TrackInfo (one component)
CommonTrackView
EnvelopeEditor
LabelDefaultClickHandle, LabelDialog, LabelGlyphHandle, LabelTextHandle,
   LabelTrackControls, LabelTrackView (one component)
SelectHandle
SelectUtilitites
TrackArtist
TrackSelectHandle
TrackUtilities
2019-06-27 00:25:02 -04:00
Paul Licameli
38f3ee95c0 TrackInfo doesn't need TrackPanel to push preference changes to it...
... This frees six more files from cycles, leaving that no-longer biggest s.c.c.
at just seven files now!
2019-06-27 00:10:56 -04:00
Paul Licameli
e5baad44d4 The great object-oriented rewrite of track panel drawing details! ...
... at last, making the TrackPanelCell objects responsible for both their views
and their hit-testing!

And leaving only one place in the code that defines the division of panel areas
into cells!  Which is the collection of TrackPanelNode subclasses in
TrackPanel.cpp.

Now hit testing and drawing are sure to get the same rectangle, if that policy
for division into areas is modifed in just that one place.  This should make
it easier to experiment with variations of that policy.

Note that not only cells have a Draw method, but cell groupings may also have
them, as for the yellow focus border, and the handles returned by hit-testing
may also do some drawing, such as for snap guidelines.

And 11 files leave the big strongly connected component.  That leaves 13 in it.
2019-06-27 00:10:55 -04:00
Paul Licameli
9585f32be5 Remove TrackArtist::leftOffset 2019-06-27 00:10:55 -04:00
Paul Licameli
b05acc32da Move drawing code for track names 2019-06-27 00:10:53 -04:00
Paul Licameli
dc216d669b Move drawing code for snap guidelines 2019-06-26 23:39:42 -04:00
Paul Licameli
e6dae33038 Move drawing code for focus border 2019-06-26 23:39:42 -04:00
Paul Licameli
4633f4f9d4 Move drawing code for background below tracks 2019-06-26 23:39:42 -04:00
Paul Licameli
f84d92f0a8 Move drawing code for zoom guidelines 2019-06-26 23:39:42 -04:00
Paul Licameli
488cb466c3 Move drawing code for track controls 2019-06-26 23:39:42 -04:00
Paul Licameli
b45d1387dc Move drawing (and updating) code for vertical rulers 2019-06-26 23:39:42 -04:00
Paul Licameli
fccb832e2d Move drawing code for track borders and shadows 2019-06-26 23:39:42 -04:00
Paul Licameli
363f6f8b7b Move drawing code for background of vertical rulers 2019-06-26 23:39:42 -04:00
Paul Licameli
e7c1f7424d Move drawing code for background of track control panel 2019-06-26 23:39:42 -04:00
Paul Licameli
1ca079b503 Move drawing code for margins and separators 2019-06-26 23:39:42 -04:00
Paul Licameli
b881a6e918 Move drawing code for tracks, free EnvelopeEditor from cycles 2019-06-26 23:39:42 -04:00
Paul Licameli
ec69a58e0a Invoke CellularPanel::Draw for TrackPanel, no steps moved into it yet 2019-06-26 23:39:42 -04:00
Paul Licameli
cb2ea25afc Define drawing function of CellularPanel, which visits nodes 2019-06-26 23:39:42 -04:00
Paul Licameli
040decf9e3 Commonly used rectangle calculations move into ViewInfo/ZoomInfo...
... reducing need for TrackPanel.h
2019-06-26 23:38:31 -04:00
Paul Licameli
868481b686 GetSceenEndTime out of TrackPanel 2019-06-26 21:25:15 -04:00
Paul Licameli
d29d10d712 GetTracksUsableArea() out of TrackPanel 2019-06-26 21:25:15 -04:00
Paul Licameli
f87dfd43c1 GetVRulerWidth, GetLabelWidth, GetLeftOffset out of TrackPanel.h...
... And some things demoted from ViewInfo to ZoomInfo, related to x coordinates
only
2019-06-26 21:25:15 -04:00
Paul Licameli
baf31dd72e TrackPanel copies its size, stores VRuler width in ViewInfo 2019-06-26 21:25:15 -04:00
Paul Licameli
5cd77187ef Fix TrackPanel rectangle calculations...
... There was an incorrect click-to-resize area active when the last track was
partly scrolled off the bottom

This big predated 2.3.3. development
2019-06-26 21:24:31 -04:00
Paul Licameli
349b882911 Fix failures to repaint track focus border caused by 25f4d6c 2019-06-26 10:03:07 -04:00
Paul Licameli
ef7068f46a Fix some failures to update the vertical scrollbar...
... Problem involves sequence in which event handlers are done, and started at
commit 278509a which updated track Y coordinates in a handler.

Solution is to delay the updating of scrollbars further, using CallAfter.

Also remove one unnecessary call to ProjectWindow::FixScrollbars() because
ProjectWindow::HandleResize follows it and includes scrollbar update already.
2019-06-25 17:41:29 -04:00
Henric Jungheim
b0ea6e274d Have AppVeyor's git fetch submodules in parallel. 2019-06-25 11:53:49 -07:00
Henric Jungheim
01c1b0b0a9 Avoid warning about forward declaration not matching definition. 2019-06-25 11:53:49 -07:00
Henric Jungheim
3b4250c3ae Base classes of AUDACITY_DLL_API classes also need AUDACITY_DLL_API. 2019-06-25 11:53:49 -07:00
Henric Jungheim
3e0475e740 Don't override build parameters in appveyor.yml.
Leave them as set by Directory.Build.props.
2019-06-25 11:53:49 -07:00
Henric Jungheim
799db937ef Remove AppVeyor branch filter. 2019-06-25 11:53:49 -07:00
Paul Licameli
dc870cf2c5 TrackPanelAx.cpp freed from cycles leaving 24 in largest s.c.c. 2019-06-25 11:25:07 -04:00
Paul Licameli
25f4d6cf8b TrackPanelAx does not depend on TrackPanel...
... TrackPanelAx now sends an event to the project when track focus changes,
and TrackPanel listens for it.

TrackPanel also initializes TrackPanelAx with a callback to do the details of
rectangle calculation.
2019-06-25 11:24:40 -04:00
Paul Licameli
2257fa642a Remove TrackPanel::EnsureVisible; TrackList sends an event instead 2019-06-25 10:54:55 -04:00
Paul Licameli
d236507682 Free CommonCommandFlags from cycles again, big s.c.c. is 25 2019-06-25 09:41:11 -04:00
Paul Licameli
baf4648621 Eliminate dependencies on the src/menus files...
... The declarations in namespaces in Menus.h are gone, the function
definitions moved elsewhere.

So there had been hidden dependencies on the src/menus files, that
scripts/graph.pl did not detect.  Now the lack of dependencies on those
files, according to the graph, is almost the reality.

EXCEPT that src/Menus.cpp still has extern declarations of functions defined
in src/menus/* that populate the menus, so things really are still tied up
in cycles.

Breaking that link dependency is one purpose of the future project of defining
a menu item registration system.

The graph as reported by scripts/graph.pl has only some minor changes.  The
big s.c.c. grows again to 26, two new files in it, one file
(CommonCommandFlags) trapped in it again.
2019-06-25 00:20:17 -04:00
Paul Licameli
7fc3c5e7a7 Move namespace TransportMenus into ProjectAudioManager.cpp ...
... not the best thing for the long term, but hidden dependencies on
TransportMenus.cpp are eliminated

Tying CommonCommandFlags again into the big component, which is now 26
2019-06-25 00:14:53 -04:00
Paul Licameli
c6478f43af Lower ViewActions as member functions of ProjectWindow 2019-06-25 00:14:53 -04:00