1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-12 15:11:09 +02:00

817 Commits

Author SHA1 Message Date
Paul Licameli
5f27ae905c Changed misleading terminology in scrubber...
... It was confusing that HasStartedScrubbing() could be true
while also not IsScrubbing()
2018-07-29 14:20:11 -04:00
Paul Licameli
b33d3516f0 Rename a function in AdornedRulerPanel...
... Avoid confustion of "capture" meaning recording, with "capture" of the
mouse during drag
2018-07-29 14:18:08 -04:00
Paul Licameli
98a72acfb8 Remove unnecessary moves of return values 2018-07-24 21:25:22 -04:00
Paul Licameli
e432883dec Fix deprecation warnings with wxFont, wxPen, wxBrush ctors...
... Replace some enum constants with the equivalent values from the more
special-purpose enums, as the wx header files recommend, so overloading
selects the ctors with non-int arguments.

In a full rebuild of the debug project on Mac, this reduces the count of
warnings from 264 to 274.
2018-07-23 13:21:15 -04:00
James Crook
6325b443d6 Possible fix for Bug 42 (Timer Record does not stop, moonphase)
This possible fix is based on the idea that YieldFor is flaky, and is holding up events that we SHOULD process.
Therefore we process ALL events, not just some, and we do two yields, in case we are getting behind on the queue.
2018-07-22 20:13:15 +01:00
James Crook
2115e9b5ac Play at speed pop-up dialog changes speed dynamically too.
In fact all the slider pop up dialogs now dynamically change their parent's value.
2018-07-21 18:20:14 +01:00
Paul Licameli
70f27d41d3 Rewrite AdornedRulerPanel with one less friend 2018-07-06 21:11:48 -04:00
James Crook
356fdeba40 Show Pin/Unpin button in red, if recording. 2018-06-29 17:00:25 +01:00
James Crook
20178b15e1 Fix some 'declaration hides' warnings.
We were for example getting many of these:
\audacity\src\widgets\numerictextctrl.h(171): warning C4458: declaration of 'value' hides class member

MSVC2013 didn't warn about these, but MSVC2017 does.
2018-06-27 12:36:13 +01:00
Henric Jungheim
68b7330b69 Avoid MSVC trying to use wxTabTraversalWrapper's move ctor. 2018-06-26 06:53:47 -07:00
David Bailes
4221549ec9 NumericTextCtrl: fix minor bug with NVDA screen reader
Problem: with using up/down arrow NVDA reads the updated field twice.

Fix: remove generation of an unnecessary event.
2018-05-16 14:10:53 +01:00
David Bailes
a13e7191c4 Add an option to use a dialog to enter the name of a new label
Motivation:
1. The text boxes in the label track are not fully accessible for users of screen readers, and I don't think that they can be made to be fully accessible using the accessibility API used by wxWidgets. When such an edit box becomes the focus, this is not announced, and for NVDA users typed characters are not echoed.

2. Provides a work around for bugs 1778 (cannot type diacritics into text label), and 1804 (Windows: Labels do not accept IME (Chinese/Japanese) input).

Fix: Provide an option for a dialog for entering the name. The text box in the dialog is accessible for screen readers. On windows the text box receives wm_keydown and wm_char messages and so is a work around for bug 1804. Being a standard text box, it will presumably be a work around for bug 1778.

1. There is a new option in track behaviors: "Use dialog for the name of new label", which is off by default.

2. When using the commands "Add label at selection" and "Add label at playback position", when the dialog closes, focus is returned to the track which was the focus before the dialog opened. I think this is more convenient for users of screen readers.
2018-05-11 10:23:48 +01:00
Paul Licameli
a9e7a7e5d5 movable_ptr(_with_deleter) -> std::unique_ptr 2018-05-10 00:56:37 -04:00
Paul Licameli
b8a8712ba0 make_movable -> std::make_unique 2018-05-10 00:56:36 -04:00
Paul Licameli
7a0475e39f Remove most uses of AUDACITY_OLD_STD 2018-05-10 00:56:36 -04:00
Steve Daulton
0d5fb01c97 Can't call Fit() on (negative) wxDefaultSize
and SetSizeHints will call Fit()
2018-05-02 16:11:35 +01:00
James Crook
121fdc5703 Fix non-ASCII characters in wxLogDebug
The LogDebugs aren't needed now, as we can get the info via Scripting.
2018-04-15 15:09:15 +01:00
James Crook
933c86dce3 Draw slider background in correct colour on MixerBoard. 2018-04-15 13:46:03 +01:00
James Crook
35d24bbed5 Tweak spacing in vertical rulers.
This is most relevant in MixerBoard.
2018-04-15 11:48:51 +01:00
James Crook
5120a9dfc6 Fine tune spacing between minor ticks in rulers.
The main point of this is not to ask for overcrowded rulers.

