Commit Graph

176 Commits

Author SHA1 Message Date
Steve Daulton f145574dd6 Fix for 1891 is specific to Mac / Linux
This is only really a temporary fix - we should be using the
standard "Manage" button, but imo Equalization require a
thorough overhaul.
2018-06-21 15:55:20 +01:00
Steve Daulton 6cff61535b Fix bug 1891 (EQ crash)
This fixes only the crash bug. This effect needs substantial attention.
2018-06-19 11:58:45 +01:00
James Crook 6d96ec1e52 Fix sizer ASSERT with equalization dialog. 2018-04-13 19:25:19 +01:00
Paul Licameli b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
David Bailes f027708fe1 Fix an issue caused by the accessibility changes in wxWidgets 3.1.1
The main change in wx accessibility is this:
7dab555f71 (diff-04f5191d86f95b1c4d5d9c979da65878)

However wxWindowAccessible has not been updated to take into account of that change. In particular wxWindowAccessible::GetParent() was always wrong, but it was consistent with the rest of the framework. Now it's wrong and inconsistent. This function should return an object with role window, and which has the same name.

The fix is to introduce class WindowAccessible, which is effectively our own version of wxWindowAccessible. This class does not override GetParent(), and so just relies on a standard accessible object to to the right thing in wxIAccessible::get_accParent() (which is does). This class also allows us to have our own version of GetName(), which allows us to set the accessibility names of buttons.

These changes will break the accessibility of Audacity if it is built with wxWidgets 3.0.X. If this is a problem, then there could be some #if stuff in WindowAccessible.h to turn the WindowAccessible class into one which simply inherits from wxWindowAccessible, and doesn't override anything.
2018-04-03 14:57:59 +01:00
Paul Licameli e1b60916b7 More consistent naming conventions for choice control items...
... This commit leaves at least a comment for all choice controls of all
built-in effects and commands.

Use CamelCase with no spaces for the internal identifiers, given in
wxT("...")

Use more idiomatic English with spaces in the user-visible names, given in
XO("..."); these strings go to the message catalog for internationalization

Do not use underscores

In case these strings are the same, give it just once in XO("..."), but if in
a future version it is decided to change the name in XO("..."), then the
original should be kept also in a distinct wxT("...") string, so that
saved configuration or plugin settings or macro files don't become gratuitously
incompatible just because of that user-visible name change.

Left TruncateSilence alone for now -- I think that choice demands a rewrite
as a slider instead.
2018-03-27 15:57:48 -04:00
Paul Licameli 2065eebff6 IdentInterfaceSymbol to distinguish internal vs visible enum settings 2018-03-27 07:51:44 -04:00
Paul Licameli 595cf05d42 More uses if LocalizedStrings 2018-03-27 07:51:44 -04:00
Paul Licameli 81dd580c57 Pass array and count separately to read/write/define enum 2018-03-27 07:51:43 -04:00
James Crook cb8e35574d Fix half sized equalization dB ruler. 2018-03-26 11:52:12 +01:00
Paul Licameli 05ef58753a Substitute, don't concatenate in internationalized strings 2018-03-24 15:24:15 -04:00
James Crook cd06f86619 Remove spaces before question marks (scootergrisen)
Requested by translation team.
2018-03-24 11:01:29 +00:00
James Crook 205b7d6a02 Rename 'chain' to 'macro' in history and comments. 2018-03-16 18:47:39 +00:00
Steve Daulton 814322a793 Fix Equalization crash in debug build 2018-03-15 17:50:09 +00:00
James Crook 0ad533a740 Automation -> Scripting. 2018-02-24 14:20:30 -05:00
James Crook 1d9477a455 SetClip, SetLabel, SetProject added
- SetTrack also updated with more options.
2018-02-24 14:20:24 -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 080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli e6e8e3251c Rewrite more Connect() with Bind(), which were type incorrect...
... though harmlessly so.  They called to nonstatic member functions of classes
with improper this pointers; though the functions did not use this.

