Commit Graph

719 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 77dab158c3 Make Audacity build in C++17 ...
... Fixing many conditional operators with explicit construction of wxString
instead of simple string literals;

And fixing allocation of more strictly aligned structures on Mac, without need
for 10.14 as the minimum SDK, by means of some class-specific operators new
and delete.
2021-06-18 21:44:55 +03:00
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 64d7ca7403 New utility library 2021-06-02 07:08:19 -04:00
Paul Licameli e6e96de0fd Replace most inclusions of MemoryX.h with <memory> ...
... Most often it was needed for a custom definition of std::make_unique, but
we build C++14 now.
2021-06-02 07:08:19 -04:00
Paul Licameli f369b5109b Change almost all uses of WaveTrack::Get() to GetFloats() ...
... A call graph browser easily shows that the extra generality of fetching
samples in some other format is only used in Benchmark -- where the format is
always the same as what the track is constructed with.

This makes re-verification of the claims in comments two commits ago easier.
2021-05-27 11:38:10 -04:00
Paul Licameli 45c6190c51 New library lib-strings for Identifier and internationalization 2021-05-27 09:51:32 -04:00
Paul Licameli 7e697d1d8f Replace many inclusions of Types.h with Identifier.h 2021-05-27 09:51:32 -04:00
Paul Licameli 4209c8150a Bug2764: Open Project... in Scriptables shouldn't corrupt project...
... Now new project windows are opened when .aup3 files are opened; but
behavior chages only in that case.

Wherever opening of other files invoked import code, we still do or do
not make a new project in exactly the same cases as before; such as, when
opening multiple files with File > Open, be sure each imported file still opens
in its own separate window.

This means the decision whether to open a new project must be lowered into
ProjectFileManager, where the type of the file is discovered, and we pass it a
function object so it avoids a dependency cycle with ProjectManager.

It also means the checking for errors and closing of new projects in case of
failure must be replicated at all places where ProjectFileManager::OpenProject
is called directly.

The class ProjectManager::ProjectChooser simplifies this.

Recently introduced calls to SafeToOpenProjectInto(), before
ProjectManager::OpenProject(), are now lowered into that class, delaying the
safety check so it might also be called where ProjectFileManager is used
directly.
2021-05-24 20:04:58 -04:00
Paul Licameli c96d5f12bc Comments; range-for; fix unchecked dereferences of pointer-to-pointer 2021-05-24 20:04:57 -04:00
Paul Licameli 010fe7bff2 Fix complaint from xgettext about empty string 2021-05-21 20:41:27 -04:00
Paul Licameli 5fef82dccf Define Setting classes, bundling config path with settings value...
... the intention being, that no string literal for a path, or its default
value, shall ever occur twice in the code, relying on long-distance coincidence
of literal values.  Instead, a named Setting object is constructed once, then
read and written.

For now, the Tie... functions in ShuttleGuiBase will take references to
implicitly constructed temporary Setting objects.  But all should later be
made static objects, and the constructors made explicit.
2021-05-17 08:46:08 -04:00
Paul Licameli ff07130ac4 Bug2763: Certain Scriptable commands should push Undo stack...
... Exhaustive examination convinces me that Set Labels and Set Envelope are
the only two needing this.  (The special problems of Open Project merited a
different bug number 2764.)
2021-05-16 07:08:44 -04:00
Paul Licameli bd6fb75886 moduleMain functions were never called but with nullptr; so simplify 2021-05-16 07:03:12 -04:00
Paul Licameli 64bbc31c54 Remove macro making extern declaration of RegisterBuiltinModule...
... Forcing other places that use RegisterBuiltinModule to be more explicit
about their link dependencies on ModuleManager, with a new #include directive.

Does this make scripts/graph.pl show a new dependency cycle?  Happily no.  But
now we know.
2021-05-16 07:03:12 -04:00
Paul Licameli d7f643768c Bugs 2778, 2339, Issue 887: Translation of some effect names...
... Those for which the internal name and the user-visible English names differ,
or that needed disambiguating context for i18n,  were always shown as English
in the menus.

Silence and Filter Curve were the only two examples. There are others.
2021-05-14 14:27:23 -04:00
Paul Licameli 406b23cae7 More uses of AUDACITY_DLL_API...
... in many places where the function call will later need to be between
modules (or libraries, or the executable) and the annotation will be a necessity
to keep the linkage working on Windows.

That's all that this sweeping commit does.
2021-05-10 10:46:55 -04:00
Paul Licameli fbfccf1393 Delete or un-inline some constructors, assignments, others...
... Which will be needed for various reasons for Windows builds of certain
modularizations, which will otherwise complain that they can no longer
generate them as inlines.

