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

10465 Commits

Author SHA1 Message Date
Paul Licameli
a470ba00b0 ProjectAudioManager does not depend directly on AdornedRulerPanel 2019-07-03 16:34:46 -04:00
Paul Licameli
3af2063fa3 Remove some direct dependencies on TrackPanel 2019-07-03 14:55:10 -04:00
Paul Licameli
1e4812f470 GetProjectPanel analogous to GetProjectFrame breaks dependencies...
... in places that need the TrackPanel but only to invoke common wxWindow
methods on it.

This eliminates direct use of TrackPanel by Scrubbing and ProjectWindow
2019-07-03 13:53:07 -04:00
Paul Licameli
7597080418 Move the project window initialization into ProjectManager 2019-07-03 13:50:57 -04:00
Paul Licameli
d0c4677ab1 Move most of ProjectWindow initialization into nonmember function 2019-07-03 13:34:44 -04:00
Paul Licameli
52ff705b0d ScrollIntoView out of TrackPanel, into ProjectWindow 2019-07-03 13:32:32 -04:00
Paul Licameli
b0d03d09a2 Redo management of widths of fields in project status bar...
... new attached object, demoted to low levels of the dependency graph, to
loosen some remaining difficult dependencies;

also update it for "Playing at speed" and for changes of language
2019-07-02 21:03:10 -04:00
Paul Licameli
312911645e Update status bar field widths in case of language change 2019-07-02 21:02:13 -04:00
Paul Licameli
68999934e0 ProjectAudioManager doesn't use ProjectWindow, which doesn't use...
ControlToolBar, after we make a system to register functions that calculate
necessary minimum widths for status bar fields.

Also let Scrubbing.cpp register its own strings.

Also be sure to size the status field sufficiently for "Playing at Speed".
2019-07-02 21:01:54 -04:00
Paul Licameli
9f61b67965 Manage some more status bar changes with ProjectStatus 2019-07-02 21:01:34 -04:00
Paul Licameli
e2362bc25a Move project status string management to new attached object class 2019-07-02 21:01:34 -04:00
Paul Licameli
efa66f5350 New files for ProjectStatus 2019-07-02 21:01:34 -04: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
6adb2abc98 Keep EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT compilable...
... while not reintroducing bad dependencies, which explains the movement
of the definition of some constants
2019-07-02 12:35:40 -04:00
Paul Licameli
a046d9906c One less use of ProjectWindow::Get() where only a wxWindow is needed 2019-07-02 10:26:42 -04:00
Steve Daulton
f99d564fd6 Fix bug 2148
Ensure that backslashes in GetInfo data are escaped.
2019-07-02 15:05:10 +01:00
Paul Licameli
5741589758 More updating of ProjectWindow and TrackPanel into event handlers...
... reducing intrusions in much other code
2019-07-02 08:51:36 -04:00
Paul Licameli
a5364119eb Eliminate many calls to RedrawProject & TrackPanel::Refresh()...
... Let the window respond to an undo manager event instead, whenever there
is a push or modify

Maybe this makes a few unnecessary redraws that did not happen before.  If
that is important, then we should figure out how to put the logic for eliding
the redraw into ProjectWindow, and the extra information needed for the
decision into the events, but not make intrusions in other code all over the
place.
2019-07-02 08:17:01 -04:00
Paul Licameli
63c7b3740e RedrawProject has a CallAfter delay now, so remove other delays...
... and rewrite that CallAfter more safely with a weak pointer
2019-07-02 08:14:30 -04:00
Paul Licameli
abe69ddd35 Remove some unnecessary calls to FixScrollbars...
... because RedrawProject or HandleResize invokes it
2019-07-02 08:06:24 -04:00
Paul Licameli
73fb2a2a82 Transport status message, buttons, scrolling update in idle time...
... so the functions that start and stop streams don't really need the
ControlToolBar object.

This also makes the intended momentary push-down of the Stop button visible,
as was apparently intended, when playback stops for other reasons than a
click on that button.
2019-07-01 22:51:20 -04:00
Paul Licameli
34e9cb6171 Start and stop record or playback scrolling in idle time 2019-07-01 22:51:20 -04:00
Paul Licameli
2a87ea77cf Momentary Stop push-down happens in yield to the idle time handler...
... So that ControlToolBar::StopPlaying now does nothing directly to the
buttons, and can be moved to another place with no dependency on ControlToolBar
2019-07-01 22:51:15 -04:00
Paul Licameli
5ab3986261 Pop up the Stop button in idle time...
... This also causes a momentary push-down of the stop button, which happens
in ControlToolBar::StopPlaying, really to be visible, as was apparently the
intent.

