Commit Graph

158 Commits

Author SHA1 Message Date
Paul Licameli bd6fb75886 moduleMain functions were never called but with nullptr; so simplify 2021-05-16 07:03:12 -04:00
Paul Licameli 6242be0a8e ModuleInterface.h needn't distinguish built-in from external usage...
... All is set up so that plug-in providers can be modules that register
their instance-creating function pointers directly with RegisterProvider; no
special symbol name needs to be exported.

That is, they now just need to export ModuleDispatch and GetVersionString, just
like other modules for other purposes.

Duplication of logic from ModuleManager::InitializeBuiltins() is removed.

No examples yet in the previous commits, but it does work in my misc-modules
branch.
2021-05-16 07:03:12 -04:00
Paul Licameli 861470dd77 Complementary un-registration of providers; change function name 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 7771760b5e Add #include needed to build on Fedora 34, recommended by Be-ing 2021-05-14 16:22:57 -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 9e70fa71ba Issue 887: Some strings didn't translate, though in catalogs...
... What they had in common was the use of the XC macro to specify a
disambiguating context string.  Example: "Interface" page of preferences.

TranslatableString had not implemented this
correctly except in the less usual case of plurals.
2021-05-13 10:27:08 +01: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 3060530b4f Remove outdated comments about Audacity.h and AUDACITY_DLL_API 2021-05-10 08:03:31 -04:00
Paul Licameli f2b53c82eb Move definition of AUDACITY_DLL_API into src/CMakeLists.txt 2021-05-10 00:05:23 -05:00
Paul Licameli 98223f9850 We no longer need to duplicate std::hash<wxString> 2021-01-31 08:27:18 -05: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
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
Paul Licameli 7998012015 Comments and new synonym names in sampleFormat enumeration 2020-12-03 12:18:18 -05:00
Paul Licameli 4ca3e7096f
Track factory cleanup (#646)
* Don't need TrackFactory to make LabelTrack

* Don't need TrackFactory to make NoteTrack

* Don't need TrackFactory to make TimeTrack, or ZoomInfo in the factory

* Remove some forward declarations

* Rename TrackFactory as WaveTrackFactory, move it out of Track.cpp
2020-08-22 18:44:49 -05:00
Paul Licameli 9360359e9d
Module manager (#549)
* Eliminate ModuleManagerInterface...

... It was there only to provide RegisterModule(), but that was not used
anywhere.  So simplify.

* Remove nested #include of ModuleInterface.h
2020-05-29 10:48:52 -05:00
Paul Licameli dc53adf706 Rewrite TranslatableString::operator== without dangerous looking casts 2020-05-22 12:48:49 -04:00
Paul Licameli f8a070dde7 Rename macro wxPLURAL as XP (brief, and eliminates mention of "wx") 2020-05-22 12:48:49 -04:00
Paul Licameli b423413278 Fix comments 2020-02-17 22:40:05 -05:00
Leland Lucius 6da68f2035 Remove obsolete config*.h files
These are ancient and "configunix.h" was being pulled in
via Types.h.  Nothing major, but they were generated for
a 32-bit system and "may" cause problems when used on
64-bit systems.

(That's unlikely though since they haven't all this time.)
2020-01-31 09:29:15 -06:00
Paul Licameli 1c84932dfa EffectUIClientInterface::PopulateUI takes ShuttleGui & 2020-01-23 19:06:23 -05:00
Paul Licameli a69fba9990 TracksPrefs does not use hardcoded list of all view types...
... It does have some duplication of string values, but only for purposes of
upgrading old config files.
2020-01-18 20:28:54 -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
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 91515520bc Remove the nullary override of Effect::Preview 2020-01-05 19:59:30 -05:00
Paul Licameli 23a0206d2a Remove CreateUI; pass dialog factory to effect client instead 2020-01-05 16:11:55 -05:00
Paul Licameli fb678c0eb8 Remove EffectHostInterface::Apply so Effect doesn't use EffectManager 2020-01-05 16:11:54 -05:00
Paul Licameli d6d4ee3c29 Reviewed uses of type alias FileExtension, it belongs in more places 2019-12-27 17:40:42 -05:00
Paul Licameli eba984303c TranslatableString::Format is aware of std::reference_wrapper 2019-12-25 15:12:44 -05:00
Paul Licameli c2c308733b Define output operator << taking TranslatableString 2019-12-24 13:30:24 -05:00
Paul Licameli d2631307a6 TranslatableString no longer inherits from wxString 2019-12-24 13:29:08 -05:00
Paul Licameli 1537930195 DiscoverPluginsAtPath reports error as TranslatableString 2019-12-20 22:06:18 -05:00
Paul Licameli e3ea93a624 Define and use function Verbatim...
... in cases of "TranslatableString" that are not really translated.

This makes it easier to scan the code for such unusual constructions of
TranslatableString, distinct from mere mentions of the TranslatableString type.
2019-12-19 22:49:23 -05:00
Paul Licameli 5e26ef1eba Define and use non-mutating TranslatableString::Stripped 2019-12-19 16:41:45 -05:00
Paul Licameli 092033b284 Just one accessor for the name of a ComponentInterface...
... Translate it explicitly where needed.
2019-12-19 11:47:37 -05:00
Paul Licameli 618fee21ec TranslatableString for ComponentInterface::GetDescription() 2019-12-16 14:21:57 -05:00
Paul Licameli 54e2bbd8ff Remove TranslatedInternalString, use ComponentInterfaceSymbol 2019-12-16 10:58:05 -05:00
Paul Licameli 681950fc61 TranslatableString for names, labels, tooltips of wxPanelWrapper...
... and Grabber too
2019-12-16 10:58:05 -05:00
Paul Licameli f16709945b Define TranslatableString::Strip() 2019-12-16 10:58:05 -05:00
Paul Licameli a3bda5be97 Fix dangling reference bug 2019-12-14 18:53:05 -05:00
Paul Licameli 8aa6b47b17 Try again to fix TranslatableString for Windows compiler...
... The fix at a3d8518 was not sufficient.

I think the Windows compiler has a bug, and gets confused by a name that has
static and non-static overloads.  So use distinct names instead.
2019-12-14 14:20:50 -05:00
Paul Licameli a3d8518f5d Fix misbehavior of TranslatableString::Format in Windows build...
... Make sure it doesn't try to capture this (quite unnecessarily!) but calls
the static overload of DoFormat.

Make other qualified calls too for added measure.
2019-12-14 12:27:27 -05:00
Paul Licameli 02cdb4ab45 Define ComponentInterface::GetUntranslatedName() 2019-12-14 01:48:15 -05:00
Paul Licameli d32d464471 Uses of TranslatableString in src/import 2019-12-14 01:48:15 -05:00
Paul Licameli 8655e2e3b9 r & lvalue ref-qualified overloads of TranslatableString functions...
... and moves of TranslatableString arguments where possible
2019-12-13 12:36:20 -05:00
Paul Licameli 2e3ba2204f Rewrites of TranslatableString and reimplementation of wxPLURAL...
... including move-construction of the base string, debug string formatting,
and contexts (not fully implemented)
2019-12-11 14:55:29 -05:00
Paul Licameli 94fc1bb2a8 TranslatableString has + and +=, and translation of Format arguments 2019-12-06 11:50:56 -05:00
Paul Licameli 15260c2c95 TranslatableString can store a context and format arguments...
... Format arguments are substituted into the translation of the msgid, which
may not be known at the time the format arguments are captured (because locale
may change).  This allows TranslatableString with arguments to be constructed
at static initialization time.

There is also a special "verbatim" or null context which makes no translations
of msgids.

There is not yet any use of other contexts besides default or null.
2019-12-05 11:34:06 -05:00
Paul Licameli 72df562c4a Conversion of TranslatableString to wxString is private 2019-12-01 18:17:57 -05:00