In one case, deleted copies require explicitly defaulted moves, but they will
work as generated inline.
2021-05-10 10:46:55 -04:00
Paul Licameli c5ebc396eb Audacity.h has shrunk to nothing, now remove it! 2021-05-10 00:05:23 -05:00
Paul Licameli e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
Leland Lucius f3efee7ed5 Bug 2618 - Screenshot tool: Capture Window only does not just capture the Plot Spectrum window 2021-02-18 21:43:15 -06:00
Leland Lucius 379348898d Bug 2324 - Windows: Screenshot tool success/completion dialog is unnecessarily over-large 2021-02-14 12:29:13 -06:00
James Crook 67dff35a12 Bug 2640 - Plot Spectrum and Contrast analyzers are not "Repeatable"
Completing the update by John Colket.  The plan always was that
these new 'repeat' entries were optional commands bindable to
keyboard shortcuts by advanced users.

Users visiting the menus can re-select the item they want.
For these menu users it would be confusing/overload to list
these repeat commands in the menu.  Repeat last effect in the Effects
menu is more important.  It is there in the menu to signal to
users that there is the Ctrl+R key binding for it.
2021-02-03 11:40:21 +00:00
JohnColket a3d9f41fb4
Bug 2582 - Enh: Repeat last Process, Part 2 (#734) 2021-02-03 11:02:49 +00:00
Paul Licameli 78b6897f85 Remove unused function 2021-01-30 20:44:31 -05:00
Leland Lucius 76460c73da Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences
Reverted the wrong commit...needed to add an include anyway.
2021-01-29 06:37:30 -06:00
Leland Lucius 90a1783779 Revert "Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences"
This reverts commit 1478abf3d0.

Removing until some questions are answered.
2021-01-29 06:16:17 -06:00
Leland Lucius 1478abf3d0 Bug 2366 - Macros: Run does "Select All" ignoring setting in Tracks Behaviors Preferences 2021-01-29 05:08:05 -06:00
luzpaz 7a3bdcf3f2
Fix typos (user facing and non-user facing) (#727)
Found via `codespell v2.1.dev0`  
`codespell -q 3 -S *.po,./lib-src -L parm,parms,toke`
2021-01-24 09:46:08 +00:00
Leland Lucius 50e803a974 Rework of commit b4a0be9
See comments 6-9 in bug #2642 for the problem it caused.
2021-01-22 15:16:38 -06:00
Leland Lucius 4e6e3c2089 Swapped cut/copy IDs 2021-01-22 09:23:36 -06:00
Leland Lucius b4a0be99cd Bug 1579 - Mac: Cut/Copy from file save dialogs using shortcuts does not work
And Bug 1300 - Mac: COMMAND + V paste limitations in standard file save dialogs
2021-01-21 18:45:01 -06:00
freddii 534359de6c
Fix minor typos (#720)
Co-authored-by: freddii <https://freddii@github.com>
2021-01-12 11:56:09 +00:00
freddii 2593a84d56 Fix some spelling mistakes. 2021-01-12 09:55:31 +00:00
SteveDaulton 7e6842c1f9 Remove Silence Finder plug-in
as discussed between QA and RM.
2021-01-09 20:20:42 +00:00
SteveDaulton f57e69cfca Replace Sound Finder with Label Sounds
also fixes bug 2352:
Sound / Silence Finder fail silently on selection > 2^31 -1
2021-01-06 16:52:39 +00:00
Paul Licameli caa312ab7b Remove some unneeded #includes and forward declarations 2020-11-20 13:47:47 -05:00
James Crook d6a6b256fe Bug 2584 - "GetInfo: Envelopes" returns incorrect track numbers
Also clip count resets to zero on each new track.
Also fixed GetInfo: Clips to count all tracks, not just wave tracks.
2020-11-15 20:31:54 +00: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 ec323c13d9 Add conventional #include guards to two header files 2020-09-26 15:26:25 -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 77d0851a65 Remove class ImportXMLTagHandler...
... It became unused at d39590cf41

And remove some other complications in ProjectFileManager that were used only
in it
2020-09-01 09:03:43 -04:00
James Crook a278eff55b Bug 2295 - Comment command always succeeds
I had it set to always fail, with result that macro stopped at that point.
2020-08-17 11:22:20 +01:00
James Crook 894867d692 Bug 2295 - ENH: cannot add a comment in a Macro with Audacity
Comments can now be added using the Comment command.
2020-08-16 20:22:48 +01:00
Leland Lucius 7b8a977f15 Add ClearLog macro command and parameters to tracing 2020-08-11 09:06:15 -05:00
Leland Lucius b6eaf5623e Add "tracing" of macro commands
At this time it's really just a debugging aid for us. It should
make it easier for us to better understand timing of various
commands.

Tracing is enabled by setting the "/EnableMacroTracing" preference
to 1 and disabled by setting it to 0.

Since the tracing is written to the log, this also adds a "SaveLog"
command that takes a filename. It can be used from within the macro
being traced to preserve the log in case the script intended to
exit Audacity.
2020-08-11 00:14:56 -05:00