Commit Graph

67 Commits

Author SHA1 Message Date
dofuuz
060885c4f6 Changes to Spectrogram color scheme user-visible strings because of string freeze 2021-06-15 12:41:44 -04:00
dofuuz
e9f0590c28 Add spectrogram preference migration from old 'Grayscale' checkbox to new 'Color Scheme' choice 2021-06-15 12:41:44 -04:00
dofuuz
474f05d414 New colormap for Spectrogram
- Add color scheme preference

Add 'Spectro. Color scheme' to 'Set Track Visuals' macro command
2021-06-15 12:41:44 -04:00
Paul Licameli
c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli
9d6cfcc746 WaveTrackView::BuildSubViews can be simplified...
... The setting of scale type now happens in the default constructor of
WaveformSettings, which calls LoadPrefs.

Since creation of WaveformSettings is always forced, we don't need the
distinction between WaveTrack::GetWaveformSettings and
WaveTrack::GetIndependentWaveformSettings.

That distinction was more analogy with the handling of SpectrogramSettings that
we don't need now.
2020-10-10 11:27:06 -04:00
Paul Licameli
c7896a3656 Bug2493, Enh2460: Multi-view option in Tracks preferences & macros...
... Implemented giving the Multi-view choice the special implementation that it
needs.

The "multi" choice is always last in the preference and in the command editing
drop-down menus, but that could be changed.

Multi-view should not be treated as another registered kind of sub-view on par
with others.  This would complicate the implementation in worse ways.
2020-09-10 15:28:28 -04:00
Paul Licameli
4d09705a73 Change XO to XXO in many more places, with no effects at all...
... because the two macros have the same expansion, and are both checked for
in the --keyword arguments passed to msgfmt by locale/update_po_files.sh.

This commit makes ONLY such changes, and comments in Internat.h.  It is big
but quite harmless.

The intention is to introduce a type distinction in a later release, by defining
XXO differently.  XXO is used where & characters in strings (for hotkeys of menu
items or control prompts) are permitted, XO where not.
2020-05-22 13:07:50 -04:00
Paul Licameli
2522459637 Each command class registers itself 2020-01-19 19:21:12 -05:00
Paul Licameli
0ca5775234 Eliminate one of the ## macro hacks in LoadCommands 2020-01-19 19:21:12 -05:00
Paul Licameli
2ec2ad378d Break dependency cycle introduced at a69fba9 2020-01-19 14:36:28 -05:00
Paul Licameli
36aad4d1c6 Don't hard-code the exhaustive list of sub-view types...
... in Wave track context menu and SetTrackVisualsCommand

Instead, discover them through a registry.

This eliminates some duplication of string constants and prepares for
non-intrusive generalization to more kinds of sub-views.

This makes the command agnostic about which subview types are known, but the
context menu still has special case treatment for Spectrogram Settings and
Wave Colors.
2020-01-18 20:26:12 -05:00
James Crook
1176b61953 Wording changes, per wiki:
https://wiki.audacityteam.org/wiki/Wording
2020-01-10 17:02:31 +00:00
Paul Licameli
83f7bc6b5c Eliminate some uses of GetActiveProject...
... where there was already a project at hand
2020-01-02 13:15:14 -05:00
Paul Licameli
747c35645a TranslatableString for checkbox captions 2019-12-23 19:15:34 -05:00
Paul Licameli
6b235bdec5 TranslatableString for captions of sliders 2019-12-23 19:02:21 -05:00
Paul Licameli
5168d62e3d TranslatableString for captions of text entry boxes 2019-12-23 18:53:00 -05:00
Paul Licameli
21e7b9f2de TranslatableString for prompts of choice controls 2019-12-23 15:39:49 -05:00
Paul Licameli
75996a851c ShuttleGui::AddChoice and TieChoice take TranslatableStrings 2019-12-23 15:35:47 -05:00
Steve Daulton
d6768f9112 Increase maximum for scripting track height 2019-07-22 19:36:50 +01:00
Paul Licameli
6ccca16a75 Move display type from WaveTrack to WaveTrackView 2019-07-09 20:09:59 -04:00
Paul Licameli
acfd2b7010 TrackFocus is a new attached object...
... removing the need to use TrackPanel to get and set the focused track

ProjectAudioManager loses its direct dependency on TrackPanel
2019-07-03 19:10:21 -04:00
Paul Licameli
a6e2ca0aa8 Move some enums into new files WaveTrackViewConstants.* ...
... freeing TracksPrefs from the second largest s.c.c. which is now only 20
2019-06-22 21:46:32 -04:00
Paul Licameli
66e32ca35d Move Y position, height, and minimized state into TrackView...
... and eliminate some unnecessary calls to SubstitutePendingChangedTrack,
because the track and the substitute store Y and height in their shared
TrackView object.

Also make GetMinimizedHeight() virtual to avoid inclusion of TrackPanel.h in
TrackView.cpp.
2019-06-18 16:01:06 -04:00
Paul Licameli
d1ad8f55e0 static TrackPanel::Get()...
... not member functions of AudacityProject
2019-05-24 15:46:30 -04:00
Paul Licameli
14ab93a01f static TrackList::Get()...
... not member function of AudacityProject
2019-05-23 12:58:47 -04:00
Paul Licameli
9eb9104859 Remove CommandContext::GetProject() ...
... which called ::GetActiveProject(), but one purpose of the CommandContext
class was to eliminate many uses of that global function, because a
CommandContext must always be constructed from a reference to a project
(which was always in fact the active one), then passed around to where it is
needed!

