Commit Graph

49 Commits

Author SHA1 Message Date
Paul Licameli
0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04:00
Paul Licameli
2a08a3cc07 Fix windows build...
Defaulted move constructors and assignments introduced at 080dd34 are not
essential but might give a bit more efficiency in std::vector on non-Windows.

Previous compilation fix was incorrect!  Excpliticly defined move assignments
should not have had no-effect bodies!
2018-02-22 12:32:53 -05:00
James Crook
2ece1acae9 Fix build
These changes needed to build on MSVC 2013.
2018-02-22 17:19:14 +00:00
Paul Licameli
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
8625df6814 More NumericTextCtrl constructor options 2018-02-21 19:21:02 -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
4d978bcefb Use wxPrintf not printf 2017-12-16 11:54:32 -05:00
Paul Licameli
08d63aa361 Fix roundoff bug in NumericTextCtrl 2017-11-19 11:04:08 -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
Paul Licameli
6a8bba0a99 Fix all remaining misuses of macro _ in static initializers...
... I found them using a rewritten macro _ that dynamically checked
that translations have been initialized.  But I do not commit that changed
macro.
2017-10-01 17:20:05 -04:00
Paul Licameli
761bd6bf83 Translation of time, frequency, and bandwidth format names 2017-09-07 19:42:22 -04:00
James Crook
354b17394f Add back units have coloured backgrounds.
This was broken by a theming change for HiContrast.
2017-04-26 22:33:12 +01:00
James Crook
80928bfe61 Increase upper limit for KHz format in spectral selection toolbar. 2017-04-16 18:51:42 +01:00
James Crook
a868d0c118 Add Hi-Contrast Theme 2017-04-10 12:09:38 +01:00
Paul Licameli
5036583549 Fewer inclusions of AudacityApp.h 2017-03-17 17:52:24 -04:00
David Bailes
f296c768d5 Fix for bug 1542 - setting of radio buttons in Selection bar
Problem: On Windows, if you set the "length" radio button in the selection bar, then tab round to it, this sets the "end" radio button.

This was caused by commit 7e49dc4.
The fix is to restore the previous code just for Windows.
2016-11-03 13:59:04 +00:00
Paul Licameli
f993f1eadf Regularize casts as (int), so they are easier to find and review 2016-09-20 08:42:11 -04:00
Paul Licameli
78be459fa1 Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the
conversions to float and double are simply conveniences.

Conversion from floating is explicit, to avoid unintended consequences with
arithmetic operators, when later sampleCount ceases to be an alias for an
integral type.

Some conversions are not made explicit, where I expect to change the type of
the variable later to have mere size_t width.
2016-09-15 21:02:31 -04:00
James Crook
65c7e8051a ThomasFeher - Unused parameters clean up. 2016-09-11 20:31:49 +01:00
Paul Licameli
6043638e31 Another std::min, more auto & decltype, remove more casts 2016-08-29 20:07:43 -04:00
James Crook
5d0951c643 Bug 1497 - Time controls not accepting direct typed input
Caused by optimisation of NumericTextCtrl::ValueToControls().  It now only updates on a change, and because mValueStr was being updated without calling value to controls, the string was not being identified as having changed.
2016-08-25 11:33:59 +01:00
Paul Licameli
1189cfd62a Identify the few unsafe narrowing conversions from sampleCount...
... I believe this list of four places is exhaustive.

There are many, many more safe narrowings that I examined.

This resulted from changing the definition of sampleCount in my builds so that
narrowing conversions failed to compile without some fixes, and I examined and
fixed every place.

The rest of that work is not yet shared.
2016-08-21 15:28:32 -04:00
Paul Licameli
1cad18c479 Merge pull request #150 from RaphaelMarinier/optimize_selection_bar_update_master
Optimize the refresh of the selection bar while Audacity is playing.
2016-08-15 22:04:42 -04:00
Paul Licameli
71efb13161 Remove some naked new amd delete in: widgets 2016-08-08 07:51:26 -04:00
Raphaël Marinier
6a313a35bf Optimize the refresh of the selection bar while Audacity is playing.
This saves 3-4% CPU while Audacity is playing on Linux/64bits. This is
done by avoiding the update of NumerixTextCtrls that stay unchanged.
2016-07-28 00:12:32 +02:00
Paul Licameli
c3b4ea165f Bug1428: Don't make negative label start time from label edit dialog 2016-06-27 17:40:49 -04:00
Paul Licameli
db137ddf76 wxWindow takes ownership of its wxAccessible, so we can use safenew. 2016-05-06 21:03:37 -04:00
Paul Licameli
7824e94030 Harmlessly qualify classes as final (or explicitly comment not)...
... Should have no effect on generated code, except perhaps some slight faster
virtual function calls.  Mostly useful as documentation of design intent.

