1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

10908 Commits

Author SHA1 Message Date
Paul Licameli
72df562c4a Conversion of TranslatableString to wxString is private 2019-12-01 18:17:57 -05:00
Paul Licameli
0b6618e491 Use TranslatableString in NumericTextCtrl...
... Fixing a minor error in TimerRecordDialog, where translation of format was
done too soon
2019-12-01 18:08:56 -05:00
Paul Licameli
b351eabf47 ComponentInterfaceSymbol contains TranslatableString 2019-12-01 18:08:56 -05:00
Paul Licameli
e4a7c9ba5b Uses of TranslatableString as value of XO macro...
... It is not implicitly convertible from wxString, compelling many uses of
the new type to fix compilation.
2019-12-01 18:05:20 -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
8640a83b25 "System" in language choice in Interface prefs was blank, fixed that 2019-12-01 18:04:51 -05:00
Paul Licameli
84efd63a70 Fix internationalization of pitch names...
... Translations were in the catalog, but weren't used.

Affects Change Pitch effect and Plot Spectrum cross-hair readouts.

See for instance Czech (cs) locale, where "H" should replace "B".
2019-12-01 14:06:15 -05:00
Paul Licameli
3704336a58 Fix dangling pointer bug, caused assertion opening Preferences 2019-12-01 13:50:36 -05:00
Paul Licameli
ab05cdcdaf Miscellaneous preliminaries before improving ShuttleGui 2019-11-29 15:16:51 -05:00
Paul Licameli
b256a4fd1a Less code directly inside ShuttleGui code blocks...
... Trying to reduce that just to chained calls on S, or conditional and looping
logic for variations in layout.

Lift some declarations to higher scope; or use expressions that avoid local
variables; or even use lambdas for more complicated computation of arguments
for the member functions of S.
2019-11-29 15:16:51 -05:00
Paul Licameli
f846c25806 Rewrite AddChoice and TieChoice calls...
... either lifting or inlining array-of-string computations, so fewer statements
are mixed among ShuttleGui method calls
2019-11-29 15:16:48 -05:00
Paul Licameli
f07d33f4b5 Fix bug in pushing and popping sizers in notebook pages...
... Wrong sizer was pushed instead of the page's own, and was popped as
current sizer, when the first sub-sizer in the page was done.

But nothing was affected by this error, because notebook pages are used only
in the About dialog, and none of the pages have more than one directly nested
sizer.  So popping null as current sizer didn't matter because the stack did
not deepen again.

PushSizer() only after assigning mpSizer, as with other calls to it.
2019-11-28 14:24:44 -05:00
Paul Licameli
ae353fe61f Specify list control columns and styles all in one call 2019-11-28 14:24:44 -05:00
Paul Licameli
17ee2478bc An overload of AddChoice specifying selected as string value 2019-11-28 14:24:44 -05:00
Paul Licameli
089b46ab64 Specify initial radio button state in ShuttleGui method arguments 2019-11-28 14:24:44 -05:00
Paul Licameli
fab756562e Use AddSlider arguments, not SetRange() 2019-11-28 14:24:43 -05:00
Paul Licameli
bca0afd52e ShuttleGui lets you specify whether a button is default. Use that. 2019-11-28 14:24:43 -05:00
Paul Licameli
cd4266792a Comment how AddStandardButtons sets default; remove redundant call 2019-11-28 14:24:43 -05:00
Paul Licameli
6bff718248 Comments about wxALL where there are position arguments in ShuttleGui 2019-11-28 14:24:43 -05:00
Paul Licameli
1cd795aadb Comments about the purpose of SettingName for radio buttons 2019-11-28 14:24:43 -05:00
Paul Licameli
43a8725044 comment 2019-11-28 14:24:43 -05:00
Paul Licameli
7ccd35d219 wxWidgets docs recommend: don't SetSizeHints on non-top-level windows 2019-11-28 14:24:43 -05:00
Paul Licameli
c67a47e3e6 ShuttleGuiBase::mpDlg is const 2019-11-28 14:24:43 -05:00
Paul Licameli
f20e4786e9 Replace ShuttleGui::SetNoMatchSelector with arg in TieNumberAsChoice 2019-11-28 14:24:43 -05:00
Paul Licameli
5616137a8b Some preliminaries for improved management of preferences 2019-11-28 13:31:41 -05:00
Paul Licameli
d4ffbe0d68 Group setting path & default value arguments of Tie...() functions 2019-11-28 13:26:23 -05:00
Paul Licameli
7675d51044 Separate function TieIntegerTextBox...
... For the cases in which there is an associated preference variable which
should be a whole number
2019-11-28 13:18:33 -05:00
Paul Licameli
7fbe97c5ca Privatize, rename ShuttleGuiBase member fns (those using WrappedType) 2019-11-28 12:54:57 -05:00
Paul Licameli
08a9e7246f Use the proper type alias for ComponentInterfaceSymbol 2019-11-27 22:03:25 -05:00
Paul Licameli
e4e6e0a03a Make sure to translate certain strings in ExportMP3 rewrite 2019-11-27 21:43:02 -05:00
Paul Licameli
1add6f3930 Fix warning treated as error in Mac build 2019-11-27 21:38:59 -05:00
SteveDaulton
fe7434bc9f Merge loudness effect from mmmaise 2019-11-27 21:14:05 +00:00
SteveDaulton
c97573abb5 update makefiles for Loudness effect on Linux 2019-11-27 21:00:51 +00:00
Paul Licameli
1b5c5a52d2 Reimplement ShuttleGui Tie... functions for radios and choices...
... so that in all cases a ChoiceSetting object stores all the details about
visible names, internal string codes, default value, and preference path.

