Commit Graph

118 Commits

Author SHA1 Message Date
Paul Licameli cfbdd2d22e Type alias ManualPageID for wxString used in many places...
... eliminating many direct mentions of wxString.  A real type distinction will
be made next.
2021-07-01 13:33:04 -04:00
Paul Licameli 04a0292d1d Simplify iterations over PluginManager; remove a friend 2021-06-30 21:15:19 -04:00
Paul Licameli 8fda526577 Simplify memory management in PluginManager 2021-06-30 21:15:19 -04:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli caa312ab7b Remove some unneeded #includes and forward declarations 2020-11-20 13:47:47 -05:00
Paul Licameli 83d5c81578 Change a function return from wxString to TranslatableString 2020-05-26 12:04:11 -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 ee797f59de Fix bug in effect presets dialog...
... introduced at 46e99bb038
2020-04-18 22:31:51 -04:00
Paul Licameli 37d730edfe Break dependency cycle of Effect and EffectManager 2020-03-08 16:21:28 -04:00
James Crook 95bbe617b8 Bug 2343 - Presets: Effect Ids not the same in Presets as for Macros 2020-03-05 22:14:17 +00:00
Paul Licameli 46e99bb038 Move EffectPresetsDialog out of Effect.cpp 2020-01-23 15:23:46 -05:00
Paul Licameli bb26b2f2c4 Require a ProjectWindow as ancestor of effect dialog...
... by passing parent as reference, not pointer, and testing in the dialog
factory function.

This is important so that we know the lifetime of an effect dialog, even when
it is non-modal, is bounded by the lifetime of the associated project.
2020-01-06 11:30:47 -05:00
Paul Licameli 8bbc22e47a Cut and paste; EffectManager doesn't need EffectUI; cycle of 3 broken! 2020-01-05 16:11:55 -05:00
Paul Licameli 91c45dd32a Move static EffectManager::DoEffect into new namespace 2020-01-05 16:11:55 -05:00
Paul Licameli 23a0206d2a Remove CreateUI; pass dialog factory to effect client instead 2020-01-05 16:11:55 -05:00
Paul Licameli 738c5c5e90 Remove Effect::PromptUser...
... it was only a thin wrapper of ShowInterface when not overridden, not
clearly serving a distinct purpose.
2020-01-05 16:11:55 -05:00
Paul Licameli 91536d734f Rename EffectRack.* as EffectUI 2020-01-05 16:11:54 -05:00
Paul Licameli 129c9deb99 Remove GetActiveProject from EffectRack...
... and make one EffectRack window per project
2020-01-04 16:36:55 -05:00
Paul Licameli dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
Paul Licameli 4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
Paul Licameli 1f86a77569 TranslatableString for effect command names and descriptions 2019-12-16 10:58:05 -05:00
Paul Licameli 5639f834c8 CommandManager stores labels as TranslatableString 2019-12-16 10:58:05 -05:00
Paul Licameli aac50ae36e EffectManager returns TranslatableString for family and vendor 2019-12-12 15:30:36 -05:00
David Bailes 14b53e6736 Bug 2251 - Windows: NVDA sometimes reads the name of the track twice
Problem:
Currently calling Track::EnsureVisible() also sets the track as focus.
In Audacity 2.3.3 the timing of the code to set the focus was changed. Rather than a direct call, an event is queued, and then the focus is set. This has changed the timing of the focus event which is sent with respect to other focus and name change events. In particular in the case of toggling the selectness of the focused track, this moved the focus event to be after the name change event.
These changes only had an effect on NVDA - Jaws and Narrator were unaffected.

The introduction of this bug has highlighted an existing problem.
1. There are a small number of existing cases where a track needs to be visible, but where it is already the focus, and so setting the focus is unnecessary. For example, pressing Enter to toggle whether a track is selected.
2. Some of the Audacity code which calls EnsureVisible() is written with the assumption that EnsureVisible() doesn't set the focus, and so there are unnecessary focus events. Whilst other code which calls EnsureVisible() assumes that it also sets the focus. Confusion.

The Fix:
Remove the setting of focus from within Track::EnsureVisible(), and so remove the unnecessary focus events.
Calls to set the focus were added before calls to EnsureVisible where the code was relying on EnsureVisible to set the focus. In TrackPanel::ProcessUIHandleResult, and TrackPanel::OnMouseEvent, I wasn't sure if the focus needed to be set, so called it anyway to ensure that the behaviour did not change.