For instance, when playing, then clicking in the quick-play ruler to restart
the play elsewhere.
2019-07-01 22:51:13 -04:00
Paul Licameli
830f772625 Update Play button appearance in idle time...
... so most calls to ControlToolBar::SetPlay are removed.  One remains in
TransportMenus, which will not be problematic for untangling dependencies,
and one remains where the toolbar remakes its own buttons.

But the routines that start and stop the streams, importantly, don't use it.
2019-07-01 21:25:50 -04:00
Paul Licameli
cac04e9fb8 Do not use ControlToolBar's Record button as a state variable 2019-07-01 19:48:52 -04:00
Paul Licameli
923128731d Do not store pause state in ControlToolBar...
... Move that into ProjectAudioManager instead, and update the button, only to
reflect it, in idle time.

However, AudioIO also has its mPaused member variable, and it is not obvious
that it was always kept the same as the button state.  No attempt was made
here to identify and fix any bugs, but only to preserve behavior.
2019-07-01 19:48:52 -04:00
Paul Licameli
8b549ea07f Another overload of ControlToolBar::OnRecord taking bool...
... so that it's called directly where needed without the roundabout of
SetInt in an event, and there is no checking of the state of a button first
2019-07-01 19:48:52 -04:00
Paul Licameli
7d504ba015 ControlToolBar uses idle events to update status message for itself 2019-07-01 19:48:51 -04:00
Paul Licameli
ce7773b7ab And so, ControlToolBar.cpp does not need AdornedRulerPanel.h 2019-07-01 19:44:54 -04:00
Paul Licameli
e815949535 This call to redraw overlays when play starts isn't needed...
See commit aeece118e8950d2aeee60ef4e1b2a2ee752129cd which changed it from
the original call intended to hide the quick-play indicator in case that is
how the play starts; but other things in that commit were sufficient to
guarantee that
2019-07-01 19:37:55 -04:00
Paul Licameli
770ea8fe15 All idle event handlers should skip 2019-07-01 11:43:02 -04:00
Paul Licameli
192530d8a5 Free ScrubbingToolBar from cycles...
... by having it update itself in idle time, not needing a push from Scrubber

Shrinking that remnant of the big strongly connected component to 6
2019-07-01 08:43:27 -04:00
Paul Licameli
3e3cf24c01 Scrub & seek toolbar buttons disable during recording, as was intended 2019-07-01 08:42:57 -04:00
David Bailes
4b437b8cb9 Bug 2146: Keyboard preferences: mouse can select wrong item
Steps to reproduce:
1. Open preferences
2. Select the keyboard category
3. Scroll down the list by any amount
4. Select an item using the mouse. The list scrolls to the top and the wrong item is selected.

The problem occurs because if the list of shortcuts is currently not the focus, then after a left mouse click, KeyView::OnSetFocus() is called, and setting the selection in that function interferes with the mouse selection.

Fix: In KeyView::OnSetFocus(), if there has been a left down event, don't select anything.
2019-07-01 11:48:56 +01:00
Paul Licameli
748c8d63d8 Bug2145: crash ctrl-clicking on play-at-speed button...
... Problem began at commit 46bf5a82fcb20a5ade26c456fec8519172b7bc1d
2019-06-30 20:46:03 -04:00
Paul Licameli
0b7a4d07b9 Fix wrong arguments to wxClip in AudioIO...
... the bug began at commit 494ab4eafedd4aef47a6680581a8b357f5100ec4

Now, a sine wave with the gain turned up really sounds like a square wave
2019-06-29 23:44:11 -04:00
Pokechu22
22ce129f8d Misc. cleanup 2019-06-29 23:32:19 -04:00
Pokechu22
87bf94e811 Fix bug 2140 2019-06-29 23:32:19 -04:00
Paul Licameli
68c1637bd3 Bug2142: Type to create label preference should work...
... bug began at commit e3efd52026a4e6f115e4c9966a1fc02c450a4ca9
2019-06-29 11:55:35 -04:00
Paul Licameli
bdcb55467f Bug2141 and elimination of a few GetActiveProject() calls 2019-06-28 19:12:15 -04:00
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