Repetition of literals for some preference paths and their default values is
eliminated
2019-11-27 13:40:35 -05:00
Paul Licameli
87a9e7ccbb Use global ChoiceSettings variables, not coincidental string literals 2019-11-27 13:38:17 -05:00
Paul Licameli
9b41741074 Remove an overload of TieChoice; use more ChoiceSetting instead...
... this also corrects some mis-specifications of the default choice, formerly
by string instead of array position
2019-11-27 13:38:16 -05:00
Paul Licameli
087ac5e6c9 Change one overload of TieChoice to expect un-translated strings...
... preparatory to removing that overload.

This overload is used in exactly these files:

DevicePrefs.cpp (displaying host names retrieved by portaudio, which are not
defined in Audacity source)

EffectsPrefs.cpp

ExportFLAC.cpp (twice)

ExportMultiple.cpp (displaying the descriptions defined in the several export
plugin classes)

GUIPrefs.cpp (four times: languages, manual location, theme, and meter DB
range; the language names themselves don't have localizations!)

MidiIOPrefs.cpp (displaying host names retrieved by portmidi)

TracksBehaviorsPrefs.cpp (for solo button choices)

There is also TieNumberAsChoice, used in QualityPrefs and elsewhere, which
calls through to that overload.
2019-11-27 13:38:16 -05:00
Paul Licameli
5638d6844f Eliminate an overload of TieChoice...
... with one exception (/FileFormats/FFmpegAACProfile),
the calls are replaced with TieNumberAsChoice.

Some unfortunately repetitious string tables are a small price in exchange for
reduced confusion in ShuttleGui.cpp

Untranslated strings are passed to TieNumberAsChoice, which is wrong, but that
will be made right in the next commit when we change the implementation of that
function
2019-11-27 13:38:16 -05:00
Paul Licameli
dc3e872ca6 Reimplement TieNumberAsChoice and fix some comments...
... Make the array of integer choices optional, and call through to the
non-deprecated overload of TieChoice, which uses strings.

In 2.3.3 this function is only used in the Quality preferences dialog.
2019-11-27 13:38:06 -05:00
Paul Licameli
0493aaccee TieChoice needs only const reference to ChoiceSetting 2019-11-27 13:37:26 -05:00
Paul Licameli
e008a44022 Pass ChoiceSetting to StartRadioButtonGroup...
... and we don't need to pass strings to TieRadioButton.

This removes some repetition of string literals in import/export, which is
good too.
2019-11-27 13:37:25 -05:00
Paul Licameli
c5e21ead18 Rename, privatize, combine ShuttleGui members related to radios 2019-11-27 13:37:25 -05:00
Paul Licameli
89f3369556 Some WrappedType members just for radio buttons are no longer needed 2019-11-27 13:37:25 -05:00
Paul Licameli
c8a8c6a3fa Remove radio button function overloads made unused in previous commit 2019-11-27 13:37:24 -05:00
Paul Licameli
51115903d4 Remove uses of overload of TieRadioButton taking int values...
... and migrate old preferences with EnumSetting
2019-11-27 13:37:24 -05:00
Paul Licameli
0d910bbe02 EnumSetting has a template parameter 2019-11-27 13:37:24 -05:00
Paul Licameli
85b06fe6d0 Define ChoiceSetting::ReadWithDefault ...
... because some calls might not have used the same defaults as in the Tie...
functions
2019-11-27 13:37:24 -05:00
Paul Licameli
bc08f571dc ChoiceSetting default is changeable and can be unspecified 2019-11-27 13:37:23 -05:00
Paul Licameli
1236c5bfed class EnumValueSymbols lets you specify a table...
... of EnumValueSymbol either row-wise or column-wise
2019-11-27 13:37:23 -05:00
Paul Licameli
9b67e7538f ChoiceSetting contains vectors; simplify constructions of it 2019-11-27 13:37:23 -05:00