So I would like to remove the setting of focus from within Track::EnsureVisible(), and add explicit calls to set the focus where necessary.
I think this would make the code clearer, remove unnecessary calls to set the focus, and make it easier to keep NVDA happy.
2019-11-26 14:43:25 +00:00
James Crook ce5884a1f9 Wording fixes for 2.3.3
Per https://wiki.audacityteam.org/wiki/Wording
2019-08-12 10:39:20 +01:00
Paul Licameli 33f3d4b82d Heavyweight version of SelectedRegion stored in ViewInfo emits events 2019-07-17 12:43:39 -04:00
Paul Licameli 2c840a75c5 Remove short functions from namespace TransportActions 2019-07-03 16:52:19 -04:00
Paul Licameli a5364119eb Eliminate many calls to RedrawProject & TrackPanel::Refresh()...
... Let the window respond to an undo manager event instead, whenever there
is a push or modify

Maybe this makes a few unnecessary redraws that did not happen before.  If
that is important, then we should figure out how to put the logic for eliding
the redraw into ProjectWindow, and the extra information needed for the
decision into the events, but not make intrusions in other code all over the
place.
2019-07-02 08:17:01 -04:00
Paul Licameli 2257fa642a Remove TrackPanel::EnsureVisible; TrackList sends an event instead 2019-06-25 10:54:55 -04:00
Paul Licameli 7fc3c5e7a7 Move namespace TransportMenus into ProjectAudioManager.cpp ...
... not the best thing for the long term, but hidden dependencies on
TransportMenus.cpp are eliminated

Tying CommonCommandFlags again into the big component, which is now 26
2019-06-25 00:14:53 -04:00
Paul Licameli c6478f43af Lower ViewActions as member functions of ProjectWindow 2019-06-25 00:14:53 -04:00
Paul Licameli ff2cf496cd Move DoEffect out of PluginMenus 2019-06-25 00:14:52 -04:00
Paul Licameli ab5a98003a Free EffectManager and EffectRack from the big s.c.c. ...
... though in a small cycle with each other, by moving RealtimeEffectManager to
new files, which remain in the big component.

Net loss of 1, the big component now has 27 files
2019-06-24 00:49:12 -04:00
Paul Licameli 04a3ed9d04 Separate class RealtimeEffectManager 2019-06-24 00:37:02 -04:00
Paul Licameli 9935b035c5 Remove Effect.h from EffectManager.h and EffectRack.h 2019-06-24 00:36:59 -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 d81ca99643 CommandContext.cpp has fewer dependencies...
... freeing it (alone) from dependency cycles
2019-05-18 20:31:17 -04:00
Paul Licameli 78a1263163 Move ShuttleGetDefinition to its own files...
... so Shuttle need not include CommandTargets.h
2019-05-18 15:10:07 -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
Paul Licameli 9bf29f5582 CommandManager keys by CommandId, not plain wxString 2019-05-16 12:30:29 -04:00
Paul Licameli 5e7d41ec07 Each .cpp/.mm file includes corresponding header before any other...
... except Audacity.h

This forces us to make each header contain all forward declarations or nested
headers that it requires, rather than depend on context.
2019-03-17 22:54:52 -04:00
Paul Licameli 906e55f047 Experimental.h in all .h or .cpp files that directly use EXPERIMENTALs...
... except Audacity.h; and in no others.

Do so even if Experimental.h gets multiply included, as in both the .h and
.cpp files.

This makes it easier to do a text scan to be sure there are no unintended quiet
changes of meaning because of omission of Experimental.h when the flag is
an enabled one.

Also move inclusions of Experimental.h earlier.

Also don't require Experimental.h to be preceded by Audacity.h to define
EXPERIMENTAL_MIDI_OUT correctly.
2019-03-17 22:54:00 -04:00
Paul Licameli 71036bed01 Remove PluginManager.h from other headers 2019-03-17 15:05:19 -04:00
Paul Licameli 3ff61f3e10 Remove Shuttle.h from other headers 2019-03-17 15:03:05 -04:00
Paul Licameli 5fd6965925 Use type aliases CommandID, CommandIDs...
... for identifiers of menu commands and macros, and for vectors thereof
2019-03-15 15:18:11 -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
Paul Licameli b8c0125143 Replace comparisons against wxEmptyString with empty() 2019-03-14 16:20:18 -04:00
Paul Licameli 2db49dc1f0 Use standard library style members of wxArrayString (and wxString) ...
... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
2019-03-10 14:43:57 -04: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