1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-12 06:37:52 +02:00

159 Commits

Author SHA1 Message Date
andheh
50901b9454 fixed initialization order warnings 2018-03-06 21:29:54 +00:00
James Crook
1c988b4e3a Automation: AudacityCommand
This is a squash of 50 commits.

This merges the capabilities of BatchCommands and Effects using a new
AudacityCommand class.  AudacityCommand provides one function to specify the
parameters, and then we leverage that one function in automation, whether by chains,
mod-script-pipe or (future) Nyquist.

- Now have AudacityCommand which is using the same mechanism as Effect
- Has configurable parameters
- Has data-entry GUI (built using shuttle GUI)
- Registers with PluginManager.
- Menu commands now provided in chains, and to python batch.
   - Tested with Zoom Toggle.

- ShuttleParams now can set, get, set defaults, validate and specify
the parameters.
- Bugfix: Don't overwrite values with defaults first time out.
- Add DefineParams function for all built-in effects.
- Extend CommandContext to carry output channels for results.

We abuse EffectsManager.  It handles both Effects and
AudacityCommands now.  In time an Effect should become a special case of
AudacityCommand and we'll split and rename the EffectManager class.

- Don't use 'default' as a parameter name.
- Massive renaming for CommandDefinitionInterface
- EffectIdentInterface becomes EffectDefinitionInterface
- EffectAutomationParameters becomes CommandAutomationParameters
- PluginType is now a bit field.

This way we can search for related types at the same time.

- Most old batch commands made into AudacityCommands.
The ones that weren't are for a reason.  They are used by mod-script-pipe
to carry commands and responses across from a non-GUI thread to the GUI
thread.

- Major tidy up of ScreenshotCommand
- Reworking of SelectCommand
- GetPreferenceCommand and SetPreferenceCommand
- GetTrackInfo and SetTrackInfo
- GetInfoCommand
- Help, Open, Save, Import and Export commands.
- Removed obsolete commands ExecMenu, GetProjectInfo and SetProjectInfo
  which are now better handled by other commands.

- JSONify "GetInfo: Commands" output, i.e. commas in the right places.

- General work on better Doxygen.
    - Lyrics -> LyricsPanel
    - Meter -> MeterPanel
- Updated Linux makefile.
- Scripting commands added into Extra menu.
- Distinct names for previously duplicated find-clipping parameters.
- Fixed longstanding error with erroneous status field number which
  previously caused an ASSERT in debug.
- Sensible formatting of numbers in Chains, 0.1 not 0.1000000000137
2018-02-24 14:20:22 -05:00
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00
Paul Licameli
2f3604bdea Rewrite many calls to Connect() with Bind()...
... it's the more modern way, and does better type checking, without the
dubious casts of pointers-to-member-functions.
2018-02-21 19:28:11 -05:00
Paul Licameli
bf5228267a Calls to Disconnect or Unbind in destructors are not needed, if...
... it's either the source of the connection that is being destroyed, or other
object (such as an ancestor window) transitively owning it and so causing it to
be destroyed too;

or, the sink is being destroyed, and that sink is a wxEvtHandler (which is
always so for Disconnect, though not for Unbind in case Bind was passed a
member function of a non-wxEvtHandler).

wxWidgets takes care of erasing the connection in such cases.

This removes most calls to Disconnect and Unbind.  Many destructors shrank to
nothing.

