Audacity  3.0.3
WarningsPrefs.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  WarningsPrefs.cpp
6 
7  Brian Gunlogson
8  Joshua Haberman
9  Dominic Mazzoni
10  James Crook
11 
12 
13 *******************************************************************//*******************************************************************/
19 
20 
21 #include "WarningsPrefs.h"
22 
23 #include <wx/defs.h>
24 
25 #include "Prefs.h"
26 #include "../ShuttleGui.h"
27 
29 
30 WarningsPrefs::WarningsPrefs(wxWindow * parent, wxWindowID winid)
31 : PrefsPanel(parent, winid, XO("Warnings"))
32 {
33  Populate();
34 }
35 
37 {
38 }
39 
41 {
43 }
44 
46 {
47  return XO("Preferences for Warnings");
48 }
49 
51 {
52  return "Warnings_Preferences";
53 }
54 
56 {
57  //------------------------- Main section --------------------
58  // Now construct the GUI itself.
59  // Use 'eIsCreatingFromPrefs' so that the GUI is
60  // initialised with values from gPrefs.
63  // ----------------------- End of main section --------------
64 }
65 
67 {
68  S.SetBorder(2);
69  S.StartScroller();
70 
71  S.StartStatic(XO("Show Warnings/Prompts for"));
72  {
73  S.TieCheckBox(XXO("Saving &projects"),
74  {wxT("/Warnings/FirstProjectSave"),
75  true});
76  S.TieCheckBox(XXO("Saving &empty project"),
77  {wxT("/GUI/EmptyCanBeDirty"),
78  true});
79  S.TieCheckBox(XXO("Mixing down to &mono during export"),
80  {wxT("/Warnings/MixMono"),
81  true});
82  S.TieCheckBox(XXO("Mixing down to &stereo during export"),
83  {wxT("/Warnings/MixStereo"),
84  true});
85  S.TieCheckBox(XXO("Mixing down on export (&Custom FFmpeg or external program)"),
86  {wxT("/Warnings/MixUnknownChannels"),
87  true});
88  S.TieCheckBox(XXO("Missing file &name extension during export"),
89  {wxT("/Warnings/MissingExtension"),
90  true});
91  }
92  S.EndStatic();
93  S.EndScroller();
94 
95 }
96 
98 {
101 
102  return true;
103 }
104 
105 namespace{
107  [](wxWindow *parent, wxWindowID winid, AudacityProject *)
108  {
109  wxASSERT(parent); // to justify safenew
110  return safenew WarningsPrefs(parent, winid);
111  }
112 };
113 }
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
WarningsPrefs::WarningsPrefs
WarningsPrefs(wxWindow *parent, wxWindowID winid)
Definition: WarningsPrefs.cpp:30
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1629
PrefsPanel::Registration
Definition: PrefsPanel.h:84
XO
#define XO(s)
Definition: Internat.h:31
WarningsPrefs.h
WarningsPrefs
A PrefsPanel to enable/disable certain warning messages.
Definition: WarningsPrefs.h:25
WarningsPrefs::GetDescription
TranslatableString GetDescription() override
Definition: WarningsPrefs.cpp:45
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
anonymous_namespace{WarningsPrefs.cpp}::sAttachment
PrefsPanel::Registration sAttachment
Definition: WarningsPrefs.cpp:106
ShuttleGuiBase::EndScroller
void EndScroller()
Definition: ShuttleGui.cpp:971
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartScroller
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:938
WARNINGS_PREFS_PLUGIN_SYMBOL
#define WARNINGS_PREFS_PLUGIN_SYMBOL
Definition: WarningsPrefs.h:22
WarningsPrefs::~WarningsPrefs
~WarningsPrefs()
Definition: WarningsPrefs.cpp:36
WarningsPrefs::Commit
bool Commit() override
Definition: WarningsPrefs.cpp:97
WarningsPrefs::Populate
void Populate()
Definition: WarningsPrefs.cpp:55
WarningsPrefs::HelpPageName
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
Definition: WarningsPrefs.cpp:50
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
TaggedIdentifier< ManualPageIDTag >
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
PrefsPanel
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
Prefs.h
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
WarningsPrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: WarningsPrefs.cpp:66
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
safenew
#define safenew
Definition: MemoryX.h:10
WarningsPrefs::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: WarningsPrefs.cpp:40
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631