Commit Graph

74 Commits

Author SHA1 Message Date
Paul Licameli dd10e00a2d New attached structure ProjectSettings stores rate, snap-to, et al. 2019-06-02 14:42:00 -04:00
Paul Licameli b5a57682b6 static ViewInfo::Get() and ZoomInfo::Get()...
... not member functions of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli 14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04: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 0b160faecc Fix more cases of controls in static boxes that don't use ShuttleGui...
... as in commit f7644c7
2019-03-28 11:59:14 -04:00
Paul Licameli 1bcb7c20a5 Remove some nested #include from Project.h 2019-03-16 13:09:54 -04:00
Paul Licameli 50074f2cfe Replace comparisons against "" with empty() 2019-03-14 13:23:41 -04:00
Paul Licameli d3316173b6 Fix unwrapped wxMessageDialog, small mistake in aee4005 2019-01-29 13:03:50 -05:00
James Crook e20a98588c Replace pointless looping by 'if'
The for loop was only to test if *some* track was selected, and its body only needs to be executed once.
Note that an empty IteratorRange is false and one with something in it is true.
2018-10-11 12:04:43 +01:00
James Crook 657159d542 Fix C4189 and C4100 Warnings
C4189 is 'Local variable initialised but not used'
C4100 is 'Unreferenced parameter'

Fixed some other warnings, e.g. about empty if, too.
2018-10-10 19:46:24 +01:00
Paul Licameli 14fe11f4d4 Bug2008: There was error in stereo Contrast calculation, at aee4005 2018-10-07 10:29:58 -04:00
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