Notably, in case of popup menu handling, the call to Disconnect is not removable
because the object being destroyed is neither the source nor the sink.
2018-02-21 19:28:06 -05:00
Paul Licameli
ab6de1181d No more functor objects; all command handler functions take same args 2018-01-05 09:27:29 -05:00
Paul Licameli
6dead232f2 Pair CommandHandlerFinder with functor everywhere, but not used yet 2018-01-05 09:27:25 -05:00
Paul Licameli
d263eaa97b Remove the special PopupFunctor, redo it by other means...
... it was only used, so far, by the scrubber.
2018-01-05 09:27:23 -05:00
Paul Licameli
e2129feac9 Translate the items in the popup menu of the scrubbing ruler 2017-09-10 19:21:36 -04:00
Paul Licameli
3e1890f20d Bug1627 again: Fix it so that we don't disable all scrub, though! 2017-07-21 02:12:05 -04:00
Paul Licameli
57e040070c Bug1627: Fix infinite recursion of error dialogs, failing start scrub 2017-07-21 01:39:13 -04:00
Paul Licameli
812f3649de Bug 1685: garbage status bar messages and tooltips, scrub in Windows 2017-07-14 23:02:32 -04:00
Paul Licameli
ffbc4d5f90 Simplify iterations over TrackPanelCells with range-for 2017-06-17 03:01:40 -04:00
James Crook
bc55087968 Bug 1492 - Using Scrub Ruler to start Scrub or then change to Seek removes the selection 2017-05-15 17:55:49 +01:00
windinthew
db3ec50236 Fix missing or conflicted access keys
Also reinstate 'Store' and 'Retrieve' for save and recall of
selection and cursor point.
2017-04-21 04:24:08 +01:00
James Crook
47fb879157 Don't translate the empty string. 2017-03-18 18:04:56 +00:00
Paul Licameli
5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
Paul Licameli
53936ac970 Fix some warnings for unused variables and labels...
... But not in cases where a return status is ignored.
2016-09-19 11:47:47 -04:00
James Crook
65c7e8051a ThomasFeher - Unused parameters clean up. 2016-09-11 20:31:49 +01:00
James Crook
315679dad5 Bug 1508 - Scrubbing: Release mouse to exit Scrub Mode started by click & drag in Scrub Ruler 'no longer working'
It WAS working, just not the way QA wanted, because releasing mouse click when in the ruler and on the first seek continued the seek/scrub cycle.  Introduced a 'mInOneShotMode' variable to complete the baroque behaviour in the way that was requested.  Also updated tool tip code to reflect the one-shot and non one-shot difference in tooltip and status.
2016-09-08 19:02:55 +01:00
James Crook
8886d1ba41 Bug 1487 - Scrub and Seek are enabled when there is no audio to operate on
I added a new flag, HasWaveDataFlag that checks not only for the presence  of a WaveTrack but also for audio actually in it.  This is now applied to the Scrub and Seek menu items, with the result that they grey out in the menu, and their buttons are dulled on the toolbar, if there is no audio.
2016-08-22 13:25:05 +01:00
James Crook
f9d269bcee Change ScrubBar to ScrubRuler
This also makes it clearer in the code when we are dealing with a Toolbar ID (for the scrubbing toolbar) and when we are dealing with a button ID (for enabling/disabling the scrub ruler).
2016-08-22 12:25:36 +01:00
James Crook
53bb478600 Bug 1457 - Transport Menu "Scrub" and "Seek" do not correctly indicate when either Scrubbing mode is active 2016-08-11 22:30:51 +01:00
James Crook
5939fe66e8 Bug 1053 - [Scrub Phase I] Status Bar messages incomplete for scrub started with menu or shortcut. 2016-08-10 21:57:29 +01:00
James Crook
48ad701e57 Bug 1421 - When Scrubbing the Play button in the Transport Toolbar should not change its icon 2016-08-10 21:04:46 +01:00
James Crook
e96edb8f26 Bug 1457 - Transport Menu "Scrub" and "Seek" do not correctly indicate when either Scrubbing mode is active 2016-08-10 19:17:40 +01:00
James Crook
8dd93ef2a8 Bug 1467 - New pref for pinned head should move to the Prefs>Tracks
Also updated the wording as per comment #2 in Bug 1467.
2016-08-10 18:38:37 +01:00
Steve Daulton
6089c94971 Fix bug 1473
Disallow scrub / seek during record.
2016-08-09 14:10:04 +01:00
Paul Licameli
6a4d6ceeda Separate source files for ScrubbingToolBar 2016-06-25 15:05:17 -04:00
Paul Licameli
a18dce3e0a Correct the display when switching to seek with left click 2016-06-17 17:41:00 -04:00
Paul Licameli
db02cdb89e Click to switch to seeking, in scrub bar only. Not track panel. 2016-06-17 15:33:54 -04:00
Paul Licameli
4fb51cad07 Click to switch to seek works again, but only in ruler or track panel 2016-06-17 15:21:03 -04:00
Paul Licameli
8a0c34e96b Eliminate the special case of dragging scrub/seek 2016-06-17 15:14:51 -04:00
Paul Licameli
8fe93ae8bc Correct switching between scrub and seek in progress 2016-06-15 23:50:13 -04:00
Paul Licameli
8cba525b6c No more separate start/stop button on Scrubbing toolbar...
... This finalizes (I hope) the set of buttons, but maybe not their left to
right order.

Behavior of the scrub bar is still not settled.
2016-06-15 21:20:40 -04:00
Paul Licameli
b1ca48c23e Scrub bar show/hide button on Scrubbing toolbar 2016-06-15 01:11:42 -04:00
Paul Licameli
d0d28143f7 Do not change selection when stopping non-scrub play 2016-06-06 14:18:47 -04:00
Paul Licameli
d1fe0a89b5 Scrub play button becomes a stop button when pressed...
... also the corresponding menu command can stop as well as start the scrub
or seek
2016-06-06 02:12:31 -04:00
Paul Licameli
fd9d6a8fcf Set selection whenever scrub/seek stops by any means besides ESC key 2016-06-06 01:45:54 -04:00
Paul Licameli
8dab37de01 Scrub menu check items change pushed state of scrub toolbar buttons 2016-06-06 00:48:50 -04:00
Paul Licameli
fe335f3a2b Status is "Scrubbing" or "Seeking" not "Playing" at button down 2016-06-05 10:51:55 -04:00
Paul Licameli
f5c4c85653 New scrubbing toolbar; remove ruler pushbuttons. 2016-06-05 01:03:24 -04:00
Paul Licameli
bbfc730399 No more left-click to seek 2016-06-04 20:04:09 -04:00
Paul Licameli
ef62bc4e2a Fix checkmarks and Start item in scrub handle context menu 2016-06-02 16:20:15 -04:00
Paul Licameli
bbb93a7400 One more alternate play button image, for seeking 2016-06-02 15:55:16 -04:00
Paul Licameli
6a3613e8e9 Implement scrub and seek buttons on ruler; redo scrub menu items 2016-06-02 15:55:16 -04:00
Paul Licameli
eafc416d55 Remove double-click and scrolling menu items for scrub/seek...
... Use the toggle button on the ruler instead
2016-06-01 13:30:01 -04:00
Paul Licameli
fecc6f53e4 Consolidate the code that starts and stops play/rec head scrolling 2016-06-01 13:25:01 -04:00
Paul Licameli
fbcdc6b28f Scrolling drag scrub tracks the mouse much better 2016-05-28 12:15:32 -04:00
Paul Licameli
35b0502ce1 Don't let seek make a stutter at less than unit speed 2016-05-28 12:11:26 -04:00