Tried to mark every one of our classes that inherits from another, or is a
base for others, or has abstract virtual functions, and a few others besides.
2016-02-24 20:58:30 -05:00
Paul Licameli
2efa24bc10 Sweep unnecessary wxString copies: widgets 2016-02-22 21:30:04 -05:00
Paul Licameli
7c4c45a0d5 "new"->"NEW" in comments, easier to find remaining naked operator new 2016-02-14 18:52:41 -05:00
Leland Lucius
1f6ba9160c Fix ghost image on track panel for real this time 2015-08-19 15:37:52 -05:00
Leland Lucius
7e49dc45d1 Fix some tabbing issues on Linux 2015-08-04 22:22:49 -05:00
Paul Licameli
910e7f87bd Spectral selection toolbar refinements
Delete key in center/width spectral selection toolbar works
  Delete key, not - key, in the spectral selection bar maks frequency undefined.
2015-07-29 12:11:49 -04:00
Paul Licameli
360a33454e Delete key, not - key, in the spectral selection bar maks frequency undefined. 2015-07-29 11:55:48 -04:00
Leland Lucius
37168ebbf6 Merge remote-tracking branch 'upstream/master' into wx3 2015-07-28 15:06:25 -05:00
Leland Lucius
5bdfcff97d Menu shortcut hiding has been removed
It had been causing problems in Unity for a while now and they
were missing on OSX as well in wx3.  So, the old menu Open/Close
method of hiding has been removed and replaced with an event
filter/monitor which looks for wxEVT_CHAR_HOOK events to pass
key events to the handler that has the keyboard captured.
2015-07-28 14:35:09 -05:00
Paul Licameli
f81231efae Remove Sequence.h from other headers 2015-07-28 10:02:08 -04:00
Steve Daulton
5f164649c3 Fix build error on Linux.
Header file <limits> required for std::numeric_limits
2015-07-26 17:24:31 +01:00
Paul Licameli
7f7506dbcd Bugs 895, 1048: Now typing '-' can set upper or lower frequency to undefined 2015-07-25 14:41:44 -04:00
Paul Licameli
cf9851c313 Bug 891: Changing low or high frequency in spectral selection toolbar...
... will not change the opposite bound, but will instead be constrained by it.
2015-07-25 11:41:52 -04:00
Leland Lucius
62491cb769 Fix assertion due to adjustment value being zero
wx3 on OSX has changed how the mouse wheel delta is calculated.  Prior
to wx3, it was simply set to 1 so the wheel rotaion value was simply
increments of one.

With wx3, higher resolution devices (like touchpads) are supported so
the value for wheel rotation can be a fraction of the delta, so it is
possible to pass a zero value to the NumericConverter::Adjust() method.
Therefore, the method just returns in this case.
2015-07-18 20:19:04 -05:00
Daniel Winzen
428f5c8391 Fix 3 uninitialized variable uses 2015-04-30 09:06:37 +02:00
Paul-Licameli
7d6de21e3a Enh809 - Add persistency of spectral selections, including those in labels 2015-04-10 15:20:50 -04:00
stevethefiddle@gmail.com
3e3701954a Fix - Spectral Selection Toolbar units. 2014-12-19 18:45:27 +00:00
lllucius@gmail.com
db5118255b Fix for bug #759
See bug for more info
2014-12-14 16:01:21 +00:00
lllucius
556a425467 Fix for bug #777...OnKeyUp was not being called 2014-12-04 07:40:29 +00:00
stevethefiddle@gmail.com
1dfbe5974e Apply Leland's Read Only Numeric Text Control to Change Speed effect. 2014-11-23 22:54:24 +00:00
james.k.crook@gmail.com
649315c644 From: martin@steghoefer.eu [patches 0017 and 0018] Fix compilation problem with wxWidgets 3.0:
0017: Encapsulation of reference type returned by wxString::operator[]
0018: Interface change for classes deriving from wxGridTableBase


0017
----
The NumericTextCtrl relies on the fact that the value returned by
wxString::operator[] is a "wxChar&". However, in wxWidgets 3.0 it is a
wxUniCharRef (encapsulation of a reference to characters, to improve unicode
handling).

wxString::reference provides the correct type in both wx2.8 and wx3.0 and can be
used as writable reference in both cases. However, for the case of an update of
the reference itself (instead of the value), there is no common syntax. In this
case the character position within the string has to be used as reference.

0018
----
With wx3.0, different methods have to be implemented (EndEdit with new signature
and ApplyEdit) than with wx2.8 (only EndEdit with old signature). Now both
versions are implemented in parallel in the classes TimeEditor and ChoiceEditor
(one version essentially being a wrapper of the other one).

Note: Superseding the previous solution of the issue (committed in r13403) by one
that avoids code duplication. This should avoid problems with missed changes in
code that isn't used with the wxWidgets version that the developer tests with
(like just happened in r13557).
2014-11-10 19:28:17 +00: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