Bind events to nonmember funtions instead.  Sometimes just to empty lambdas to
consume the event and ignore it, blocking other handlers.
2018-02-21 19:28:12 -05:00
Paul Licameli 151cbb1305 Follow wxWidgets argument conventions for other ctors 2018-02-21 19:21:03 -05:00
Paul Licameli ab5ff9060b More constructor arguments for RulerPanel 2018-02-21 19:21:03 -05:00
Paul Licameli c40b254626 while -> if 2018-01-26 10:12:14 -05:00
Paul Licameli 8e0cffb7f2 Simplify GuardedCall and default its return type to void 2018-01-13 01:32:41 -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 def1d52505 Substitute, don't concatenate, when composing localized strings...
... Avoid English syntax bias.
2018-01-04 04:30:46 -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 384300016d Define FileDialogWrapper, with localized default prompt and name 2018-01-01 17:50:04 -05:00
Paul Licameli af290d73c0 Define AudacityTextEntryDialog wrapper around wxTextEntryDialog...
... 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
Paul Licameli 378c96fda1 Consistently use translated effect name in titles of message boxes...
... For built-in and Nyquist effects.
2018-01-01 17:50:01 -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
Paul Licameli d3b1ae512b Effect param keys don't need to localize; audacity.pot can shrink...
... The keys are only ever used as internal identifiers in wxConfigFile
objects.  So they are often space-less and camel-cased.

I have noticed a couple instances of translators confused by these.
2017-11-05 11:48:15 -05:00
James Crook 68897d8932 Some cppcheck fixes by David Binderman 2017-11-04 17:47:39 +00:00
Paul Licameli a5aaaf5176 Bug1744: Switch flat EQ curve to linear and draw points correctly...
... Problems reported there were not consequences of my work in 2.2.0 on
envelopes, but existed in 2.1.3 also.
2017-09-16 12:27:56 -04:00
Paul Licameli cc3c56818a Bug1744: Editing of linear frequency scale EQ curve should work 2017-09-09 22:51:14 -04:00
James Crook ce9938787c Use alpha or released or local manual for "help on selection".
Previously this was hard coded to use the online alphamanual.
Some other help-on-errors paths were hardcoded to use the online manual, and did not use local help even if available, so these were changed too.

Also two naming changes in the code:
ShowHelpDialog() became ShowHelp() because it typically shows the help in your browser, only showing the help in a dialog under certain circumstances.
The helpURL parameter became helpPage since it is usually a page name that is then elaborated into a url.
The Link() function became InnerLink().

Some careful http -> https changes made too.
2017-08-25 13:59:16 +01:00
Paul Licameli 4a500c77dd Bug1636: fix Crash on OK selecting RIAA or Telephone Eq curve...
... Really two crashes, one in case Linear frequency scale is selected, the
other if Logarithmic.

Problem was introduced at commit 7d5e54e364
2017-07-14 11:18:29 -04:00
Henric Jungheim b3c0cbce29 wxToString() doesn't support "unsigned long long", so size_t doesn't work on Windows x64 builds. 2017-07-12 21:02:45 +01:00
Paul Licameli 9489fed04e build fix 2017-07-10 10:26:10 -04:00
Paul Licameli ada4b6307d Pass more context information into drawing routines 2017-07-09 12:34:27 -04:00
Steve Daulton e7a9c37745 Add help buttons for normal built-in effects 2017-05-20 14:49:07 +01:00
James Crook 09607c278d Fix position of wxASSERTs
Moved one ASSERT that was in the wrong place and added a new one.  This might give a little more information in mac debug builds about Bug 1636 - (Mac) Equalization: Crash selecting the "RIAA" or "Telephone" curves.  This is NOT a fix.
2017-05-07 19:22:44 +01:00
Paul Licameli e36070e671 Small fix to envelope operations in Equalization user interface 2017-05-07 11:12:07 -04:00
Paul Licameli 9c683a4f19 Rename some member functions of Envelope 2017-05-07 11:00:55 -04:00
Paul Licameli 4be19128c0 Better constructors for Envelope 2017-05-07 11:00:55 -04:00
James Crook 028ed19d90 Sync with DarkAudacity 2017-04-02 23:07:13 +01:00
Paul Licameli e1473dfe76 void return, not boolean success, from some Track virtual functions...
... The return codes were mostly ignored anyway, and exceptions will be thrown
instead.

It seems there was also confusion whether the return values of Track::Paste
and Track::SyncLockAdjust were to indicate success or indicate whether there
was any change.  No matter now.
2017-03-31 18:26:52 -04:00
Paul Licameli 6b84dc1c1d Factory methods will return non-NULL or throw 2017-03-31 18:14:29 -04:00
Paul Licameli 22a12c6852 Exception safety in: some effects and generators...
... Those that directly call WaveTrack functions in their Process() routines,
which might throw exceptions for disk space exhaustion.
2017-03-21 14:11:25 -04:00