Commit Graph

278 Commits

Author SHA1 Message Date
Paul Licameli 1be3187b99 Use TrackIterRange::Visit 2018-10-01 10:59:24 -04:00
Paul Licameli 6930b63192 Redo track kind as an enum class defined at global scope 2018-09-29 21:41:47 -04:00
Paul Licameli af06691982 casting of Track* to WaveTrack* happens at lower level in OD manager 2018-09-29 12:46:45 -04:00
Paul Licameli 9481587fa8 Move menu handling functions out of class AudacityProject 2018-09-29 12:10:27 -04:00
Steve Daulton 94b3bf3c22 Remove superfluous log message 2018-08-21 14:09:56 +01:00
Steve Daulton b9ec43433e Bug 1934 residual
Allow generate type plug-ins spawned from Nyquist Prompt to create
a new track if none selected.

This commit also fixes preview in generators when there is no selection.
2018-08-21 14:02:48 +01:00
Steve Daulton 5be7f7db0b White space changes
The Objective C++ syntax '[[' used in a couple of places (Mac only),
breaks the parser in kdevelop. As suggested by Paul, a space between the
brackets fixes the problem.
Also removed some trailing spaces.
2018-08-15 11:29:12 +01:00
James Crook 2d28b2e7e1 Bug 1907 - Mac: Some buttons in effects dialogs have non-transparent background
It's not clear why this worked before.
- Mac was not clearing any backgrounds for the button bitmaps.
- There were no pressed buttons defined (on any platform).
2018-08-10 18:39:34 +01:00
James Crook 7f96f85676 Add some Right-To-Left language workarounds.
MixerBoard, LyricsWindow, Screenshot and most effects are now LTR in RTL locales.
Also added a pref so this can be overridden.  As RTL affects window creation, the language choice and this preference may only fully take effect after a restart of Audacity.
2018-08-10 18:39:33 +01:00
James Crook c21855bbca Change ";type tool" to not iterate through tracks or selection.
Also adds the options
;type tool
;type tool process
;type tool generator
;type tool analyze

These tools will appear in the Tools menu, but behave as their second argument (if any)
2018-08-01 20:32:30 +01:00
James Crook b975956812 Add re-entrancy checks to Nyquist
These changes below are paving the way for aud-do:

Nyquist Effect now detects self reentrancy and skips reentry if so.
Nyquist Effect now detects if another effect has run during effect processing, and does not send Nyquist
output if so.

Neither of these preparatory changes have an effect in absence of AUD-DO (or other function
that allows Nyquist effect to call out to Audacity functions).
2018-08-01 20:31:03 +01:00
Max Maisel d707f68189 Expose "msg" parameter in Effect::TotalProgress(). 2018-07-24 17:10:52 +02:00
Paul Licameli 35a97e09e7 Group arguments to StartStream, and a bit less of #ifdef for MIDI play...
... And pull choice of tracks and options out of DoRecord
2018-05-29 00:22:12 -04:00
Paul Licameli 7a0475e39f Remove most uses of AUDACITY_OLD_STD 2018-05-10 00:56:36 -04:00
Paul Licameli 56c42e870e Bug1871: Make Effect::Preview cleanup sequence as was before 79c3bef 2018-05-10 00:50:24 -04:00
Paul Licameli b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
Paul Licameli 0394660e9e Use IdentInterfaceSymbol for vendor strings, which are used in paths 2018-04-11 11:13:41 -04:00
Paul Licameli 2c19e8f81e Use IdentInterfaceSymbol to identify effect families 2018-04-11 11:13:40 -04:00
Paul Licameli 0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04:00
Henric Jungheim d8da4015ef Make it possible to const'ify xpm. 2018-03-27 05:36:02 -04:00
Steve Daulton 15e6792be9 Fix bug 929 2018-03-26 22:51:50 +01:00
Paul Licameli 4bfd8abc2b Fix more missed translations 2018-03-08 22:53:00 -05:00
Paul Licameli f6efacbda3 Untranslated from GetVendor; translated in effect info menu only 2018-03-06 01:14:54 -05:00
James Crook 8cd5d7f4fe Tools menu and EffectTypeTool
- Also add a 'Nyquist Prompt' to the Tools Menu.
- Currently it is the same as the Effects Nyquist Prompt.
- Chains moved into the Tools prompt.
2018-03-03 12:57:32 +00:00
James Crook 0ad533a740 Automation -> Scripting. 2018-02-24 14:20:30 -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
Paul Licameli 097764d94c Distinguish Effect Family Id from Effect Family Name...
... and the distinction makes a difference only for built-in effects.

"Id" is meant to persist in pluginregistry.cfg, and is constrained by how
previous versions of Audacity were written.

