Commit Graph

63 Commits

Author SHA1 Message Date
Paul Licameli aee4005044 Rewrite many iterations over tracks and channels in src/effects 2018-10-01 11:24:04 -04:00
David Bailes 526606fc29 Fix more accessibility names after the move to wx 3.1.1
This is a follow up to commit f9ee3cd.
2018-04-10 13:43:50 +01:00
Paul Licameli 0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04: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 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 5724780be9 NumericTextControl ctor arguments...
... follow wxWidgets conventions for first two arguments; add Options
2018-02-21 19:21:02 -05:00
Paul Licameli 6f7739464e Fix line endings 2018-01-06 20:15:51 -05:00
James Crook d2fe7b1757 Clean up most remaining MSVC warnings. 2018-01-06 13:03:48 +00: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 e0970ad1e8 Remove unnecesary Format, Printf, casts to wxString 2018-01-01 21:53:51 -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 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
James Crook 61e321fd43 Bug 1654 - Enh: Analyze Contrast and Plot Spectrum don't have the new "Help" button 2017-08-14 23:10:06 +01:00
Paul Licameli 5d48e96942 Where FileSelector was used, default to Documents not cwd; save prefs 2017-08-03 08:02:33 -04:00
Paul Licameli e66028de0a Eliminate "Average RMS" redundancy in messages from Contrast...
... also gathered various formatting into some routines.  Should we regularize
the messages further?  That is, consistently put "dB" before or after "RMS"

Also added more i18n-hint comments
2017-05-12 16:06:18 -04:00
Paul Licameli 70d9e4bdc7 GetMinMax, GetRMS functions take a mayThrow argument, return numbers 2017-03-21 14:19:02 -04:00
Paul Licameli 5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
James Crook b44ad7cd71 More unused parameters. 2016-09-11 20:52:04 +01:00
James Crook 65c7e8051a ThomasFeher - Unused parameters clean up. 2016-09-11 20:31:49 +01:00
Paul Licameli 79c79f9cd3 Remove many mentions of sampleCount with auto and decltype...
... This makes much code agnostic about how other things (functions and
arguments) are typed.

Many of these neeed to become size_t instead of sampleCount.
2016-08-24 14:50:45 -04:00
Paul Licameli 84c0337aba Fix TAB key navigation on Mac for all dialogs (not only for panels) 2016-07-10 17:12:27 -04:00
Steve Daulton 03915b4438 Fixes to Analyze Contrast
Now supports stereo tracks. Several tweaks to error messages,
validation logic, and accuracy improvements.
Includes a fix for summary64K (incorrect rms drawn on zoomed
out waveform).
2016-06-21 22:07:50 +01:00
Steve Daulton 141e6cb40b Fix bug 1361
Make time controls read-only.
2016-06-15 19:32:15 +01:00
Benjamin Drung a20d7898f3 Fix redeclaration of isinf()
Commit 9e78a41 declared isinf() as std::isinf(), because isinf() was not
declared on Ubuntu 16.04. But now the builds fail on Ubuntu <= 15.10,
because isinf() is declared there:

effects/Contrast.cpp:61:12: error: ‘constexpr bool std::isinf(double)’ conflicts with a previous declaration
 using std::isinf;
            ^
In file included from /usr/include/features.h:364:0,
                 from /usr/include/assert.h:35,
                 from /usr/include/wx-3.0/wx/debug.h:14,
                 from /usr/include/wx-3.0/wx/defs.h:695,
                 from /usr/include/wx-3.0/wx/event.h:14,
                 from /usr/include/wx-3.0/wx/window.h:18,
                 from /usr/include/wx-3.0/wx/nonownedwnd.h:14,
                 from /usr/include/wx-3.0/wx/toplevel.h:20,
                 from /usr/include/wx-3.0/wx/dialog.h:14,
                 from effects/Contrast.h:12,
                 from effects/Contrast.cpp:13:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:201:1: note: previous declaration ‘int isinf(double)’
 __MATHDECL_1 (int,isinf,, (_Mdouble_ __value)) __attribute__ ((__const__));

