Commit Graph

100 Commits

Author SHA1 Message Date
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
Yuri Chornoivan d1ada5f08c Fix minor typos 2020-04-11 10:06:24 +01:00
Paul Licameli 61abb87a77 Reviewed all i18n-hint comments...
... Moved many misplaced ones, which msgfmt would not have extracted into
audacity.pot.

Duplicated some of them, to appear with related but distinct msgids.

Added a few new comments.

Deleted one that was no longer needed in ProjectManager.cpp.
2020-04-05 09:00:00 -04:00
David Bailes 72e24b82d2 Mute/Unmute selected tracks: change names of commands
Commands for muting and unmuting the selected tracks were added in commit 6d30936.
This commit:
1. Removes the word selected, as the user would already assume this to be the case, and the other commands in the Tracks menu which act on the selected tracks do not include the word selected.

2. Fix the duplicate access keys.
2020-03-10 08:41:54 +00:00
James Crook 9056eed946 Permit track muting/unmuting from menu whilst playing.
This makes these commands/menu-items more useful.
The track mute buttons operate during playing, so so should the menu version.
2020-03-07 22:59:34 +00:00
Lukas Werling 6d30936d68 Add commands for muting/unmuting selected tracks
There was no convenient way of muting or unmuting some, but not all
tracks. With the new commands, it is possible to quickly select a subset
of all tracks via Shift+click and then mute or unmute them.
2020-03-07 22:49:52 +00:00
James Crook a0578f71c3 Bug 2218 - Rendering a single track unnecessarily strips it of its properties 2020-03-02 20:11:39 +00:00
Paul Licameli 4d43967add Restore commit c1d129ec98 2020-01-31 23:51:12 -05:00
Paul Licameli 2c25a37994 Revert to a465ce0046 2020-01-31 22:34:25 -05:00
Paul Licameli 6225043ff3 ExtraMenus.cpp not link dependent on external sub-menu definitions...
... They use the registry
2020-01-31 21:22:44 -05:00
Paul Licameli de08d9ff86 Menus.cpp no longer link dependent on top level menu definitions...
... They all use the registry.

(This link dependency was not shown in diagrams generated by scripts/graph.pl,
because it was not reflected in Menus.h but was done using extern declarations
within Menus.cpp.  That was a cheat, but it let all the other dependencies
be exposed in the graph and mitigated first.)
2020-01-31 21:12:36 -05:00
Paul Licameli a465ce0046 Naming of many menu sections, so they can be attachment sites 2020-01-31 21:12:36 -05:00
Paul Licameli 6b551d10c5 Fix indentations 2020-01-30 12:14:22 -05:00
Paul Licameli a84da3dee1 Remove Separator items from menu descriptions; use Section(...) 2020-01-30 12:12:48 -05:00
Paul Licameli 9639ba84f4 Reimplement commit 512c27d, fixing menus & shortcut keys on Windows 2020-01-29 13:39:19 -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 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 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 2570b56176 Rename Maybe and its members more like std::optional of C++17 2020-01-19 11:38:12 -05:00
Paul Licameli 314ede2137 Don't store default sample format in ProjectSettings...
... it's a global preference.
2020-01-07 18:36:34 -05:00
Paul Licameli 7532677781 Revert "Don't store default sample format in ProjectSettings..."
This reverts commit 44d9916f85.
2020-01-07 18:36:28 -05:00
Paul Licameli 44d9916f85 Don't store default sample format in ProjectSettings...
... it's a global preference.
2020-01-07 18:22:38 -05:00
Paul Licameli 91c45dd32a Move static EffectManager::DoEffect into new namespace 2020-01-05 16:11:55 -05: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 460008f59d One less place that assumes at most two channels in a track 2019-12-31 15:10:11 -05:00
Paul Licameli 28e19e3e03 Bug2214: Mix and Render should insert new tracks after old tracks...
... or where the old tracks were, if replacing them

This puts the new track in the sync-lock group of the old tracks.
2019-12-30 11:13:18 -05:00
Paul Licameli 259359a283 Update some calls expecting TranslatableString in disabled code 2019-12-28 23:49:14 -05:00
Paul Licameli acd1158e1b TranslatableString for titles, and spin control and combo prompts 2019-12-23 18:53:00 -05:00
Paul Licameli 99c3c29158 Some compilation fixes for EXPERIMENTAL_SCOREALIGN 2019-12-21 00:34:59 -05:00
Paul Licameli 49cab86fc1 TranslatableString for tooltips and status bar messages 2019-12-20 21:54:49 -05:00
Paul Licameli dc39f22442 AudacityMessageBox takes TranslatableString message and caption 2019-12-20 21:32:50 -05:00
Paul Licameli 4eb220e7b9 TranslatableString for undo history short and long descriptions 2019-12-16 14:19:23 -05:00
Paul Licameli 53ee9c9800 TranslatableString for titles, names, labels of wxDialogWrappers...
... Found one missed translation in CommandTargets.cpp
2019-12-16 10:58:05 -05:00
Paul Licameli 9a609fe1fe TranslatableString in ProgressDialog 2019-12-14 01:48:15 -05:00
Paul Licameli a8de4d9e50 Construct MenuItem with untranslated label, so it can be static...
... and other storage of TranslatableString instead of naked wxString, for
management of menu items, in CommandManager
2019-12-12 15:49:00 -05:00
Paul Licameli 70ec69fa3d Pass untranslated command labels to CommandManager...
... and deduce whether to exclude from macros inside NewIdentifier, simplifying
argument lists further

Also fix the localization of "..." added to names by PluginMenus.cpp
2019-12-12 15:15:59 -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
SteveDaulton e9c8438d2d Fix for bug 2230 - Audacity crashes on selecting Resample
See https://bugzilla.audacityteam.org/show_bug.cgi?id=2230
2019-10-24 13:27:29 +01:00
James Crook 43af7b3265 Bug 240 - Time track selected by itself can't be removed with Tracks>Remove Tracks 2019-07-17 15:58:42 +01: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 e2362bc25a Move project status string management to new attached object class 2019-07-02 21:01:34 -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 af791d3d0b Redo previous commit's fix...
... the bug was introduced at e581fa60d9

I think it is better to make TrackPanel::OnTrackMenu crash-proof when
called with the default argument
2019-06-28 10:50:51 -04:00
David Bailes af74ff626e Track menu: opening track menu by pressing shift+M causes crash
Fix:
Call TrackPanel::OnTrackMenu(Track *t) with a track pointer.

Query:
Is there any reason why this function's parameter has a default value of NULL?
2019-06-28 10:09:11 +01:00
Paul Licameli 2257fa642a Remove TrackPanel::EnsureVisible; TrackList sends an event instead 2019-06-25 10:54:55 -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