Commit Graph

27 Commits

Author SHA1 Message Date
Paul Licameli
c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Leland Lucius
a6d0b3f902 Bug 2360 - Scripting: "Message:" command may crash when using Nyquist with Python 2020-04-16 22:14:45 -05:00
Yuri Chornoivan
d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli
a1eeb528b7 Lift a call to GetActiveProject into ScriptCommandRelay...
... Don't do it at the low level of construction of a command object.  Do it
only at the highest possible level, where an external scripting module or
Nyquist calls into the command framework.  Pass the project pointer down where
it is needed.
2020-01-02 13:05:09 -05:00
Paul Licameli
f2f6ff3a1b Break cycle of ScriptCommandRelay and CommandBuilder 2019-07-09 13:23:07 -04:00
Paul Licameli
273ba9f64d Fix Windows build...
... unfortunately inclusion of ErrorDialog.h in FileNames.h ties nine files
into a low-level s.c.c.
2019-05-20 13:49:26 -04:00
Paul Licameli
016e1949ae CommandDirectory.cpp has fewer dependencies...
... This involved populating it with a new registration system.

BatchEvalCommand, HelpCommand, MessageCommand escape from cycles and move
higher in the dependency graph, and CommandDirectory moves lower.
2019-05-18 20:31:17 -04:00
Paul Licameli
78a1263163 Move ShuttleGetDefinition to its own files...
... so Shuttle need not include CommandTargets.h
2019-05-18 15:10:07 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
b8c0125143 Replace comparisons against wxEmptyString with empty() 2019-03-14 16:20:18 -04:00
Paul Licameli
c68e336247 More use of std:: style members of wxString...
... replacing:

Length => length
Len => length
2019-03-10 14:44:54 -04:00
Paul Licameli
2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04:00
James Crook
b1b1a362ed Doxygen, Clips and Labels
- Classes renamed and better doxygenated
- GetInfo: Type=Clips added
- GetInfo: Type=Labels added.
2018-02-24 14:20:24 -05:00
James Crook
b83b862b3f OldStyleCommandType - It's on the way out.
This renaming makes it clearer which code is still using Dan Horgan's Command system.
2018-02-24 14:20:23 -05: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
James Crook
f8be26a9b8 Spaces allowed in batch command parameter values now
PROVIDED you use single or double quotes around the string.
2018-01-18 15:30:05 +00:00
James Crook
42573d36f8 Make 'Message' default be 'Connected'. 2017-12-21 17:33:23 +00:00
James Crook
a7960864dd Fix scripting bug where missing parameters gave syntax error
In these cases the default parameters should have been used instead.
Also the Help command now gives Help on Help by default.
2017-12-20 19:58:05 +00:00
Paul Licameli
70bd46b8ad travis 2016-04-09 22:55:15 -04:00
Paul Licameli
3481e678ea Manage the members of CommandOutputTarget with smart pointers 2016-04-06 16:06:12 -04:00
Paul Licameli
e8ad90b3c9 Manage Commands and CommandOutputTarget objects with smart pointers 2016-04-06 16:05:28 -04:00
Paul Licameli
923a6ce4af Sweep unnecessary wxString copies: commands 2016-02-23 01:40:21 -05:00
benjamin.drung@gmail.com
277932dccb Remove trailing spaces. 2014-06-03 20:30:19 +00:00
martynshaw99
4ce2643d5f Remove the
// Indentation settings for Vim and Emacs
etc. lines from all files, as Campbell's patch (except for other changes to Languages.cpp)
2013-09-24 00:14:37 +00:00
v.audacity
08b68fd96a Use American spelling conventions in GUI, per policy and convention. 2012-04-25 22:44:00 +00:00
ra
e74978ba77 Locate and position the current Audacity source code, and clear a variety of old junk out of the way into junk-branches 2010-01-23 19:44:49 +00:00