We already handle overcrowded rulers well, by not showing the minor ticks.
This change means that we are more likely to ask for a spacing that works.
In turn that means that we are less likely to have anomalies where numbers disappear due to overcrowding and reappear again as you resize the ruler.
2018-04-14 15:44:56 +01:00
James Crook
8344a2bae9 Bug 1867 - Jumping numbers on meter resizing
They jumped because of overcrowding.  Now when overcrowded, don't show
any minor numbers.
2018-04-13 19:26:56 +01:00
James Crook
5fd1f7e606 Bug 1866 - Mac: Sliders have black backgrounds when building on wx3.1.1
Also fixes flicker of sliders on dragging the slider.
2018-04-13 17:24:02 +01:00
James Crook
7178879397 Flicker-Free Grabbers and Mic/Speaker icons.
Previously we were clearing in Erase Background, giving lots of flicker when resizing some toolbar.
Also fixed a mac Slider background painting issue.
2018-04-13 09:48:20 +01:00
James Crook
8ff80bde11 Bug 262 - Enh: Mixer Board: Track strip and border colours to match those in current TrackPanel 2018-04-12 14:45:08 +01:00
David Bailes
0e25f65eb4 Modification to fix for Bug 875 - NumericTextCtrl
Modification to commit 7ab4b8c. The first non-zero digit only becomes the focus on the first visit to the control. On subsequent visits, the focus is the previous focus. Example use case: modifying start and end times by a tenth of a second. The user can move between the controls without loosing his "place".
2018-04-12 11:46:08 +01:00
James Crook
7ab4b8c6df Bug 875 - First character is highlighted when tabbing into TimeText controls, not first non-zero character. 2018-04-09 15:51:18 +01:00
James Crook
98bbb3436d Fix sizers in WarningDialog
AddUnits is only allowed in a HorizontalLay or MultiColumn.
EndVerticalLay was missing.
2018-04-08 19:51:09 +01:00
James Crook
b60fae4470 Fix some warnings on mac
These are mostly missing 'overrides'
2018-04-07 20:28:27 +01:00
James Crook
c0e1c82be9 Add missing files to Mac build.
Also moved the constructor into the .cpp file, so that wxWindow is a fully defined class.
2018-04-04 14:14:59 +01: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
James Crook
1f0061ba79 Fix sizing bug in InfoDialog (misuse of wxALIGN_BOTTOM) 2018-03-31 21:08:16 +01:00
James Crook
4ae394ff5e Fix some warnings (MSVC) 2018-03-31 19:47:16 +01:00
Paul Licameli
0fb02a8024 IdentInterfaceSymbol in NumericTextCtrl; don't persist translated 2018-03-28 14:00:17 -04:00
James Crook
545102b168 Bug 1680 - Pan / Gain dialog sliders do not update on text entry 2018-03-25 18:02:14 +01:00
James Crook
d5a2e3af2e Bug 616 - First ampersand in file name removed from File > Recent Files and import dialogues 2018-03-25 16:28:27 +01:00
James Crook
8ce8e7bcce Bug 521 - Lower half of Waveform (dB) vertical scale does not show dB level.
Added a DbMirrorValue for two sided dB scale on Waveform VRuler when in dB view mode.
2018-03-24 20:35:08 +00:00
James Crook
a47df37ea4 Bug 1533 - Selection in label track offset from selection in audio Track
The problem was actually more general, and involves misalignment between selections
in clips and selections in the background and in the ruler - so could be seen with just
audio tracks and no label tracks.
2018-03-17 19:17:53 +00:00
Paul Licameli
9b7ccc4dff Use TranslatedInternalString for tips of toolbar buttons 2018-03-15 20:13:19 -04:00
James Crook
fb8b797d63 Layout changes
- Progress bar now less likely to obscure a small window that invokes it.
- Check boxes grouped together in TrackPrefs
2018-03-03 12:53:41 +00:00
James Crook
8991fe7521 Fix incorrect https and translation markings.
- DarkAudacity website does not support https, so don't specify https in strings.
- Don't translate text about DarkAudacity.
2018-02-26 14:09:07 +00:00
Paul Licameli
e5052a1973 Use a type distinction for key strings in normalized form...
... Such are not for display to the user.  They are appended to menu item
names to identify accelerators, and wxWidgets transforms them appropriately
for the operating system.
2018-02-25 14:56:17 -05:00
James Crook
e3ef968d57 Add DragCommand. Default Y/N on optional fields. Open/Save project items.
- More Y/N in Optional, making it easier to omit parameters.
- AT removed from Envelope, since T already gives it.
2018-02-24 14:20:29 -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
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
de568fc111 Avoid some needless repaints of AButton 2018-02-21 21:43:04 -05:00
Paul Licameli
3b32d39b54 Remove wxArrays of pointers 2018-02-21 19:33:32 -05:00
Paul Licameli
8be1e8fdad Remove wxArray(Int|Long|Double) except where wxWidgets fns need it 2018-02-21 19:33:31 -05:00
Paul Licameli
080dd34e61 Get rid of wx object arrays, use std::vector 2018-02-21 19:33:27 -05:00
Paul Licameli
2fbe04eda0 Replace more Connect with Bind; needed redeclaration of custom events 2018-02-21 19:30:40 -05:00