1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-12 14:47:43 +02:00

11669 Commits

Author SHA1 Message Date
Paul Licameli
ff2d20f335 Fix identifier string for new experimental command 2020-01-29 12:23:43 -05:00
Paul Licameli
ef41b8f2ee Fix static initialization order problem for more ReservedCommandFlags 2020-01-29 11:24:25 -05:00
Leland Lucius
25afa10bc4 Adding "autogen" to reduce false failures 2020-01-28 19:27:37 -06:00
Paul Licameli
873d067e74 CommonCommandFlags does not depend on LabelTrack 2020-01-28 17:49:28 -05:00
Paul Licameli
9093364b8c Fix other problems since commit f6e5696...
... Problem with static initialization order of ReservedCommandFlags, caused
wrong enablement of menu items (at least on Mac), such as Plot Spectrum or
Contrast enabled when there was no selection
2020-01-28 17:49:07 -05:00
Paul Licameli
3c9cd7925a Fix crash on Linux startup since commit f6e5696 2020-01-28 17:39:40 -05:00
Paul Licameli
c44f2cf755 Improve registry visitation procedure so it doesn't require a project...
... though the specific visitations for Menu items (the only ones that exist
now) still do require a project, to construct the visitor.
2020-01-26 17:31:06 -05:00
Paul Licameli
103a6050a0 Registry::Visit doesn't require an AudacityProject 2020-01-26 16:22:49 -05:00
Paul Licameli
c7bfa7a2a6 Parametrize ComputedItem::Factory by the type of argument it expects 2020-01-26 16:22:02 -05:00
Paul Licameli
bbccce4386 More rework of the class hierarchy of Registry items 2020-01-26 16:20:15 -05:00
Paul Licameli
cd907ad80d Generalize menu tree visitation beyond populating of menus...
... and apply it to implement a new alpha-only command, that dumps the menu
tree as text
2020-01-25 15:21:29 -05:00
Paul Licameli
27ffd9c8fb Implement alpha-only diagnostic command to dump the menu tree...
... This demonstrates the possibility of visitation of the menu tree specifying
other actions.

This dumps the internal path identifiers of the registry -- not the user visible
names.

Note that lines don't exactly correspond with menu items, where there are
command groups such as Align, or special steps such as population of the
recent files sub-menu.

Perhaps this should be adapted as another case of the GetInfo macro command.
2020-01-25 15:10:02 -05:00
Paul Licameli
356e5d545e Define abstract Visitor for menu items, and concrete subclass...
... The general visitation procedure will find reuse with other specific
actions, and maybe for other non-menu trees too
2020-01-25 15:10:01 -05:00
Paul Licameli
4eee417ded Visiting of menu items calculates paths (not yet used)...
... Computed, shared, and nameless grouping items don't (directly) affect paths,
and are expanded in a first pass before visiting the real items
2020-01-25 15:09:41 -05:00
Paul Licameli
90a22b3982 Split out namespace Registry for non-menu-specific tree manipulation 2020-01-25 15:09:16 -05:00
Leland Lucius
d28009c93e Remove unneeded include 2020-01-24 22:25:52 -06:00
Paul Licameli
c77d4e1961 Menu descriptions mostly computed once only & have string identifiers 2020-01-24 18:24:43 -05:00
Paul Licameli
393a098b69 Store a string identifier in each menu item...
... which is not yet used for anything.

It could be used to describe textual paths for attaching plug-in menu items.

Strings are only path local, not necessarily globally unique, and may be
left empty for separators and for groups that should be transparent to
path identification.

It may also be empty for certain sub-menus, such as those that group effects
according to the changeable criteria in Preferences.
2020-01-24 18:05:56 -05:00
Paul Licameli
f6e5696146 Most functions defining menus compute once and cache the result...
... Except a few where project or plugin manager state or preferences are
needed to compute the items, so evaluation is delayed, often inside lambdas

Comment "Delayed evaluation" wherever there are exceptions
2020-01-24 18:05:56 -05:00
Paul Licameli
33b4b409e8 Change class hierarchy of MenuTable::BaseItem...
... There are now four immediate subclasses (SharedItem and Computed Item,
which are final, and SingleItem and GroupItem, which are abstract), which may
serve future purposes more general than menu items.  There are further
subclasses specific to menu management.

The former concrete class GroupItem is renamed TransparentGroupItem.

