57 return XO(
"Preferences for GUI");
62 return "Interface_Preferences";
68 int *pDefaultRangeIndex
71 static const auto sCodes = {
84 static const std::initializer_list<TranslatableString> sChoices = {
85 XO(
"-36 dB (shallow range for high-amplitude editing)") ,
86 XO(
"-48 dB (PCM range of 8 bit samples)") ,
87 XO(
"-60 dB (PCM range of 10 bit samples)") ,
88 XO(
"-72 dB (PCM range of 12 bit samples)") ,
89 XO(
"-84 dB (PCM range of 14 bit samples)") ,
90 XO(
"-96 dB (PCM range of 16 bit samples)") ,
91 XO(
"-120 dB (approximate limit of human hearing)") ,
92 XO(
"-145 dB (PCM range of 24 bit samples)") ,
98 if (pDefaultRangeIndex)
99 *pDefaultRangeIndex = 2;
111 static std::once_flag
flag;
112 std::call_once(
flag, [&]{
116 for (
int i = 1; i <= 64; i *= 2) {
117 auto lts = wxString::Format(
wxT(
"%d"), i);
127 *pChoices = sChoices;
183 S.StartStatic(
XO(
"Display"));
185 S.StartMultiColumn(2);
187 S.TieChoice(
XXO(
"&Language:"), LanguageSetting);
190 S.TieChoice(
XXO(
"Meter dB &range:"), DBSetting);
194 S.StartMultiColumn(2);
198 S.TieChoice(
XXO(
"Lower time &signature:"), LowerTimeSigSettings);
205 S.StartStatic(
XO(
"Options"));
208 S.TieCheckBox(
XXO(
"Show 'How to Get &Help' at launch"),
209 {
wxT(
"/GUI/ShowSplashScreen"),
211 S.TieCheckBox(
XXO(
"Show e&xtra menus"),
212 {
wxT(
"/GUI/ShowExtraMenus"),
214#ifdef EXPERIMENTAL_THEME_PREFS
217 S.TieCheckBox(
XXO(
"Show alternative &styling (Mac vs PC)"),
218 {
wxT(
"/GUI/ShowMac"),
221 S.TieCheckBox(
XXO(
"&Beep on completion of longer activities"),
222 {
wxT(
"/GUI/BeepOnCompletion"),
224 S.TieCheckBox(
XXO(
"Re&tain labels if selection snaps to a label"),
225 {
wxT(
"/GUI/RetainLabels"),
227 S.TieCheckBox(
XXO(
"B&lend system and Audacity theme"),
231 S.TieCheckBox(
XXO(
"Use mostly Left-to-Right layouts in RTL languages"),
232 {
"/GUI/RtlWorkaround",
235#ifdef EXPERIMENTAL_CEE_NUMBERS_OPTION
236 S.TieCheckBox(
XXO(
"Never use comma as decimal point"),
237 {
wxT(
"/Locale/CeeNumberFormat"),
243 S.StartStatic(
XO(
"Timeline"));
245 S.TieCheckBox(
XXO(
"Show Timeline Tooltips"),
246 {
wxT(
"/QuickPlay/ToolTips"),
248 S.TieCheckBox(
XXO(
"Show Scrub Ruler"),
249 {
wxT(
"/QuickPlay/ScrubbingEnabled"),
263 wxString lang =
gPrefs->Read(
wxT(
"/Locale/Language"),
wxT(
""));
266 if (!(lang.empty() || lang == L
"System") && (lang != usedLang)) {
268 gPrefs->Write(
wxT(
"/Locale/Language"), usedLang);
291 static int value = wxNewId();
297 static int value = wxNewId();
IntSetting UpperTimeSignature
The upper time signature of the Beats & Measures ruler.
IntSetting LowerTimeSignature
The lower time signature of the Beats & Measures ruler.
DoubleSetting BeatsPerMinute
The tempo used for drawing the Beats & Measures ruler.
IntSetting DecibelScaleCutoff
Negation of this value is the lowest dB level that should be shown in dB scales.
XXO("&Cut/Copy/Paste Toolbar")
int ShowTrackNameInWaveformPrefsID()
int ShowClippingPrefsID()
#define GUI_PREFS_PLUGIN_SYMBOL
THEME_API BoolSetting GUIBlendThemes
THEME_API ChoiceSetting & GUITheme()
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
std::vector< TranslatableString > TranslatableStrings
static void ApplyUpdatedImages()
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
A PrefsPanel for general GUI preferences.
GUIPrefs(wxWindow *parent, wxWindowID winid)
wxArrayStringEx mRangeCodes
TranslatableString GetDescription() const override
wxArrayStringEx mLangCodes
void PopulateOrExchange(ShuttleGui &S) override
TranslatableStrings mLTSChoices
ComponentInterfaceSymbol GetSymbol() const override
static void GetLTSChoices(TranslatableStrings *pChoices, wxArrayStringEx *pCodes, int *pDefaultIndex=nullptr)
static void GetRangeChoices(TranslatableStrings *pChoices, wxArrayStringEx *pCodes, int *pDefaultRangeIndex=nullptr)
TranslatableStrings mLangNames
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
wxArrayStringEx mLTSCodes
TranslatableStrings mRangeChoices
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
void Invalidate() override
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
void DeleteUnusedThemes()
static bool LoadPreferredTheme()
Holds a msgid for the translation catalog; may also bind format arguments.
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
iterator insert(const_iterator pos, std::initializer_list< T > items)
FILES_API const FilePaths & AudacityPathList()
A list of directories that should be searched for Audacity files (plug-ins, help files,...
AUDACITY_DLL_API wxString SetLang(const wxString &lang)
void GetLanguages(FilePaths pathList, wxArrayString &langCodes, TranslatableStrings &langNames)
PrefsPanel::Registration sAttachment