Thus use std::isinf() directly instead of declaring isinf() as
std::isinf().
2016-05-16 13:33:22 +02:00
Benjamin Drung 9e78a41faf Use std::isinf() instead of isinf()
Audacity fails to build on Ubuntu 16.04 with g++ 5.3.1 (using C++11),
because isinf() is not defined. Thus use std::isinf() instead.
2016-05-15 09:04:35 +02:00
Steve Daulton 85bd752de7 Fix for bug 1364 2016-03-24 15:49:46 +00:00
Steve Daulton ff6a82ae8c Goodbye to magic number in Contrast.cpp
Also added several TODO and FIXME comments for ongoing fixes.
2016-03-24 13:05:03 +00:00
Steve Daulton 4b070725f1 Fix for bug 512 2016-03-24 13:05:03 +00:00
Steve Daulton 7464f49a66 Fix for bug 513 2016-03-22 00:45:48 +00:00
Paul Licameli dbaa811577 Stack-allocate where possible! ...
... Removed many unnecessary naked news and deletes.
2016-02-17 18:15:57 -05:00
Paul Licameli df6a7c5464 More uses of safenew for classes we derive from wxWindow classes...
... Also removed some unnecessary deletes of widgets that are managed by parent
windows
2016-02-14 20:39:28 -05:00
Leland Lucius 37168ebbf6 Merge remote-tracking branch 'upstream/master' into wx3 2015-07-28 15:06:25 -05:00
Paul Licameli cab89f6fb4 Remove Envelope.h from other headers 2015-07-28 10:02:09 -04:00
Steve Daulton df8ddde874 Added dB - linear amplitude conversion macros. 2015-07-24 21:59:34 +01:00
Leland Lucius 3fe146f306 Merge remote-tracking branch 'upstream/master' into wx3 2015-07-19 18:00:02 -05:00
Paul Licameli e70f91c64e Removed ShuttleGui.h from other headers 2015-07-19 12:31:03 -04:00
Leland Lucius 9b9c8cc073 Round 5 of wx3 changes
FileDialog now complete on Linux.  Needs some fine tuning on
Windows and OSX.
Builds with wx3 and gtk2 or gtk3.
Still more effect work to do.
2015-07-14 23:33:53 -05:00
Leland Lucius 0ef7ccb1d1 Fix permissions...not sure why this was happening though 2015-05-29 19:49:28 -05:00
Leland Lucius cd11ddea43 Fix bug #883 2015-05-24 06:24:27 -05:00
David Bailes 66084b65ef Changes to a number of dialogs so that the nvda screen reader can read their titles. The accessibility name of the dialog is set to the title of the dialog. 2015-05-16 09:35:21 +01:00
Leland Lucius 513256854e Fix for bug #906 2015-04-27 20:28:41 -05:00
Leland Lucius 8fbfa460c4 Migrating the remaining effects
This brings the builtin, LV2, and VAMP effects inline with the
Audio Units, LADSPA, and VST effects.  All effects now share
a common UI.

This gives all effects (though not implemented for all):

User and factory preset capability
Preset import/export capability
Shared or private configuration options

Builtin effects can now be migrated to RTP, depending on algorithm.
LV2 effects now support graphical interfaces if the plugin supplies one.
Nyquist prompt enhanced to provide some features of the Nyquist Workbench.

It may not look like it, but this was a LOT of work, so trust me, there
WILL be problems and everything effect related should be suspect.  Keep
a sharp eye (or two) open.
2015-04-16 23:36:28 -05:00
james.k.crook@gmail.com 67d2b274e2 Frequency Selection toolbar from Paul Licameli.
Linux/Mac will need new files adding to project, SpectralSelectionBar.cpp, NumericTextCtrl.cpp.
2014-11-08 15:18:43 +00:00
RichardAsh1981@gmail.com 7bf8f2021e commit Gale's patch to consistently use RMS for Root Mean Square values in the UI. Fixes bug 767 2014-10-10 21:18:18 +00:00
lllucius bdcefb4850 Preliminary changes for wxWidgets 3.0.1
We can't go to 3.0.1 yet as there are still build issues on
Linux and OSX.  You can get Windows to build, but there's
still some display issues.

These changes should work with wxWidgets 2.8.12 as well, so
we can take our time to get things working properly before
switching over.
2014-10-06 08:10:50 +00:00
james.k.crook@gmail.com f5e593cc4c Paul L's new SelectedRegion class replacing use of t0 and t1. Also LabelTrack.h no longer in TrackPanel.h includes.
This change is believed to be a direct refactoring that does not change functionality.  It paves the way for more complex kinds of selection, such as selections involving frequency as well as time.  It also reduces risk of left and right edges being swapped in future code using SelectedRegion, as the default is to swap on assignment if needed.
2014-10-05 17:10:09 +00:00
RichardAsh1981@gmail.com 6605ac07e2 redirect Help button to Audacity documentation, using new infrastructure. Based on a patch from Steve the Fiddle 2014-06-09 19:56:25 +00:00