1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

172 Commits

Author SHA1 Message Date
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
Paul Licameli
b351eabf47 ComponentInterfaceSymbol contains TranslatableString 2019-12-01 18:08:56 -05:00
Paul Licameli
911f5eabcc Define TranslatableString...
... Perhaps it should be in Internat.h (which is at the lowest level of the
dependency graph), but later ComponentInterface.h will need to include it, and
I don't want includes/ to depend on src/.

Though there is still a linkage dependency on src if
TranslatableString::Translation() is used.
2019-12-01 18:05:20 -05:00
Paul Licameli
15983499c8 New virtual function in ModuleInterface 2019-11-26 11:02:35 -05:00
David C. Manuelda
db0dceac54 Fix ill-formed std::hash<> specialization 2019-08-30 20:51:01 +01:00
James Crook
de468afd8d Bug 1269 - "backslash percent" not saved in effect presets
wxWidgets does special things with %.
It uses % to tell it of environment variables.

Rather than escaping %, it is simpler to disable the environment variables thing.
2019-07-17 18:32:10 +01:00
Paul Licameli
0f62046313 Define EffectClientInterface::GetBlockSize() 2019-06-24 00:49:14 -04:00
Paul Licameli
a1ff74b5bb Move AudacityPathList & utilities from AudacityApp.h to FileNames.h 2019-05-17 16:29:03 -04:00
Paul Licameli
9bf29f5582 CommandManager keys by CommandId, not plain wxString 2019-05-16 12:30:29 -04:00
Paul Licameli
3eeb91f23a Define class Identifier and template TaggedIdentifier...
... Identifier holds strings used for internal purposes and not shown to users;
TaggedIdentifier generates subclasses of Identifier for different purposes,
which won't implicitly (that is, inadvertently) interconvert as function
arguments.
2019-05-16 12:30:28 -04:00
Paul Licameli
961882838f Move definition of std::hash< wxString > 2019-05-16 12:30:26 -04:00
Paul Licameli
74128156bf ModuleInterface::GetFileExtensions() returns const reference...
... avoiding repeated array allocation
2019-05-16 12:30:23 -04:00
Paul Licameli
685a45d1de Remove wx/{convauto,cmdline,clipbrd,calctrl}.h from *.h 2019-03-30 13:10:16 -04:00
Paul Licameli
d28ae40399 Remove wx/dialog.h from headers 2019-03-30 12:01:39 -04:00
Paul Licameli
c982cf6a41 Remove wx/intl.h, wx/brush.h, wx/bitmap.h from headers 2019-03-30 11:45:20 -04:00
Paul Licameli
08c16b6eb7 Remove wx/{html/htmlwin,fileconf,dragimag,debug,dcclient}.h from *.h 2019-03-30 10:53:22 -04:00
Paul Licameli
40b4361732 Remove wx/arrstr.h from headers 2019-03-26 12:41:44 -04:00
Paul Licameli
1d0247607a Remove wx/string.h from headers 2019-03-26 11:33:55 -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
a30000cf74 Use type aliases FilePath, FilePaths...
... for wxString and wxArrayStringEx, holding file paths (absolute or relative,
directory or plain file); to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)
2019-03-15 15:18:11 -04:00
Paul Licameli
485b6bb425 Use type aliases FileExtension, FileExtensions...
... for wxString and wxArrayStringEx, holding file extensions (without dot);
to be replaced later with different types

(not yet using std::vector, becase of some uses of wxArrayString::Index with
two arguments)

And simplify some constructions of arrays
2019-03-15 15:18:11 -04:00
Paul Licameli
df6a2cf479 Use type aliases RegistryPath, RegistryPaths...
... for wxString and vector thereof, holding strings that key into wxConfigBase;
to be replaced later with different types
2019-03-15 15:18:11 -04:00
Paul Licameli
dcd211affa Use type aliases PluginPath, PluginPaths...
... for wxString and vector thereof, when holding plugin paths (which may or
may not be interpreted as file paths, depending on the module); to be replaced
later with different types
2019-03-15 15:18:11 -04:00
Paul Licameli
135c2a71ce Replace "" and wxEmptyString with {} in default argument values 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
da33daf197 Some replacements of wxArrayString with auto 2019-03-10 14:47:12 -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
Paul Licameli
f2405f3023 rename a function 2019-03-09 12:02:13 -05: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
Steve Daulton
d716b61b1e Increase precision for doubles/string conversion
Required so that the Select: command has reasonable precision
on tracks longer than 17 minutes.
2018-10-23 20:28:43 +01:00
Paul Licameli
ce9f2e2538 Include Menus.h directly, only where needed, not via Project.h 2018-10-16 16:45:26 -04:00
Paul Licameli
e990fd4f18 Remove unnecessary #include 2018-09-10 20:27:13 -04:00
James Crook
c21855bbca Change ";type tool" to not iterate through tracks or selection.
Also adds the options
;type tool
;type tool process
;type tool generator
;type tool analyze

These tools will appear in the Tools menu, but behave as their second argument (if any)
2018-08-01 20:32:30 +01:00
Paul Licameli
f7515c90d8 Now I can revert my partial reversion of b56059a 2018-05-10 00:56:37 -04:00
Paul Licameli
b200819f75 Use IdentInterfaceSymbol to identify commands and effects 2018-04-11 11:51:10 -04:00
Paul Licameli
0394660e9e Use IdentInterfaceSymbol for vendor strings, which are used in paths 2018-04-11 11:13:41 -04:00
Paul Licameli
2c19e8f81e Use IdentInterfaceSymbol to identify effect families 2018-04-11 11:13:40 -04:00