Also, just use the project member directly -- because CommandContext was
intended as just a P.O.D (plain-old-data) structure.

This also eliminates a dependency of CommandContext.cpp on Project.cpp.

This is not enough by itself to break any dependency cycles.
2019-05-18 20:31:17 -04:00
Paul Licameli
6c57948d8f Remove unnecessary #include-s from .cpp files...
... Unnecessary because transitively included.

But each .cpp file still includes its own .h file near the top to ensure
that it compiles indenendently, even if it is reincluded transitively later.
2019-05-16 17:21:00 -04:00
James Crook
c0235f7f70 Fix mute and solo not working from scripts 2019-04-11 21:19:41 +01:00
Paul Licameli
173a300427 Include nothing before Audacity.h, as comments say we should...
... and remove some duplicated inclusions
2019-03-17 21:41:39 -04:00
Paul Licameli
3ff61f3e10 Remove Shuttle.h from other headers 2019-03-17 15:03:05 -04:00
Paul Licameli
dd86346156 ShuttlegGUI: const wxArrayStringEx & arguments, not wxArrayString *...
... for choice, combo, and listbox; reference allows passing temporaries,
eliminating need for some variables to hold the string arrays.
2019-03-16 07:17:21 -04:00
Paul Licameli
dfeb7e18aa Type aliases for some uses of ComponentInterfaceSymbol...
... to be replaced later with distinct types

Also changing FamilyId => Family in function names

Also NumericFormatId => NumericFormatSymbol
2019-03-14 17:26:20 -04:00
Steve Daulton
520659f0de Update VRulers after macro vzoom command 2018-11-12 01:37:11 +00:00
Steve Daulton
277473f0de Add min and max VZoom to SetTrackInfoCommand 2018-11-11 16:57:36 +00:00
James Crook
466e9c179e Create ComponentInterface
It combines the old IdentInterface with the ParamsInterface, providing an identifier and parameters (if needed).
The main purpose of the change is to make the class hierarchy (as viewed via doxygen) much easier to follow.
2018-11-02 17:04:43 +00:00
Paul Licameli
297f3b4d84 Fix another mistake in iteration over channels in src/commands 2018-10-11 21:40:38 -04:00
Paul Licameli
c7ab9f2338 Rewrite many iterations over tracks and channels in src/commands 2018-10-01 11:24:37 -04: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
81dd580c57 Pass array and count separately to read/write/define enum 2018-03-27 07:51:43 -04:00
James Crook
872eec6142 Make finer gradations on SetTrack sliders
Also use log scale for Gain
Also fix unused parameter warnings
Also Gain before Pan.
2018-03-23 22:20:59 +00:00
James Crook
2f89c57b18 Fix defaults for unchosen optional values.
Previously when using a scriptable via dialog the unchosen optional values from the dialog were still being used.
Now unchosen options are reset to their default values, if they would be used.
2018-03-22 19:19:59 +00:00
James Crook
0a7d0068ec Use track selection for SetTrack, SetClip and SetEnvelope
These commands now have shorter dialogs.
Also fixed SetEnvelope optionals, which were not being honoured.
2018-03-19 16:09:24 +00:00
James Crook
2c57cd4344 Format dialogs more evenly. 2018-03-18 20:05:27 +00:00
James Crook
e978840044 Remove 'Set' from optional items.
This removes the text saying 'Set' beside an optional item.
It's a more far reaching change, as it allows the optional items to be
aware they are optional, paving the way for future nicer presentation.
2018-03-18 20:05:10 +00:00
James Crook
913bd6f187 Split SetTrackCommand into three dialogs. 2018-03-18 19:08:15 +00:00
James Crook
e6a9bd70a2 Fix SetTrack for stereo tracks.
Stereo tracks have selection on both channels.  Both must be set or cleared.
We also need to explicitly remove focus, if it was set.  Code was only setting it.
2018-03-17 19:17:55 +00:00
Paul Licameli
bc773e02d3 Supply some missing translation in Macros dialogs...
... The "Set" prompt for checkboxes;

Strings in Choice controls, which had been declared translatable with XO, but
the translations not yet used.

This can be tested in Ukrainian locale now, for editing parameters of
commands like Select or Drag, but be aware that even uk.po is not up to date
for all recent changes in the Manage Macros dialog itself.
2018-03-07 15:06:55 -05:00
andheh
87eaaa6f45 fixing strict-aliasing rule violations by passing enum types as int references 2018-03-06 21:30:39 +00:00
James Crook
fa49d94530 Script work
Add Envelope script
Add Clips and Boundaries Scripts.
Add docimages_oddments.py for the weirder cases.
Add make html script.
Add more spectral images
Add Dark versions of spectrograms (paul's comment)
Clean up oddments script.

- This commit also adds an option NOT to bring Audacity to the top when screenshotting.
-- That's because QuickPlay will disappear if you do -because you lose mouse capture.
- Also allow negative window IDs in the drag command.

- Registration names of align commands sorted.  They had &, : and / in them.
- Fixed bug in SetTrackInfo where bFocused was being ignored
- Fixed bug where command manager ignored multi-commands.
- Commit docimages_oddments.py again, to fix line endings.
2018-02-24 14:20:29 -05:00