Also allows direct construction of items in lists from shared pointers.
2020-01-24 18:05:56 -05:00
Paul Licameli
93c2bb9322 Delay evaluation of checkmark states...
... so that more menu item descriptions can be statically constructed once only
2020-01-24 18:05:56 -05:00
Paul Licameli
512c27d422 Simplify the FN macros in src/menus/*.cpp...
... Eliminate repetitious passing of the finder function into each of the
calls to Command and CommandGroup.
2020-01-24 18:05:56 -05:00
Paul Licameli
702b8b1e9d More specific return types for builders of menu descriptions 2020-01-24 18:05:56 -05:00
Max Maisel
17ef5b1c75 Fix two bugs in loudness effect (#410)
* Calculate loudness for short or silent selections as well.

In case of selections shorter than 400ms (one momentary loudness block),
take what we have got and divide only be the actual length.

Abort loudness normalization silently if the selected audio is all
silent.

* Fix loudness effect bug when selection includes a gap.

If the selected audio in a track contained a gap between two clips,
an incorrect amount of samples was processed.
2020-01-24 18:04:19 +00:00
Paul Licameli
921d7f28ef Correct a naked new 2020-01-24 10:25:51 -05:00
Paul Licameli
5ecd090266 EffectUIHost uses ShuttleGui 2020-01-23 19:10:38 -05:00
Paul Licameli
b5b9ab6ecd EffectUIHost::BuildButtonBar uses ShuttleGui 2020-01-23 19:06:23 -05:00
Paul Licameli
c28c170cc0 EffectUIHost::Initialize uses ShuttleGui 2020-01-23 19:06:23 -05:00
Paul Licameli
eb3e5d8f6f Factor EffectUIHost::Initialize 2020-01-23 19:06:23 -05:00
Paul Licameli
1c84932dfa EffectUIClientInterface::PopulateUI takes ShuttleGui & 2020-01-23 19:06:23 -05:00
Paul Licameli
eff5b2ef92 Make Effect::PopulateUI final (no special case for Equalization) 2020-01-23 19:06:23 -05:00
Paul Licameli
358aac3181 Change some behavior of ShuttleGui::AddBitmapButton...
... which is not now used, but soon will be
2020-01-23 19:06:17 -05:00
Paul Licameli
e8855257cc Less user-interface code in Effect.cpp 2020-01-23 15:24:17 -05:00
Paul Licameli
46e99bb038 Move EffectPresetsDialog out of Effect.cpp 2020-01-23 15:23:46 -05:00
Paul Licameli
808d4accfd Remove some friends from Effect 2020-01-23 15:23:46 -05:00
Paul Licameli
e5625bfb89 Move EffectDialog out of Effect.cpp 2020-01-23 15:23:43 -05:00
Paul Licameli
c56a10c5bb More restructuring of Ruler update code 2020-01-23 13:59:17 -05:00
Paul Licameli
68281fe0ee Split up Ruler::Updater::Update 2020-01-23 13:53:54 -05:00
Paul Licameli
580ad8221e Mutable cache for ruler updates, so Draw functions can be const 2020-01-23 13:51:12 -05:00
Paul Licameli
a2babc646f Use the correct font to find lead size for custom fonts 2020-01-23 13:39:22 -05:00
Paul Licameli
99064d6dd5 Mutable cache for Ruler's chosen fonts 2020-01-23 13:35:32 -05:00
Paul Licameli
21306d6186 Remove indirection storing number scale in Ruler 2020-01-23 13:27:05 -05:00
Paul Licameli
fec3b11674 Demote more of the ruler updating procedure into Updater 2020-01-23 13:18:47 -05:00
Paul Licameli
fe4db0dd8e Nix Ruler member vars used only for grid drawing; more const methods 2020-01-23 12:56:11 -05:00
Paul Licameli
ef44143cbf Fix a comment 2020-01-23 12:56:10 -05:00
SteveDaulton
9a0ee24c5c bug 2290: Add error message
See https://bugzilla.audacityteam.org/show_bug.cgi?id=2290#c9
2020-01-23 12:59:53 +00:00
Paul Licameli
10eb5864ac Don't quit update of vertical ruler of short spectrogram views...
... This caused visible anomalies, for instance when dragging the stereo track
separator between channels.  Numbers from one channel used to be drawn over
the ruler of the opposite channel.
2020-01-22 20:21:45 -05:00
Paul Licameli
537ace493e Don't draw 0 at top of spectrogram scale (bug in 8cf7d0b) 2020-01-22 19:58:53 -05:00
Paul Licameli
4a9c14bb38 Some transformation of Ruler update code into something less confusing...
... about where the dependencies of the calculations on Ruler state lie.

This doesn't yet fix the bugs in vertical ruler scales.
2020-01-22 13:42:19 -05:00
Paul Licameli
ec723466ba Invalidate Ruler, whenever anything the Updater uses is reassigned 2020-01-22 13:38:37 -05:00