Commit Graph

66 Commits

Author SHA1 Message Date
freddii
2593a84d56 Fix some spelling mistakes. 2021-01-12 09:55:31 +00:00
Paul Licameli
4ca09d55a1 Null checks on SqliteSampleBlock::mpFactory 2020-10-07 15:33:13 -04:00
Leland Lucius
f3d3211558 Bug 2470 - Linux/Mac: Modules may not be found if earlier version failed 2020-06-15 00:51:27 -05:00
Leland Lucius
e861598f99 Bug 2470 - Modules may not be found if earlier version failed 2020-06-04 15:55:24 -05:00
Paul Licameli
9360359e9d
Module manager (#549)
* Eliminate ModuleManagerInterface...

... It was there only to provide RegisterModule(), but that was not used
anywhere.  So simplify.

* Remove nested #include of ModuleInterface.h
2020-05-29 10:48:52 -05:00
Paul Licameli
eb038972b0 Remove unused function and data member 2020-05-28 11:23:09 -04:00
Paul Licameli
63c49db0ce Don't internationalize logged strings; -29 macro _ calls 2020-05-23 08:07:24 -04:00
Leland Lucius
a6d0b3f902 Bug 2360 - Scripting: "Message:" command may crash when using Nyquist with Python 2020-04-16 22:14:45 -05:00
Leland Lucius
41ded2da6e Fix build against wx30
Funciton wxSysErrorMsgStr() doesn't exist in wx30, so failed when
using Ubuntu system libraries.
2020-03-29 15:58:04 -05:00
Leland Lucius
ff20948d57 Bug 2229 - Audacity may fail to load a "bad" module silently, with no error message 2020-03-29 15:33:23 -05:00
James Crook
3fcde5d00f Don't look for "AudacityModule" in plug in modules.
It isn't in these modules, it may slow start up, it is not correct to do it for plug-ins that are disabled.
2020-03-13 17:39:29 +00:00
Paul Licameli
b423413278 Fix comments 2020-02-17 22:40:05 -05:00
Paul Licameli
11bbce10b1 a null check and a comment 2020-02-16 13:32:10 -05:00
James Crook
41619af8cd Bug 2274 - Enh: Dialog for orphan block files has no "?" Help button
also

Bug 2273 - Enh: Dialog for missing block files has no "?" Help button

These now link to the appropriate page in the manual.
2020-02-09 20:26:29 +00:00
Paul Licameli
093ffbd2f1 MultiDialog uses ShuttleGui, and TranslatableString for title 2019-12-29 16:17:04 -05:00
Paul Licameli
66097c34dc MultiDialog uses TranslatableString for button labels & 2nd message 2019-12-23 15:35:47 -05:00
Paul Licameli
1537930195 DiscoverPluginsAtPath reports error as TranslatableString 2019-12-20 22:06:18 -05:00
Paul Licameli
dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli
53ee9c9800 TranslatableString for titles, names, labels of wxDialogWrappers...
... Found one missed translation in CommandTargets.cpp
2019-12-16 10:58:05 -05:00
Paul Licameli
f86403378b Move AudacityMessageBox to its own files...
... breaking cycles among low-level files introduced by 273ba9f
2019-05-20 14:48:36 -04:00
Paul Licameli
a1ff74b5bb Move AudacityPathList & utilities from AudacityApp.h to FileNames.h 2019-05-17 16:29:03 -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
5be54c5612 ModuleManager::CreateProviderInstance returns more specific type 2019-05-16 12:30:26 -04:00
Paul Licameli
0b9d279a52 wx/list.h no longer used anywhere 2019-03-30 11:15:27 -04:00
Paul Licameli
5e7d41ec07 Each .cpp/.mm file includes corresponding header before any other...
... except Audacity.h

This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
2019-03-17 22:54:52 -04:00
Paul Licameli
906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54: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
a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli
dcd211affa Use type aliases PluginPath, PluginPaths...
... for wxString and vector thereof, when holding plugin paths (which may or
may not be interpreted as file paths, depending on the module); to be replaced
later with different types
2019-03-15 15:18:11 -04:00
Paul Licameli
cc92c7605e Rename typedef PluginIDList to PluginIDs 2019-03-14 17:15:41 -04:00
Paul Licameli
50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli
da33daf197 Some replacements of wxArrayString with auto 2019-03-10 14:47:12 -04:00
Paul Licameli
795b6a2e42 More std:: style for wxString and wxArrayString...
... Replacing:

Insert => insert
RemoveAt => erase
Remove => erase
IsSameAs => operator == or operator !=
   (but only when second argument was true or default)
2019-03-10 14:45:12 -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
466e9c179e Create ComponentInterface
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
2018-11-02 17:04:43 +00:00
scootergrisen
b4f7946e9b Remove some double space 2018-10-14 10:42:01 +01:00
James Crook
5fd95dd131 Fix C4456 Warnings.
"C4456 declaration hides previous local declaration."
These arise from repeated declarations of the same name.
2018-10-10 17:28:50 +01:00
Paul Licameli
b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04: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
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
50d6e75185 null checks -- fix Linux crash in drag-dropping files onto app icon? 2018-01-03 15:35:49 -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
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
Paul Licameli
8cfb8d2400 Change ModuleInterface for support of drag-and-drop of plug-in files 2017-12-31 18:09:36 -05:00
Paul Licameli
0f8bd45a7c ModuleInterface::RegisterPlugin can report an error message 2017-12-27 15:19:36 -05:00
James Crook
e4260e9581 Bug 1587 - Mac: Ghost duplicate Nyquist effects after upgrade
Fix removes ghost Nyquist effects from the effects menu and generators from generate menu.
2017-02-05 20:27:56 +00:00
Paul Licameli
942c62b6f6 Remove some naked new amd delete in: various 2016-08-08 07:51:24 -04:00
Paul Licameli
59af732763 Mac build fixes; and implement deleters for our imitation unique_ptr 2016-04-10 14:15:51 -04:00
Paul Licameli
df5fcc3581 Make static "Destroy" methods for certain singletons unnecessary. 2016-04-06 16:24:46 -04:00
Paul Licameli
29349fedbb Loaded modules managed by smart pointers 2016-04-06 16:06:31 -04:00