"Name" is not persistent, so we have the liberty to change it, as done here
for the built-ins.
2018-02-21 21:43:01 -05:00
Paul Licameli 8be1e8fdad Remove wxArray(Int|Long|Double) except where wxWidgets fns need it 2018-02-21 19:33:31 -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 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 0aad028c9b Simplify calls to Effect::Delegate 2018-02-21 19:20:53 -05:00
Paul Licameli af279072b5 Correct recent comments...
... compatiblity of plug-in settings is the real problem, not the plug-in
registry.
2018-01-16 12:28:21 -05:00
Paul Licameli 4628d6afa7 Remap effect type from "Audacity" to "Built-in", carefully...
... doing that only for the user-visible string, seen in the Manage>About menu
of the effect dialog and in the sorted or grouped Effect/Generate/Analyze
menus.

But don't for the string used internally and written into pluginregistry.cfg,
so that compatibility of that file is preserved.

See also commits cafbff9ff8 and
c6bbe4c3da
2018-01-16 11:11:36 -05:00
Paul Licameli a30defe8ca Redo "Provide STL idiom for iterating tracks..." ...
... Being careful not to use operator == on a default-constructed
std::list::iterator, which violates assertions in the MSVC libraries.

This reverts commit 7fb5ec4b7a.
2018-01-14 14:25:02 -05:00
James Crook 7fb5ec4b7a Revert "Provide STL idiom for iterating tracks..."
Unsafe on MSVC 2013.
2018-01-14 14:24:21 +00:00
Paul Licameli f9dab3679c Provide STL idiom for iterating tracks...
... and require qualified name access to use the underlying std::list iterators
that return shared_ptr to Track.

Which should not be done very much outside of class TrackList, but a few
places need it.
2018-01-13 19:37:05 -05:00
Paul Licameli 8e0cffb7f2 Simplify GuardedCall and default its return type to void 2018-01-13 01:32:41 -05:00
Paul Licameli c975de8c5e More use of shared_ptr to Track, for safety...
... This even makes it possible to remove the prohibition of undo and redo
during transport, not that we want to though.  Playback and recording will
continue, using track objects that might not be in the current project.
2018-01-10 20:05:11 -05:00
Paul Licameli cb403954fa Use std::[tr1::]unordered_(set|map), not the wxWidgets container macros 2018-01-08 18:22:51 -05:00
Paul Licameli 8a074770e8 IdentInterface::GetDescription() returns a translated string...
... See commit 3b90538b84 which removed the
only use of the untranslated strings.

Also follows better i18n guidelines for composing the VSTEffect description.
2018-01-07 21:16:26 -05:00
Paul Licameli 77c392d29c AudacityProject::OnEffect wraps new function DoEffect 2018-01-05 09:27:28 -05:00
Paul Licameli 80a958f8a4 Rewrite empty prompts to ShuttleGUI functions as {} ...
... so we might more easily redefine the type of the function argument,
some other day (not this release)
2018-01-01 22:51:25 -05:00
Paul Licameli 7fd78183d2 Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that
you don't need this.

Don't need c_str either to convert wxString to const wxChar * because
wxString has a conversion operator that does the same.
2018-01-01 20:34:33 -05:00
Paul Licameli e8b875ff81 Define AudacityMessageDialog wrapper around wxMessageDialog...
... Prohibiting use of the default caption which is unlocalized.  (But we
didn't use it in fact anywhere.)
2018-01-01 17:50:03 -05:00
Paul Licameli ccb4bbac33 Translate "Message" as default title of message box...
... This required a sweeping change of all calls to wxMessageBox!  But it seems
safe to me, despite the great number of touched files.
2018-01-01 17:50:02 -05:00
James Crook f463eda36c Clean up some dead code and MSVC warnings.
- Dead code from experiments in SelectionBar removed.
- Many warnings about unused parameters fixed with WXUNUSED()
- Many warnings about signed / unsigned comparisons cleaned up.
- Several 'local variable declared but not used' warnings fixed.
2017-12-08 15:20:39 +00:00
Olivier Humbert 0d89bc3f15 Fix some typos in msgids, thanks to Olivier Humbert...
... Fix the source code; fix up msgids in audacity.pot and *.po
2017-11-27 23:12:37 -05:00
Paul Licameli 1d311651e8 comment 2017-11-19 11:04:07 -05:00
Paul Licameli 2f40c1c77e Don't use InsertSilence when previewing effects 2017-11-19 01:48:40 -05:00
James Crook c28be778e2 Linty fixes
This commit fixes a number of warnings shown in compilation with MSVC.  No behavioral changes intended.  I did not fix signed/unsigned warnings.
2017-11-07 14:23:30 +00:00